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

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

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

HStore.getScanners介绍

[英]Create scanners on the given files and if needed on the memstore with no filtering based on TTL (that happens further down the line).
[中]在给定的文件上创建扫描器,如果需要的话,在memstore上创建扫描器,而不基于TTL进行过滤(这种情况会进一步发生)。

代码示例

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

/**
 * Get all scanners with no filtering based on TTL (that happens further down the line).
 * @param cacheBlocks cache the blocks or not
 * @param usePread true to use pread, false if not
 * @param isCompaction true if the scanner is created for compaction
 * @param matcher the scan query matcher
 * @param startRow the start row
 * @param stopRow the stop row
 * @param readPt the read point of the current scan
 * @return all scanners for this store
 */
public List<KeyValueScanner> getScanners(boolean cacheBlocks, boolean isGet, boolean usePread,
  boolean isCompaction, ScanQueryMatcher matcher, byte[] startRow, byte[] stopRow, long readPt)
  throws IOException {
 return getScanners(cacheBlocks, usePread, isCompaction, matcher, startRow, true, stopRow, false,
  readPt);
}

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

/**
 * Create scanners on the given files and if needed on the memstore with no filtering based on TTL
 * (that happens further down the line).
 * @param files the list of files on which the scanners has to be created
 * @param cacheBlocks cache the blocks or not
 * @param usePread true to use pread, false if not
 * @param isCompaction true if the scanner is created for compaction
 * @param matcher the scan query matcher
 * @param startRow the start row
 * @param stopRow the stop row
 * @param readPt the read point of the current scan
 * @param includeMemstoreScanner true if memstore has to be included
 * @return scanners on the given files and on the memstore if specified
 */
public List<KeyValueScanner> getScanners(List<HStoreFile> files, boolean cacheBlocks,
  boolean isGet, boolean usePread, boolean isCompaction, ScanQueryMatcher matcher,
  byte[] startRow, byte[] stopRow, long readPt, boolean includeMemstoreScanner)
  throws IOException {
 return getScanners(files, cacheBlocks, usePread, isCompaction, matcher, startRow, true, stopRow,
  false, readPt, includeMemstoreScanner);
}

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

@Override
public List<KeyValueScanner> getScanners(List<HStoreFile> files, boolean cacheBlocks,
  boolean usePread, boolean isCompaction, ScanQueryMatcher matcher, byte[] startRow,
  boolean includeStartRow, byte[] stopRow, boolean includeStopRow, long readPt,
  boolean includeMemstoreScanner) throws IOException {
 hook.getScanners(this);
 return super.getScanners(files, cacheBlocks, usePread, isCompaction, matcher, startRow, true,
  stopRow, false, readPt, includeMemstoreScanner);
}

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

@Override
public void updateReaders(List<HStoreFile> sfs, List<KeyValueScanner> memStoreScanners)
  throws IOException {
 if (CollectionUtils.isEmpty(sfs) && CollectionUtils.isEmpty(memStoreScanners)) {
  return;
 }
 flushLock.lock();
 try {
  flushed = true;
  final boolean isCompaction = false;
  boolean usePread = get || scanUsePread;
  // SEE HBASE-19468 where the flushed files are getting compacted even before a scanner
  // calls next(). So its better we create scanners here rather than next() call. Ensure
  // these scanners are properly closed() whether or not the scan is completed successfully
  // Eagerly creating scanners so that we have the ref counting ticking on the newly created
  // store files. In case of stream scanners this eager creation does not induce performance
  // penalty because in scans (that uses stream scanners) the next() call is bound to happen.
  List<KeyValueScanner> scanners = store.getScanners(sfs, cacheBlocks, get, usePread,
   isCompaction, matcher, scan.getStartRow(), scan.getStopRow(), this.readPt, false);
  flushedstoreFileScanners.addAll(scanners);
  if (!CollectionUtils.isEmpty(memStoreScanners)) {
   clearAndClose(memStoreScannersAfterFlush);
   memStoreScannersAfterFlush.addAll(memStoreScanners);
  }
 } finally {
  flushLock.unlock();
 }
 // Let the next() call handle re-creating and seeking
}

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

return null;
 return getScanners(filesToReopen, cacheBlocks, false, false, matcher, startRow,
  includeStartRow, stopRow, includeStopRow, readPt, false);
} finally {

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

store.getScanners(cacheBlocks, scanUsePread, false, matcher, scan.getStartRow(),
 scan.includeStartRow(), scan.getStopRow(), scan.includeStopRow(), this.readPt));

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

@Override
public List<KeyValueScanner> getScanners(List<HStoreFile> files, boolean cacheBlocks,
  boolean usePread, boolean isCompaction, ScanQueryMatcher matcher, byte[] startRow,
  boolean includeStartRow, byte[] stopRow, boolean includeStopRow, long readPt,
  boolean includeMemstoreScanner) throws IOException {
 hook.getScanners(this);
 return super.getScanners(files, cacheBlocks, usePread, isCompaction, matcher, startRow, true,
  stopRow, false, readPt, includeMemstoreScanner);
}

相关文章

HStore类方法