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


Java DataBlockEncoding.PREFIX属性代码示例

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


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

示例1: majorCompactionWithDataBlockEncoding

public void majorCompactionWithDataBlockEncoding(boolean inCacheOnly)
    throws Exception {
  Map<Store, HFileDataBlockEncoder> replaceBlockCache =
      new HashMap<Store, HFileDataBlockEncoder>();
  for (Store store : r.getStores()) {
    HFileDataBlockEncoder blockEncoder = store.getDataBlockEncoder();
    replaceBlockCache.put(store, blockEncoder);
    final DataBlockEncoding inCache = DataBlockEncoding.PREFIX;
    final DataBlockEncoding onDisk = inCacheOnly ? DataBlockEncoding.NONE :
        inCache;
    ((HStore)store).setDataBlockEncoderInTest(new HFileDataBlockEncoderImpl(onDisk));
  }

  majorCompaction();

  // restore settings
  for (Entry<Store, HFileDataBlockEncoder> entry : replaceBlockCache.entrySet()) {
    ((HStore)entry.getKey()).setDataBlockEncoderInTest(entry.getValue());
  }
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:20,代码来源:TestMajorCompaction.java

示例2: majorCompactionWithDataBlockEncoding

public void majorCompactionWithDataBlockEncoding(boolean inCacheOnly) throws Exception {
  Map<Store, HFileDataBlockEncoder> replaceBlockCache =
      new HashMap<Store, HFileDataBlockEncoder>();
  for (Entry<byte[], Store> pair : r.getStores().entrySet()) {
    Store store = pair.getValue();
    HFileDataBlockEncoder blockEncoder = store.getDataBlockEncoder();
    replaceBlockCache.put(pair.getValue(), blockEncoder);
    final DataBlockEncoding inCache = DataBlockEncoding.PREFIX;
    final DataBlockEncoding onDisk = inCacheOnly ? DataBlockEncoding.NONE : inCache;
    store.setDataBlockEncoderInTest(new HFileDataBlockEncoderImpl(onDisk, inCache));
  }

  majorCompaction();

  // restore settings
  for (Entry<Store, HFileDataBlockEncoder> entry : replaceBlockCache.entrySet()) {
    entry.getKey().setDataBlockEncoderInTest(entry.getValue());
  }
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:19,代码来源:TestCompaction.java

示例3: majorCompactionWithDataBlockEncoding

public void majorCompactionWithDataBlockEncoding(boolean inCacheOnly)
    throws Exception {
  Map<HStore, HFileDataBlockEncoder> replaceBlockCache =
      new HashMap<HStore, HFileDataBlockEncoder>();
  for (Entry<byte[], Store> pair : r.getStores().entrySet()) {
    HStore store = (HStore) pair.getValue();
    HFileDataBlockEncoder blockEncoder = store.getDataBlockEncoder();
    replaceBlockCache.put(store, blockEncoder);
    final DataBlockEncoding inCache = DataBlockEncoding.PREFIX;
    final DataBlockEncoding onDisk = inCacheOnly ? DataBlockEncoding.NONE :
        inCache;
    store.setDataBlockEncoderInTest(new HFileDataBlockEncoderImpl(onDisk));
  }

  majorCompaction();

  // restore settings
  for (Entry<HStore, HFileDataBlockEncoder> entry :
      replaceBlockCache.entrySet()) {
    entry.getKey().setDataBlockEncoderInTest(entry.getValue());
  }
}
 
开发者ID:grokcoder,项目名称:pbase,代码行数:22,代码来源:TestMajorCompaction.java

示例4: TestMultiColumnScanner

public TestMultiColumnScanner(Compression.Algorithm comprAlgo,
    BloomType bloomType, boolean useDataBlockEncoding) {
  this.comprAlgo = comprAlgo;
  this.bloomType = bloomType;
  this.dataBlockEncoding = useDataBlockEncoding ? DataBlockEncoding.PREFIX :
      DataBlockEncoding.NONE;
}
 
开发者ID:fengchen8086,项目名称:ditb,代码行数:7,代码来源:TestMultiColumnScanner.java

示例5: TestMultiColumnScanner

public TestMultiColumnScanner(Compression.Algorithm comprAlgo,
    StoreFile.BloomType bloomType, boolean useDataBlockEncoding) {
  this.comprAlgo = comprAlgo;
  this.bloomType = bloomType;
  this.dataBlockEncoding = useDataBlockEncoding ? DataBlockEncoding.PREFIX :
      DataBlockEncoding.NONE;
}
 
开发者ID:fengchen8086,项目名称:LCIndex-HBase-0.94.16,代码行数:7,代码来源:TestMultiColumnScanner.java


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