private CompactionOptions<?> getCompaction(boolean appendHeavyReadLight) { return appendHeavyReadLight ? SchemaBuilder.sizedTieredStategy().minThreshold(4).maxThreshold(32) : SchemaBuilder.leveledStrategy(); }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_throw_exception_if_tombstone_threshold_negative() throws Exception { sizedTieredStategy().bucketLow(0.5).bucketHigh(1.2).coldReadsRatioToOmit(-1.0).build(); } }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_throw_exception_if_tombstone_threshold_out_of_range() throws Exception { sizedTieredStategy().bucketLow(0.5).bucketHigh(1.2).tombstoneThreshold(1.89).build(); }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_throw_exception_if_cold_read_ratio_out_of_range() throws Exception { sizedTieredStategy().bucketLow(0.5).bucketHigh(1.2).coldReadsRatioToOmit(1.89).build(); }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_throw_exception_if_cold_read_ratio_negative() throws Exception { sizedTieredStategy().bucketLow(0.5).bucketHigh(1.2).coldReadsRatioToOmit(-1.0).build(); }
sizedTieredStategy() .bucketLow(0.5) .bucketHigh(1.2)
private CompactionOptions<?> getCompaction(boolean appendHeavyReadLight) { return appendHeavyReadLight ? SchemaBuilder.sizedTieredStategy().minThreshold(4).maxThreshold(32) : SchemaBuilder.leveledStrategy(); }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_throw_exception_if_cold_read_ratio_negative() throws Exception { sizedTieredStategy().bucketLow(0.5).bucketHigh(1.2).coldReadsRatioToOmit(-1.0).build(); }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_throw_exception_if_tombstone_threshold_out_of_range() throws Exception { sizedTieredStategy().bucketLow(0.5).bucketHigh(1.2).tombstoneThreshold(1.89).build(); }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_throw_exception_if_tombstone_threshold_negative() throws Exception { sizedTieredStategy().bucketLow(0.5).bucketHigh(1.2).coldReadsRatioToOmit(-1.0).build(); } }
@Test(groups = "unit", expectedExceptions = IllegalArgumentException.class) public void should_throw_exception_if_cold_read_ratio_out_of_range() throws Exception { sizedTieredStategy().bucketLow(0.5).bucketHigh(1.2).coldReadsRatioToOmit(1.89).build(); }
sizedTieredStategy() .bucketLow(0.5) .bucketHigh(1.2)
private static CompactionOptions<?> compactionOptions(final Configuration configuration) { if (!configuration.has(COMPACTION_STRATEGY)) { return null; } final CompactionOptions<?> compactionOptions = Match(configuration.get(COMPACTION_STRATEGY)) .of( Case($("SizeTieredCompactionStrategy"), sizedTieredStategy()), Case($("DateTieredCompactionStrategy"), dateTieredStrategy()), Case($("LeveledCompactionStrategy"), leveledStrategy())); Array.of(configuration.get(COMPACTION_OPTIONS)) .grouped(2) .forEach(keyValue -> compactionOptions.freeformOption(keyValue.get(0), keyValue.get(1))); return compactionOptions; }