@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_fail_when_negative_rows_per_partition() throws Exception { createTable("test") .addPartitionKey("id", DataType.bigint()) .addColumn("name", DataType.text()) .withOptions() .caching(KeyCaching.ALL, rows(-3)); }
@Test(groups = "unit", expectedExceptions = IllegalStateException.class) public void should_fail_when_both_caching_versions() throws Exception { createTable("test") .addPartitionKey("id", DataType.bigint()) .addColumn("name", DataType.text()) .withOptions() .caching(Caching.KEYS_ONLY) .caching(KeyCaching.ALL, allRows()) .getQueryString(); }
.compactStorage() .bloomFilterFPChance(0.01) .caching(Caching.ROWS_ONLY) .comment("This is a comment") .compactionOptions(leveledStrategy().ssTableSizeInMB(160))
.withOptions() .bloomFilterFPChance(falsePositive(tableMetadata.hasNegativeLookups(), appendHeavyReadLight)) .caching(SchemaBuilder.Caching.KEYS_ONLY) .compactionOptions(getCompaction(appendHeavyReadLight)) .compactStorage()
@Test(groups = "unit", expectedExceptions = IllegalStateException.class) public void should_fail_when_both_caching_versions() throws Exception { createTable("test") .addPartitionKey("id", DataType.bigint()) .addColumn("name", DataType.text()) .withOptions() .caching(Caching.KEYS_ONLY) .caching(KeyCaching.ALL, allRows()) .getQueryString(); }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_fail_when_negative_rows_per_partition() throws Exception { createTable("test") .addPartitionKey("id", DataType.bigint()) .addColumn("name", DataType.text()) .withOptions() .caching(KeyCaching.ALL, rows(-3)); }
.compactStorage() .bloomFilterFPChance(0.01) .caching(Caching.ROWS_ONLY) .comment("This is a comment") .compactionOptions(leveledStrategy().ssTableSizeInMB(160))
.withOptions() .bloomFilterFPChance(falsePositive(tableMetadata.hasNegativeLookups(), appendHeavyReadLight)) .caching(SchemaBuilder.Caching.KEYS_ONLY) .compactionOptions(getCompaction(appendHeavyReadLight)) .compactStorage()