コード例 #1
0
ファイル: TestSlabCache.java プロジェクト: haoyuan/hbase
 @After
 public void tearDown() {
   cache.shutdown();
 }
コード例 #2
0
ファイル: TestSlabCache.java プロジェクト: haoyuan/hbase
 @Test
 public void testElementPlacement() {
   assertEquals(cache.getHigherBlock(BLOCK_SIZE).getKey().intValue(), (BLOCK_SIZE * 11 / 10));
   assertEquals(
       cache.getHigherBlock((BLOCK_SIZE * 2)).getKey().intValue(), (BLOCK_SIZE * 21 / 10));
 }
コード例 #3
0
ファイル: TestSlabCache.java プロジェクト: haoyuan/hbase
 @Before
 public void setup() {
   cache = new SlabCache(CACHE_SIZE + BLOCK_SIZE * 2, BLOCK_SIZE);
   cache.addSlabByConf(new Configuration());
 }