use of org.apache.hadoop.hbase.regionserver.compactions.StripeCompactionPolicy.StripeInformationProvider in project hbase by apache.
the class TestStripeCompactionPolicy method testNoStripesFromFlush.
@Test
public void testNoStripesFromFlush() throws Exception {
Configuration conf = HBaseConfiguration.create();
conf.setBoolean(StripeStoreConfig.FLUSH_TO_L0_KEY, true);
StripeCompactionPolicy policy = createPolicy(conf);
StripeInformationProvider si = createStripesL0Only(0, 0);
KeyValue[] input = new KeyValue[] { KV_A, KV_B, KV_C, KV_D, KV_E };
KeyValue[][] expected = new KeyValue[][] { input };
verifyFlush(policy, si, input, expected, null);
}
use of org.apache.hadoop.hbase.regionserver.compactions.StripeCompactionPolicy.StripeInformationProvider in project hbase by apache.
the class TestStripeCompactionPolicy method testOldStripesFromFlush.
@Test
public void testOldStripesFromFlush() throws Exception {
StripeCompactionPolicy policy = createPolicy(HBaseConfiguration.create());
StripeInformationProvider si = createStripes(0, KEY_C, KEY_D);
KeyValue[] input = new KeyValue[] { KV_B, KV_C, KV_C, KV_D, KV_E };
KeyValue[][] expected = new KeyValue[][] { new KeyValue[] { KV_B }, new KeyValue[] { KV_C, KV_C }, new KeyValue[] { KV_D, KV_E } };
verifyFlush(policy, si, input, expected, new byte[][] { OPEN_KEY, KEY_C, KEY_D, OPEN_KEY });
}
Aggregations