Package org.apache.accumulo.core.client
Class IsolatedScanner
java.lang.Object
org.apache.accumulo.core.clientImpl.ScannerOptions
org.apache.accumulo.core.client.IsolatedScanner
- All Implemented Interfaces:
AutoCloseable,Iterable<Map.Entry<Key,,Value>> Scanner,ScannerBase
public class IsolatedScanner
extends org.apache.accumulo.core.clientImpl.ScannerOptions
implements Scanner
A scanner that presents a row isolated view of an accumulo table. Rows are buffered in memory on
the client side. If you think your rows may not fit into memory, then you can provide an
alternative row buffer factory to the constructor. This would allow rows to be buffered to disk
for example.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic interfacestatic interfaceNested classes/interfaces inherited from interface org.apache.accumulo.core.client.ScannerBase
ScannerBase.ConsistencyLevel -
Field Summary
Fields inherited from class org.apache.accumulo.core.clientImpl.ScannerOptions
batchTimeout, classLoaderContext, executionHints, fetchedColumns, retryTimeout, serverSideIteratorList, serverSideIteratorOptions -
Constructor Summary
ConstructorsConstructorDescriptionIsolatedScanner(Scanner scanner) IsolatedScanner(Scanner scanner, IsolatedScanner.RowBufferFactory bufferFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes any underlying connections on the scanner.voidDisables 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 batchiterator()Returns an iterator over an accumulo table.voidsetBatchSize(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 class org.apache.accumulo.core.clientImpl.ScannerOptions
addScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, fetchColumn, fetchColumn, fetchColumnFamily, getAuthorizations, getBatchTimeout, getClassLoaderContext, getConsistencyLevel, getFetchedColumns, getSamplerConfiguration, getTimeout, removeScanIterator, setBatchTimeout, setClassLoaderContext, setConsistencyLevel, setExecutionHints, setOptions, setSamplerConfiguration, setTimeout, updateScanIteratorOptionMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.apache.accumulo.core.client.ScannerBase
addScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, fetchColumn, fetchColumn, fetchColumn, fetchColumnFamily, fetchColumnFamily, forEach, getAuthorizations, getBatchTimeout, getClassLoaderContext, getConsistencyLevel, getSamplerConfiguration, getTimeout, removeScanIterator, setBatchTimeout, setClassLoaderContext, setConsistencyLevel, setExecutionHints, setSamplerConfiguration, setTimeout, stream, updateScanIteratorOption
-
Constructor Details
-
IsolatedScanner
-
IsolatedScanner
-
-
Method Details
-
iterator
Description copied from interface:ScannerBaseReturns an iterator over an accumulo table. This iterator uses the options that are currently set for its lifetime, so setting options will have no effect on existing iterators.Keys returned by the iterator are not guaranteed to be in sorted order.
-
setRange
Description copied from interface:ScannerSets the range of keys to scan over. -
getRange
Description copied from interface:ScannerReturns the range of keys to scan over. -
setBatchSize
public void setBatchSize(int size) Description copied from interface:ScannerSets the number of Key/Value pairs that will be fetched at a time from a tablet server.- Specified by:
setBatchSizein interfaceScanner- Parameters:
size- the number of Key/Value pairs to fetch per call to Accumulo
-
getBatchSize
public int getBatchSize()Description copied from interface:ScannerReturns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.- Specified by:
getBatchSizein interfaceScanner- Returns:
- the batch size configured for this scanner
-
enableIsolation
public void enableIsolation()Description copied from interface:ScannerEnables 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.- Specified by:
enableIsolationin interfaceScanner
-
disableIsolation
public void disableIsolation()Description copied from interface:ScannerDisables row isolation. Writes that occur to a row after a scan of that row has begun may be seen if this option is enabled.- Specified by:
disableIsolationin interfaceScanner
-
getReadaheadThreshold
public long getReadaheadThreshold()Description copied from interface:ScannerThe number of batches of Key/Value pairs returned before theScannerwill begin to prefetch the next batch- Specified by:
getReadaheadThresholdin interfaceScanner- Returns:
- Number of batches before read-ahead begins
-
setReadaheadThreshold
public void setReadaheadThreshold(long batches) Description copied from interface:ScannerSets the number of batches of Key/Value pairs returned before theScannerwill begin to prefetch the next batch- Specified by:
setReadaheadThresholdin interfaceScanner- Parameters:
batches- Non-negative number of batches
-
close
public void close()Description copied from interface:ScannerBaseCloses any underlying connections on the scanner. This may invalidate any iterators derived from the Scanner, causing them to throw exceptions.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceScannerBase- Overrides:
closein classorg.apache.accumulo.core.clientImpl.ScannerOptions
-