diff --git a/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java b/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java index 795678841a..e987506c40 100644 --- a/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java +++ b/src/java/org/apache/cassandra/io/sstable/format/big/BigFormat.java @@ -444,7 +444,7 @@ public class BigFormat extends AbstractSSTableFormat v.compareTo(BigFormat.getInstance().getLatestVersion().toString()) <= 0).toArray(String[]::new); } @@ -139,7 +150,6 @@ public class LegacySSTableTest { createTables(legacyVersion); } - } @After @@ -156,9 +166,11 @@ public class LegacySSTableTest */ protected Descriptor getDescriptor(String legacyVersion, String table) throws IOException { - File[] files = getTableDir(legacyVersion, table).list(); - Preconditions.checkArgument(files.length > 0, "No files for version=%s and table=%s", legacyVersion, table); - return Descriptor.fromFileWithComponent(files[0]).left; + Path file = Files.list(getTableDir(legacyVersion, table).toPath()) + .findFirst() + .orElseThrow(() -> new RuntimeException(String.format("No files for verion=%s and table=%s", legacyVersion, table))); + + return Descriptor.fromFile(new File(file)); } @Test @@ -318,7 +330,7 @@ public class LegacySSTableTest public void testInaccurateSSTableMinMax() throws Exception { QueryProcessor.executeInternal("CREATE TABLE legacy_tables.legacy_mc_inaccurate_min_max (k int, c1 int, c2 int, c3 int, v int, primary key (k, c1, c2, c3))"); - loadLegacyTable("legacy_%s_inaccurate_min_max", "mc"); + loadLegacyTable("mc", "inaccurate_min_max"); /* sstable has the following mutations: @@ -336,12 +348,65 @@ public class LegacySSTableTest } @Test - public void testVerifyOldSSTables() throws IOException + public void testVerifyOldSimpleSSTables() throws IOException + { + verifyOldSSTables("simple"); + } + + @Test + public void testVerifyOldTupleSSTables() throws IOException + { + verifyOldSSTables("tuple"); + } + + @Test + public void testVerifyOldDroppedTupleSSTables() throws IOException + { + try { + for (String legacyVersion : legacyVersions) + { + QueryProcessor.executeInternal(String.format("ALTER TABLE legacy_tables.legacy_%s_tuple DROP val", legacyVersion)); + QueryProcessor.executeInternal(String.format("ALTER TABLE legacy_tables.legacy_%s_tuple DROP val2", legacyVersion)); + QueryProcessor.executeInternal(String.format("ALTER TABLE legacy_tables.legacy_%s_tuple DROP val3", legacyVersion)); + // dropping non-frozen UDTs disabled, see AlterTableStatement.DropColumns.dropColumn(..) + //QueryProcessor.executeInternal(String.format("ALTER TABLE legacy_tables.legacy_%s_tuple DROP val4", legacyVersion)); + } + + verifyOldSSTables("tuple"); + } + finally + { + for (String legacyVersion : legacyVersions) + { + alterTableAddColumn(legacyVersion, "val frozen,set>>"); + alterTableAddColumn(legacyVersion, "val2 tuple,set>"); + try + { + alterTableAddColumn(legacyVersion, String.format("val3 frozen", legacyVersion)); + throw new AssertionError(String.format("Against legacyVersion %s expected InvalidRequestException: Cannot re-add previously dropped column 'val3' of type frozen, incompatible with previous type frozen>>>", legacyVersion)); + } + catch (InvalidRequestException ex) + { + // expected + // InvalidRequestException: Cannot re-add previously dropped column 'val3' of type frozen, incompatible with previous type frozen>>> + } + // dropping non-frozen UDTs disabled, see AlterTableStatement.DropColumns.dropColumn(..) + //alterTableAddColumn(legacyVersion, String.format("val4 legacy_%s_tuple_udt", legacyVersion)); + } + } + } + + private static void alterTableAddColumn(String legacyVersion, String column_definition) + { + QueryProcessor.executeInternal(String.format("ALTER TABLE legacy_tables.legacy_%s_tuple ADD IF NOT EXISTS %s", legacyVersion, column_definition)); + } + + private void verifyOldSSTables(String tableSuffix) throws IOException { for (String legacyVersion : legacyVersions) { - ColumnFamilyStore cfs = Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_simple", legacyVersion)); - loadLegacyTable("legacy_%s_simple", legacyVersion); + ColumnFamilyStore cfs = Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_%s", legacyVersion, tableSuffix)); + loadLegacyTable(legacyVersion, tableSuffix); for (SSTableReader sstable : cfs.getLiveSSTables()) { @@ -375,7 +440,7 @@ public class LegacySSTableTest for (String legacyVersion : legacyVersions) { ColumnFamilyStore cfs = Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_simple", legacyVersion)); - loadLegacyTable("legacy_%s_simple", legacyVersion); + loadLegacyTable(legacyVersion, "simple"); boolean shouldFail = !cfs.getLiveSSTables().stream().allMatch(sstable -> sstable.descriptor.version.hasPendingRepair()); IPartitioner p = Iterables.getFirst(cfs.getLiveSSTables(), null).getPartitioner(); @@ -423,27 +488,34 @@ public class LegacySSTableTest private void streamLegacyTables(String legacyVersion) throws Exception { - logger.info("Streaming legacy version {}", legacyVersion); - streamLegacyTable("legacy_%s_simple", legacyVersion); - streamLegacyTable("legacy_%s_simple_counter", legacyVersion); - streamLegacyTable("legacy_%s_clust", legacyVersion); - streamLegacyTable("legacy_%s_clust_counter", legacyVersion); + logger.info("Streaming legacy version {}", legacyVersion); + streamLegacyTable("legacy_%s_simple", legacyVersion); + streamLegacyTable("legacy_%s_simple_counter", legacyVersion); + streamLegacyTable("legacy_%s_clust", legacyVersion); + streamLegacyTable("legacy_%s_clust_counter", legacyVersion); + streamLegacyTable("legacy_%s_tuple", legacyVersion); } private void streamLegacyTable(String tablePattern, String legacyVersion) throws Exception { String table = String.format(tablePattern, legacyVersion); - SSTableReader sstable = SSTableReader.open(null, getDescriptor(legacyVersion, table)); - IPartitioner p = sstable.getPartitioner(); - List> ranges = new ArrayList<>(); - ranges.add(new Range<>(p.getMinimumToken(), p.getToken(ByteBufferUtil.bytes("100")))); - ranges.add(new Range<>(p.getToken(ByteBufferUtil.bytes("100")), p.getMinimumToken())); - List streams = Lists.newArrayList(new CassandraOutgoingFile(StreamOperation.OTHER, - sstable.ref(), - sstable.getPositionsForRanges(ranges), - ranges, - sstable.estimatedKeysForRanges(ranges))); - new StreamPlan(StreamOperation.OTHER).transferStreams(FBUtilities.getBroadcastAddressAndPort(), streams).execute().get(); + Descriptor descriptor = getDescriptor(legacyVersion, table); + if (null != descriptor) + { + SSTableReader sstable = SSTableReader.open(null, getDescriptor(legacyVersion, table)); + IPartitioner p = sstable.getPartitioner(); + List> ranges = new ArrayList<>(); + ranges.add(new Range<>(p.getMinimumToken(), p.getToken(ByteBufferUtil.bytes("100")))); + ranges.add(new Range<>(p.getToken(ByteBufferUtil.bytes("100")), p.getMinimumToken())); + + List streams = Lists.newArrayList(new CassandraOutgoingFile(StreamOperation.OTHER, + sstable.ref(), + sstable.getPositionsForRanges(ranges), + ranges, + sstable.estimatedKeysForRanges(ranges))); + + new StreamPlan(StreamOperation.OTHER).transferStreams(FBUtilities.getBroadcastAddressAndPort(), streams).execute().get(); + } } public static void truncateLegacyTables(String legacyVersion) throws Exception @@ -453,6 +525,9 @@ public class LegacySSTableTest Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_simple_counter", legacyVersion)).truncateBlocking(); Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_clust", legacyVersion)).truncateBlocking(); Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_clust_counter", legacyVersion)).truncateBlocking(); + Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_tuple", legacyVersion)).truncateBlocking(); + CacheService.instance.invalidateCounterCache(); + CacheService.instance.invalidateKeyCache(); } private static void compactLegacyTables(String legacyVersion) throws Exception @@ -462,15 +537,17 @@ public class LegacySSTableTest Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_simple_counter", legacyVersion)).forceMajorCompaction(); Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_clust", legacyVersion)).forceMajorCompaction(); Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_clust_counter", legacyVersion)).forceMajorCompaction(); + Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(String.format("legacy_%s_tuple", legacyVersion)).forceMajorCompaction(); } public static void loadLegacyTables(String legacyVersion) throws Exception { - logger.info("Preparing legacy version {}", legacyVersion); - loadLegacyTable("legacy_%s_simple", legacyVersion); - loadLegacyTable("legacy_%s_simple_counter", legacyVersion); - loadLegacyTable("legacy_%s_clust", legacyVersion); - loadLegacyTable("legacy_%s_clust_counter", legacyVersion); + logger.info("Preparing legacy version {}", legacyVersion); + loadLegacyTable(legacyVersion, "simple"); + loadLegacyTable(legacyVersion, "simple_counter"); + loadLegacyTable(legacyVersion, "clust"); + loadLegacyTable(legacyVersion, "clust_counter"); + loadLegacyTable(legacyVersion, "tuple"); } private static void verifyCache(String legacyVersion, long startCount) throws InterruptedException, java.util.concurrent.ExecutionException @@ -568,6 +645,21 @@ public class LegacySSTableTest QueryProcessor.executeInternal(String.format("CREATE TABLE legacy_tables.legacy_%s_simple_counter (pk text PRIMARY KEY, val counter)", legacyVersion)); QueryProcessor.executeInternal(String.format("CREATE TABLE legacy_tables.legacy_%s_clust (pk text, ck text, val text, PRIMARY KEY (pk, ck))", legacyVersion)); QueryProcessor.executeInternal(String.format("CREATE TABLE legacy_tables.legacy_%s_clust_counter (pk text, ck text, val counter, PRIMARY KEY (pk, ck))", legacyVersion)); + + + QueryProcessor.executeInternal(String.format("CREATE TYPE legacy_tables.legacy_%s_tuple_udt (name tuple)", legacyVersion)); + + if (legacyVersion.startsWith("m")) + { + // sstable formats possibly from 3.0.x would have had a schema with everything frozen + QueryProcessor.executeInternal(String.format("CREATE TABLE legacy_tables.legacy_%1$s_tuple (pk text PRIMARY KEY, " + + "val frozen,set>>, val2 frozen,set>>, val3 frozen, val4 frozen, extra text)", legacyVersion)); + } + else + { + QueryProcessor.executeInternal(String.format("CREATE TABLE legacy_tables.legacy_%1$s_tuple (pk text PRIMARY KEY, " + + "val frozen,set>>, val2 tuple,set>, val3 frozen, val4 legacy_%1$s_tuple_udt, extra text)", legacyVersion)); + } } private static void truncateTables(String legacyVersion) @@ -593,10 +685,9 @@ public class LegacySSTableTest } } - private static void loadLegacyTable(String tablePattern, String legacyVersion) throws IOException + private static void loadLegacyTable(String legacyVersion, String tableSuffix) throws IOException { - String table = String.format(tablePattern, legacyVersion); - + String table = String.format("legacy_%s_%s", legacyVersion, tableSuffix); logger.info("Loading legacy table {}", table); ColumnFamilyStore cfs = Keyspace.open(LEGACY_TABLES_KEYSPACE).getColumnFamilyStore(table); @@ -610,9 +701,11 @@ public class LegacySSTableTest } /** - * Generates sstables for 8 CQL tables (see {@link #createTables(String)}) in current + * Generates sstables for CQL tables (see {@link #createTables(String)}) in current * sstable format (version) into {@code test/data/legacy-sstables/VERSION}, where * {@code VERSION} matches {@link Version#version BigFormat.latestVersion.getVersion()}. + * + * Sequence numbers are changed to represent the C* version used when creating the SSTable. *

* Run this test alone (e.g. from your IDE) when a new version is introduced or format changed * during development. I.e. remove the {@code @Ignore} annotation temporarily. @@ -640,6 +733,11 @@ public class LegacySSTableTest QueryProcessor.executeInternal(String.format("UPDATE legacy_tables.legacy_%s_simple_counter SET val = val + 1 WHERE pk = '%s'", format.getLatestVersion(), valPk)); + QueryProcessor.executeInternal( + String.format("INSERT INTO legacy_tables.legacy_%s_tuple (pk, val, val2, val3, val4, extra)" + + " VALUES ('%s', ({1,2,3},{'a','b','c'}), ({1,2,3},{'a','b','c'}), {name: ('abc','def')}, {name: ('abc','def')}, '%s')", + format.getLatestVersion(), valPk, randomString)); + for (int ck = 0; ck < 50; ck++) { String valCk = Integer.toString(ck); @@ -656,14 +754,21 @@ public class LegacySSTableTest File ksDir = new File(LEGACY_SSTABLE_ROOT, String.format("%s/legacy_tables", format.getLatestVersion())); ksDir.tryCreateDirectories(); - copySstablesFromTestData(String.format("legacy_%s_simple", format.getLatestVersion()), ksDir, LEGACY_TABLES_KEYSPACE); - copySstablesFromTestData(String.format("legacy_%s_simple_counter", format.getLatestVersion()), ksDir, LEGACY_TABLES_KEYSPACE); - copySstablesFromTestData(String.format("legacy_%s_clust", format.getLatestVersion()), ksDir, LEGACY_TABLES_KEYSPACE); - copySstablesFromTestData(String.format("legacy_%s_clust_counter", format.getLatestVersion()), ksDir, LEGACY_TABLES_KEYSPACE); + copySstablesFromTestData(format.getLatestVersion(), "legacy_%s_simple", ksDir); + copySstablesFromTestData(format.getLatestVersion(), "legacy_%s_simple_counter", ksDir); + copySstablesFromTestData(format.getLatestVersion(), "legacy_%s_clust", ksDir); + copySstablesFromTestData(format.getLatestVersion(), "legacy_%s_clust_counter", ksDir); + copySstablesFromTestData(format.getLatestVersion(), "legacy_%s_tuple", ksDir); } - public static void copySstablesFromTestData(String table, File ksDir, String ks) throws IOException + public static void copySstablesFromTestData(Version legacyVersion, String tablePattern, File ksDir) throws IOException { + copySstablesFromTestData(legacyVersion, tablePattern, ksDir, LEGACY_TABLES_KEYSPACE); + } + + public static void copySstablesFromTestData(Version legacyVersion, String tablePattern, File ksDir, String ks) throws IOException + { + String table = String.format(tablePattern, legacyVersion); File cfDir = new File(ksDir, table); cfDir.tryCreateDirectory(); @@ -671,7 +776,10 @@ public class LegacySSTableTest { for (File file : srcDir.tryList()) { - copyFile(cfDir, file); + // Sequence IDs represent the C* version used when creating the SSTable, i.e. with #testGenerateSstables() (if not uuid based) + String newSeqId = FBUtilities.getReleaseVersionString().split("-")[0].replaceAll("[^0-9]", ""); + File target = new File(cfDir, file.name().replace(legacyVersion + "-1-", legacyVersion + "-" + newSeqId + "-")); + copyFile(cfDir, file, target); } } } @@ -681,9 +789,7 @@ public class LegacySSTableTest File tableDir = getTableDir(legacyVersion, table); Assert.assertTrue("The table directory " + tableDir + " was not found", tableDir.isDirectory()); for (File file : tableDir.tryList()) - { copyFile(cfDir, file); - } } private static File getTableDir(String legacyVersion, String table) @@ -692,17 +798,22 @@ public class LegacySSTableTest } public static void copyFile(File cfDir, File file) throws IOException + { + copyFile(cfDir, file, new File(cfDir, file.name())); + } + + public static void copyFile(File cfDir, File file, File target) throws IOException { byte[] buf = new byte[65536]; if (file.isFile()) { - File target = new File(cfDir, file.name()); int rd; try (FileInputStreamPlus is = new FileInputStreamPlus(file); - FileOutputStreamPlus os = new FileOutputStreamPlus(target);) { + FileOutputStreamPlus os = new FileOutputStreamPlus(target);) + { while ((rd = is.read(buf)) >= 0) os.write(buf, 0, rd); - } + } } } } diff --git a/test/unit/org/apache/cassandra/tools/SSTablePartitionsTest.java b/test/unit/org/apache/cassandra/tools/SSTablePartitionsTest.java index 7899a79341..bd38139001 100644 --- a/test/unit/org/apache/cassandra/tools/SSTablePartitionsTest.java +++ b/test/unit/org/apache/cassandra/tools/SSTablePartitionsTest.java @@ -41,12 +41,12 @@ public class SSTablePartitionsTest extends OfflineToolUtils { private static final String SSTABLE_1 = sstable("legacy_ma_simple"); private static final String SSTABLE_2 = sstable("legacy_ma_clust"); - private static final String HEADER_1 = "\nProcessing #1 (big-ma) (173 B uncompressed, 88 B on disk)\n"; - private static final String HEADER_2 = "\nProcessing #1 (big-ma) (328.145 KiB uncompressed, 5.096 KiB on disk)\n"; - private static final String BACKUPS_HEADER_1 = "\nProcessing Backup:backups #1 (big-ma) (173 B uncompressed, 88 B on disk)\n"; - private static final String BACKUPS_HEADER_2 = "\nProcessing Backup:backups #1 (big-ma) (328.145 KiB uncompressed, 5.096 KiB on disk)\n"; - private static final String SNAPSHOTS_HEADER_1 = "\nProcessing Snapshot:snapshot-1 #1 (big-ma) (173 B uncompressed, 88 B on disk)\n"; - private static final String SNAPSHOTS_HEADER_2 = "\nProcessing Snapshot:snapshot-1 #1 (big-ma) (328.145 KiB uncompressed, 5.096 KiB on disk)\n"; + private static final String HEADER_1 = "\nProcessing #306 (big-ma) (173 B uncompressed, 88 B on disk)\n"; + private static final String HEADER_2 = "\nProcessing #306 (big-ma) (328.145 KiB uncompressed, 5.096 KiB on disk)\n"; + private static final String BACKUPS_HEADER_1 = "\nProcessing Backup:backups #306 (big-ma) (173 B uncompressed, 88 B on disk)\n"; + private static final String BACKUPS_HEADER_2 = "\nProcessing Backup:backups #306 (big-ma) (328.145 KiB uncompressed, 5.096 KiB on disk)\n"; + private static final String SNAPSHOTS_HEADER_1 = "\nProcessing Snapshot:snapshot-1 #306 (big-ma) (173 B uncompressed, 88 B on disk)\n"; + private static final String SNAPSHOTS_HEADER_2 = "\nProcessing Snapshot:snapshot-1 #306 (big-ma) (328.145 KiB uncompressed, 5.096 KiB on disk)\n"; private static final String SUMMARY_1 = " Partition size Row count Cell count Tombstone count\n" + " ~p50 35 B 1 1 0\n" + " ~p75 35 B 1 1 0\n" + @@ -251,7 +251,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -261,7 +261,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 4 partitions match\n" + " Keys: 1 2 3 4\n" + @@ -274,7 +274,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -286,7 +286,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 4 partitions match\n" + " Keys: 1 2 3 4\n" + @@ -298,7 +298,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 4 partitions match\n" + " Keys: 1 2 3 4\n" + @@ -311,7 +311,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -337,7 +337,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -348,7 +348,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -361,7 +361,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -391,7 +391,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -402,7 +402,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -415,7 +415,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -445,7 +445,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 65.630 KiB, rows: 50, cells: 50, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_2 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -456,7 +456,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '2' (32) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 5 partitions match\n" + " Keys: 0 1 2 3 4\n" + @@ -536,7 +536,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils .contains(HEADER_1 + " Partition: '1' (31) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 2 partitions match\n" + " Keys: 1 3\n") @@ -547,7 +547,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '0' (30) live, size: 33 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '2' (32) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 3 partitions match\n" + " Keys: 0 2 4\n") @@ -558,7 +558,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '0' (30) live, size: 33 B\n" + " Partition: '2' (32) live, size: 35 B\n" + " Partition: '4' (34) live, size: 35 B\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 3 partitions match\n" + " Keys: 0 2 4\n") @@ -582,7 +582,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils " Partition: '0' (30) live, size: 33 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '2' (32) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '4' (34) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 3 partitions match\n" + " Keys: 0 2 4\n") @@ -592,7 +592,7 @@ public class SSTablePartitionsTest extends OfflineToolUtils .contains(HEADER_1 + " Partition: '1' (31) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + " Partition: '3' (33) live, size: 35 B, rows: 1, cells: 1, tombstones: 0 (row:0, range:0, complex:0, cell:0, row-TTLd:0, cell-TTLd:0)\n" + - "Summary of #1 (big-ma):\n" + + "Summary of #306 (big-ma):\n" + " File: " + SSTABLE_1 + "\n" + " 2 partitions match\n" + " Keys: 1 3\n") @@ -616,15 +616,15 @@ public class SSTablePartitionsTest extends OfflineToolUtils "rowTombstoneCount,rangeTombstoneCount,complexTombstoneCount,cellTombstoneCount," + "rowTtlExpired,cellTtlExpired,directory,keyspace,table,index,snapshot,backup," + "generation,format,version\n" + - "\"0\",30,true,0,67200,50,50,0,0,0,0,0,0,0,%s,,,,,,1,big,ma\n" + - "\"1\",31,true,67200,67205,50,50,0,0,0,0,0,0,0,%