Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAR-449: DO NOT MERGE #8

Open
wants to merge 6 commits into
base: ds-trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def check_required_loopback_interfaces_available():


def pytest_addoption(parser):
parser.addoption("--sstable-format", action="store", default="bti",
help="SSTable format to be used by default for all newly created SSTables: "
"big or bti (default: bti)")
parser.addoption("--use-vnodes", action="store_true", default=False,
help="Determines wither or not to setup clusters using vnodes for tests")
parser.addoption("--use-off-heap-memtables", action="store_true", default=False,
Expand Down
3 changes: 3 additions & 0 deletions cqlsh_tests/test_cqlsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -1077,6 +1077,7 @@ def get_test_table_output(self, has_val=True, has_val_idx=True):
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '16', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND memtable = {}
AND crc_check_chance = 1.0
AND default_time_to_live = 0
AND extensions = {}
Expand Down Expand Up @@ -1166,6 +1167,7 @@ def get_users_table_output(self):
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '16', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND memtable = {}
AND crc_check_chance = 1.0
AND default_time_to_live = 0
AND extensions = {}
Expand Down Expand Up @@ -1272,6 +1274,7 @@ def get_users_by_state_mv_output(self):
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '16', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
AND memtable = {}
AND crc_check_chance = 1.0
AND default_time_to_live = 0
AND extensions = {}
Expand Down
6 changes: 6 additions & 0 deletions dtest_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

class DTestConfig:
def __init__(self):
self.sstable_format = "bti"
self.use_vnodes = True
self.use_off_heap_memtables = False
self.num_tokens = -1
Expand Down Expand Up @@ -41,6 +42,11 @@ def setup(self, config):
self.cassandra_version_from_build = self.get_version_from_build()
return

self.sstable_format = config.getoption("--sstable-format")
assert self.sstable_format in ['bti', 'big'], "SSTable format {} is invalid - must be either bti or big".format(self.sstable_format)
default_sstable_format_prop = " -Dcassandra.sstable.format.default=" + self.sstable_format
os.environ.update({"JVM_EXTRA_OPTS": (os.environ.get("JVM_EXTRA_OPTS") or "") + default_sstable_format_prop})

self.use_vnodes = config.getoption("--use-vnodes")
self.use_off_heap_memtables = config.getoption("--use-off-heap-memtables")
self.num_tokens = config.getoption("--num-tokens")
Expand Down
4 changes: 2 additions & 2 deletions offline_tools_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,9 @@ def test_sstableverify(self):
hashcomputed = False
for line in outlines:
if sstable in line:
if "Verifying BigTableReader" in line:
if "Verifying " in line:
verified = True
elif "Checking computed hash of BigTableReader" in line:
elif "Checking computed hash of " in line:
hashcomputed = True
else:
logger.debug(line)
Expand Down
3 changes: 2 additions & 1 deletion run_dtests.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
#!/usr/bin/env python
"""
usage: run_dtests.py [-h] [--use-vnodes] [--use-off-heap-memtables] [--num-tokens=NUM_TOKENS] [--data-dir-count-per-instance=DATA_DIR_COUNT_PER_INSTANCE]
usage: run_dtests.py [-h] [--sstable-format=FORMAT] [--use-vnodes] [--use-off-heap-memtables] [--num-tokens=NUM_TOKENS] [--data-dir-count-per-instance=DATA_DIR_COUNT_PER_INSTANCE]
[--force-resource-intensive-tests] [--skip-resource-intensive-tests] [--cassandra-dir=CASSANDRA_DIR] [--cassandra-version=CASSANDRA_VERSION]
[--delete-logs] [--execute-upgrade-tests] [--execute-upgrade-tests-only] [--disable-active-log-watching] [--keep-test-dir]
[--enable-jacoco-code-coverage] [--dtest-enable-debug-logging] [--dtest-print-tests-only] [--dtest-print-tests-output=DTEST_PRINT_TESTS_OUTPUT]
[--pytest-options=PYTEST_OPTIONS] [--dtest-tests=DTEST_TESTS]

optional arguments:
-h, --help show this help message and exit
--sstable-format SSTable format to be used by default for all newly created SSTables: big or bti (default: bti)
--use-vnodes Determines wither or not to setup clusters using vnodes for tests (default: False)
--use-off-heap-memtables Enable Off Heap Memtables when creating test clusters for tests (default: False)
--num-tokens=NUM_TOKENS Number of tokens to set num_tokens yaml setting to when creating instances with vnodes enabled (default: 256)
Expand Down