public IsolatedScanner(Scanner scanner, RowBufferFactory bufferFactory) { this.scanner = scanner; this.range = scanner.getRange(); this.timeOut = scanner.getTimeout(TimeUnit.MILLISECONDS); this.batchTimeOut = scanner.getBatchTimeout(TimeUnit.MILLISECONDS); this.batchSize = scanner.getBatchSize(); this.readaheadThreshold = scanner.getReadaheadThreshold(); this.bufferFactory = bufferFactory; }
/** * Constructs a scanner that can execute client-side iterators. * * @param scanner * the source scanner */ public ClientSideIteratorScanner(final Scanner scanner) { smi = new ScannerTranslatorImpl(scanner, scanner.getSamplerConfiguration()); this.range = scanner.getRange(); this.size = scanner.getBatchSize(); this.timeOut = scanner.getTimeout(TimeUnit.MILLISECONDS); this.batchTimeOut = scanner.getTimeout(TimeUnit.MILLISECONDS); this.readaheadThreshold = scanner.getReadaheadThreshold(); SamplerConfiguration samplerConfig = scanner.getSamplerConfiguration(); if (samplerConfig != null) setSamplerConfiguration(samplerConfig); }
private int findMaxDepth(Scanner scanner) { // do binary search to find max depth int origBatchSize = scanner.getBatchSize(); scanner.setBatchSize(100); int depth = findMaxDepth(scanner, 0, 64, 999); scanner.setBatchSize(origBatchSize); return depth; }
public IsolatedScanner(Scanner scanner, RowBufferFactory bufferFactory) { this.scanner = scanner; this.range = scanner.getRange(); this.timeOut = scanner.getTimeout(TimeUnit.MILLISECONDS); this.batchTimeOut = scanner.getBatchTimeout(TimeUnit.MILLISECONDS); this.batchSize = scanner.getBatchSize(); this.readaheadThreshold = scanner.getReadaheadThreshold(); this.bufferFactory = bufferFactory; }
/** * Constructs a scanner that can execute client-side iterators. * * @param scanner * the source scanner */ public ClientSideIteratorScanner(final Scanner scanner) { smi = new ScannerTranslatorImpl(scanner, scanner.getSamplerConfiguration()); this.range = scanner.getRange(); this.size = scanner.getBatchSize(); this.timeOut = scanner.getTimeout(TimeUnit.MILLISECONDS); this.batchTimeOut = scanner.getTimeout(TimeUnit.MILLISECONDS); this.readaheadThreshold = scanner.getReadaheadThreshold(); SamplerConfiguration samplerConfig = scanner.getSamplerConfiguration(); if (samplerConfig != null) setSamplerConfiguration(samplerConfig); }