当前位置: 首页>>代码示例>>Java>>正文


Java BlockCache.getBlockCacheColumnFamilySummaries方法代码示例

本文整理汇总了Java中org.apache.hadoop.hbase.io.hfile.BlockCache.getBlockCacheColumnFamilySummaries方法的典型用法代码示例。如果您正苦于以下问题:Java BlockCache.getBlockCacheColumnFamilySummaries方法的具体用法?Java BlockCache.getBlockCacheColumnFamilySummaries怎么用?Java BlockCache.getBlockCacheColumnFamilySummaries使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.hadoop.hbase.io.hfile.BlockCache的用法示例。


在下文中一共展示了BlockCache.getBlockCacheColumnFamilySummaries方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testBlockCacheSummary

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * This test inserts data into multiple tables and then reads both tables to ensure
 * they are in the block cache.
 *
 * @throws Exception exception
 */
@Test
public void testBlockCacheSummary() throws Exception {
  HTable ht = TEST_UTIL.createTable(Bytes.toBytes(TEST_TABLE), FAMILY);
  addRows(ht, FAMILY);

  HTable ht2 = TEST_UTIL.createTable(Bytes.toBytes(TEST_TABLE2), FAMILY);
  addRows(ht2, FAMILY);

  TEST_UTIL.flush();
  
  scan(ht, FAMILY);
  scan(ht2, FAMILY);
     
  BlockCache bc =
    new CacheConfig(TEST_UTIL.getConfiguration()).getBlockCache();
  List<BlockCacheColumnFamilySummary> bcs = 
    bc.getBlockCacheColumnFamilySummaries(TEST_UTIL.getConfiguration());
  LOG.info("blockCacheSummary: " + bcs);

  assertEquals("blockCache summary has entries", 3, bcs.size());
  
  BlockCacheColumnFamilySummary e = bcs.get(0);
  assertEquals("table", "-ROOT-", e.getTable());
  assertEquals("cf", "info", e.getColumnFamily());

  e = bcs.get(1);
  assertEquals("table", TEST_TABLE, e.getTable());
  assertEquals("cf", TEST_CF, e.getColumnFamily());

  e = bcs.get(2);
  assertEquals("table", TEST_TABLE2, e.getTable());
  assertEquals("cf", TEST_CF, e.getColumnFamily());

  ht.close();
  ht2.close();
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:43,代码来源:TestStoreFileBlockCacheSummary.java

示例2: testBlockCacheSummary

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
/**
 * This test inserts data into multiple tables and then reads both tables to ensure
 * they are in the block cache.
 *
 * @throws Exception exception
 */
@Test
public void testBlockCacheSummary() throws Exception {
  HTable ht = TEST_UTIL.createTable(Bytes.toBytes(TEST_TABLE), FAMILY);
  addRows(ht, FAMILY);

  HTable ht2 = TEST_UTIL.createTable(Bytes.toBytes(TEST_TABLE2), FAMILY);
  addRows(ht2, FAMILY);

  TEST_UTIL.flush();
  
  scan(ht, FAMILY);
  scan(ht2, FAMILY);
     
  BlockCache bc =
    new CacheConfig(TEST_UTIL.getConfiguration()).getBlockCache();
  List<BlockCacheColumnFamilySummary> bcs = 
    bc.getBlockCacheColumnFamilySummaries(TEST_UTIL.getConfiguration());
  LOG.info("blockCacheSummary: " + bcs);

  assertTrue("blockCache summary has " + bcs.size() + " entries", bcs.size() >= 2);

  BlockCacheColumnFamilySummary e = bcs.get(bcs.size()-2);
  assertEquals("table", TEST_TABLE, e.getTable());
  assertEquals("cf", TEST_CF, e.getColumnFamily());

  e = bcs.get(bcs.size()-1);
  assertEquals("table", TEST_TABLE2, e.getTable());
  assertEquals("cf", TEST_CF, e.getColumnFamily());

  ht.close();
  ht2.close();
}
 
开发者ID:tenggyut,项目名称:HIndex,代码行数:39,代码来源:TestStoreFileBlockCacheSummary.java

示例3: getBlockCacheColumnFamilySummaries

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
@Override
public List<BlockCacheColumnFamilySummary> getBlockCacheColumnFamilySummaries()
    throws IOException {
  BlockCache c = new CacheConfig(this.conf).getBlockCache();
  return c.getBlockCacheColumnFamilySummaries(this.conf);
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:7,代码来源:HRegionServer.java

示例4: getBlockCacheColumnFamilySummaries

import org.apache.hadoop.hbase.io.hfile.BlockCache; //导入方法依赖的package包/类
@Override
public List<BlockCacheColumnFamilySummary> getBlockCacheColumnFamilySummaries() throws IOException {
  BlockCache c = new CacheConfig(this.conf).getBlockCache();
  return c.getBlockCacheColumnFamilySummaries(this.conf);
}
 
开发者ID:wanhao,项目名称:IRIndex,代码行数:6,代码来源:HRegionServer.java


注:本文中的org.apache.hadoop.hbase.io.hfile.BlockCache.getBlockCacheColumnFamilySummaries方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。