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

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

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

HStore.determineTTLFromFamily介绍

暂无

代码示例

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

  1. /**
  2. * Creates a store scanner.
  3. * @param filesToCompact The files to be compacted.
  4. * @param scanType The scan type.
  5. * @return The store scanner.
  6. * @throws IOException if IO failure is encountered
  7. */
  8. private StoreScanner createScanner(List<HStoreFile> filesToCompact, ScanType scanType)
  9. throws IOException {
  10. List<StoreFileScanner> scanners = StoreFileScanner.getScannersForStoreFiles(filesToCompact,
  11. false, true, false, false, HConstants.LATEST_TIMESTAMP);
  12. long ttl = HStore.determineTTLFromFamily(column);
  13. ScanInfo scanInfo = new ScanInfo(conf, column, ttl, 0, CellComparator.getInstance());
  14. return new StoreScanner(scanInfo, scanType, scanners);
  15. }

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

  1. /**
  2. * Gets the number of del cell in the del files
  3. * @param paths the del file paths
  4. * @return the cell size
  5. */
  6. private int countDelCellsInDelFiles(List<Path> paths) throws IOException {
  7. List<HStoreFile> sfs = new ArrayList<>();
  8. int size = 0;
  9. for (Path path : paths) {
  10. HStoreFile sf = new HStoreFile(fs, path, conf, cacheConf, BloomType.NONE, true);
  11. sfs.add(sf);
  12. }
  13. List<KeyValueScanner> scanners = new ArrayList<>(StoreFileScanner.getScannersForStoreFiles(sfs,
  14. false, true, false, false, HConstants.LATEST_TIMESTAMP));
  15. long timeToPurgeDeletes = Math.max(conf.getLong("hbase.hstore.time.to.purge.deletes", 0), 0);
  16. long ttl = HStore.determineTTLFromFamily(hcd);
  17. ScanInfo scanInfo = new ScanInfo(conf, hcd, ttl, timeToPurgeDeletes, CellComparatorImpl.COMPARATOR);
  18. StoreScanner scanner = new StoreScanner(scanInfo, ScanType.COMPACT_RETAIN_DELETES, scanners);
  19. List<Cell> results = new ArrayList<>();
  20. boolean hasMore = true;
  21. while (hasMore) {
  22. hasMore = scanner.next(results);
  23. size += results.size();
  24. results.clear();
  25. }
  26. scanner.close();
  27. return size;
  28. }

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

  1. LOG.trace("Time to purge deletes set to {}ms in store {}", timeToPurgeDeletes, this);
  2. long ttl = determineTTLFromFamily(family);

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

  1. false, false, HConstants.LATEST_TIMESTAMP);
  2. long timeToPurgeDeletes = Math.max(conf.getLong("hbase.hstore.time.to.purge.deletes", 0), 0);
  3. long ttl = HStore.determineTTLFromFamily(hcd);
  4. ScanInfo scanInfo = new ScanInfo(copyOfConf, hcd, ttl, timeToPurgeDeletes,
  5. CellComparatorImpl.COMPARATOR);

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

  1. /**
  2. * Gets the number of del cell in the del files
  3. * @param paths the del file paths
  4. * @return the cell size
  5. */
  6. private int countDelCellsInDelFiles(List<Path> paths) throws IOException {
  7. List<HStoreFile> sfs = new ArrayList<>();
  8. int size = 0;
  9. for (Path path : paths) {
  10. HStoreFile sf = new HStoreFile(fs, path, conf, cacheConf, BloomType.NONE, true);
  11. sfs.add(sf);
  12. }
  13. List<KeyValueScanner> scanners = new ArrayList<>(StoreFileScanner.getScannersForStoreFiles(sfs,
  14. false, true, false, false, HConstants.LATEST_TIMESTAMP));
  15. long timeToPurgeDeletes = Math.max(conf.getLong("hbase.hstore.time.to.purge.deletes", 0), 0);
  16. long ttl = HStore.determineTTLFromFamily(hcd);
  17. ScanInfo scanInfo = new ScanInfo(conf, hcd, ttl, timeToPurgeDeletes, CellComparatorImpl.COMPARATOR);
  18. StoreScanner scanner = new StoreScanner(scanInfo, ScanType.COMPACT_RETAIN_DELETES, scanners);
  19. List<Cell> results = new ArrayList<>();
  20. boolean hasMore = true;
  21. while (hasMore) {
  22. hasMore = scanner.next(results);
  23. size += results.size();
  24. results.clear();
  25. }
  26. scanner.close();
  27. return size;
  28. }

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

  1. false, false, HConstants.LATEST_TIMESTAMP);
  2. long timeToPurgeDeletes = Math.max(conf.getLong("hbase.hstore.time.to.purge.deletes", 0), 0);
  3. long ttl = HStore.determineTTLFromFamily(hcd);
  4. ScanInfo scanInfo = new ScanInfo(copyOfConf, hcd, ttl, timeToPurgeDeletes,
  5. CellComparatorImpl.COMPARATOR);

代码示例来源:origin: harbby/presto-connectors

  1. "ms in store " + this);
  2. long ttl = determineTTLFromFamily(family);

相关文章

HStore类方法