Package org.apache.accumulo.core.client
Interface Scanner
- All Superinterfaces:
- AutoCloseable,- Iterable<Map.Entry<Key,,- Value>> - ScannerBase
- All Known Implementing Classes:
- ClientSideIteratorScanner,- IsolatedScanner
Scans a table over a given range.
 "Clients can iterate over multiple column families, and there are several mechanisms for limiting
 the rows, columns, and timestamps traversed by a scan. For example, we could restrict [a] scan
 ... to only produce anchors whose columns match [a] regular expression ..., or to only produce
 anchors whose timestamps fall within ten days of the current time."
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.apache.accumulo.core.client.ScannerBaseScannerBase.ConsistencyLevel
- 
Method SummaryModifier and TypeMethodDescriptionvoidDisables row isolation.voidEnables row isolation.intReturns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.getRange()Returns the range of keys to scan over.longThe number of batches of Key/Value pairs returned before theScannerwill begin to prefetch the next batchvoidsetBatchSize(int size) Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.voidSets the range of keys to scan over.voidsetReadaheadThreshold(long batches) Sets the number of batches of Key/Value pairs returned before theScannerwill begin to prefetch the next batchMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface org.apache.accumulo.core.client.ScannerBaseaddScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, close, fetchColumn, fetchColumn, fetchColumn, fetchColumnFamily, fetchColumnFamily, forEach, getAuthorizations, getBatchTimeout, getClassLoaderContext, getConsistencyLevel, getSamplerConfiguration, getTimeout, iterator, removeScanIterator, setBatchTimeout, setClassLoaderContext, setConsistencyLevel, setExecutionHints, setSamplerConfiguration, setTimeout, stream, updateScanIteratorOption
- 
Method Details- 
setRangeSets the range of keys to scan over.- Parameters:
- range- key range to begin and end scan
 
- 
getRangeRange getRange()Returns the range of keys to scan over.- Returns:
- the range configured for this scanner
 
- 
setBatchSizevoid setBatchSize(int size) Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.- Parameters:
- size- the number of Key/Value pairs to fetch per call to Accumulo
 
- 
getBatchSizeint getBatchSize()Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.- Returns:
- the batch size configured for this scanner
 
- 
enableIsolationvoid enableIsolation()Enables row isolation. Writes that occur to a row after a scan of that row has begun will not be seen if this option is enabled.
- 
disableIsolationvoid disableIsolation()Disables row isolation. Writes that occur to a row after a scan of that row has begun may be seen if this option is enabled.
- 
getReadaheadThresholdlong getReadaheadThreshold()The number of batches of Key/Value pairs returned before theScannerwill begin to prefetch the next batch- Returns:
- Number of batches before read-ahead begins
- Since:
- 1.6.0
 
- 
setReadaheadThresholdvoid setReadaheadThreshold(long batches) Sets the number of batches of Key/Value pairs returned before theScannerwill begin to prefetch the next batch- Parameters:
- batches- Non-negative number of batches
- Since:
- 1.6.0
 
 
-