org.apache.hadoop.hbase.regionserver.HStore.doCompaction()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中org.apache.hadoop.hbase.regionserver.HStore.doCompaction()方法的一些代码示例,展示了HStore.doCompaction()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HStore.doCompaction()方法的具体详情如下:
包路径:org.apache.hadoop.hbase.regionserver.HStore
类名称:HStore
方法名:doCompaction

HStore.doCompaction介绍

暂无

代码示例

代码示例来源:origin: apache/hbase

  1. @Override
  2. protected List<HStoreFile> doCompaction(CompactionRequestImpl cr,
  3. Collection<HStoreFile> filesToCompact, User user, long compactionStartTime,
  4. List<Path> newFiles) throws IOException {
  5. // let compaction incomplete.
  6. if (!this.conf.getBoolean("hbase.hstore.compaction.complete", true)) {
  7. LOG.warn("hbase.hstore.compaction.complete is set to false");
  8. List<HStoreFile> sfs = new ArrayList<>(newFiles.size());
  9. final boolean evictOnClose =
  10. cacheConf != null? cacheConf.shouldEvictOnClose(): true;
  11. for (Path newFile : newFiles) {
  12. // Create storefile around what we wrote with a reader on it.
  13. HStoreFile sf = createStoreFileAndReader(newFile);
  14. sf.closeStoreFile(evictOnClose);
  15. sfs.add(sf);
  16. }
  17. return sfs;
  18. }
  19. return super.doCompaction(cr, filesToCompact, user, compactionStartTime, newFiles);
  20. }
  21. }

代码示例来源:origin: apache/hbase

  1. TraditionalBinaryPrefix.long2String(cr.getSize(), "", 1));
  2. return doCompaction(cr, filesToCompact, user, compactionStartTime,
  3. compaction.compact(throughputController, user));
  4. } finally {

代码示例来源:origin: org.apache.hbase/hbase-server

  1. @Override
  2. protected List<HStoreFile> doCompaction(CompactionRequestImpl cr,
  3. Collection<HStoreFile> filesToCompact, User user, long compactionStartTime,
  4. List<Path> newFiles) throws IOException {
  5. // let compaction incomplete.
  6. if (!this.conf.getBoolean("hbase.hstore.compaction.complete", true)) {
  7. LOG.warn("hbase.hstore.compaction.complete is set to false");
  8. List<HStoreFile> sfs = new ArrayList<>(newFiles.size());
  9. final boolean evictOnClose =
  10. cacheConf != null? cacheConf.shouldEvictOnClose(): true;
  11. for (Path newFile : newFiles) {
  12. // Create storefile around what we wrote with a reader on it.
  13. HStoreFile sf = createStoreFileAndReader(newFile);
  14. sf.closeStoreFile(evictOnClose);
  15. sfs.add(sf);
  16. }
  17. return sfs;
  18. }
  19. return super.doCompaction(cr, filesToCompact, user, compactionStartTime, newFiles);
  20. }
  21. }

相关文章

HStore类方法