Package org.apache.accumulo.core.client
Class IsolatedScanner
java.lang.Object
org.apache.accumulo.core.client.impl.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.client.impl.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
Modifier and TypeClassDescriptionstatic class
static class
static interface
static interface
-
Field Summary
Fields inherited from class org.apache.accumulo.core.client.impl.ScannerOptions
batchTimeout, classLoaderContext, fetchedColumns, retryTimeout, serverSideIteratorList, serverSideIteratorOptions
-
Constructor Summary
ConstructorDescriptionIsolatedScanner
(Scanner scanner) IsolatedScanner
(Scanner scanner, IsolatedScanner.RowBufferFactory bufferFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Disables row isolation.void
Enables row isolation.int
Returns 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.long
The number of batches of Key/Value pairs returned before theScanner
will begin to prefetch the next batchint
Deprecated.iterator()
Returns an iterator over an accumulo table.void
setBatchSize
(int size) Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.void
Sets the range of keys to scan over.void
setReadaheadThreshold
(long batches) Sets the number of batches of Key/Value pairs returned before theScanner
will begin to prefetch the next batchvoid
setTimeOut
(int timeOut) Deprecated.Methods inherited from class org.apache.accumulo.core.client.impl.ScannerOptions
addScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, close, fetchColumn, fetchColumn, fetchColumnFamily, getAuthorizations, getBatchTimeout, getClassLoaderContext, getFetchedColumns, getSamplerConfiguration, getTimeout, removeScanIterator, setBatchTimeout, setClassLoaderContext, setOptions, setSamplerConfiguration, setTimeout, updateScanIteratorOption
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.accumulo.core.client.ScannerBase
addScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, close, fetchColumn, fetchColumn, fetchColumnFamily, getAuthorizations, getBatchTimeout, getClassLoaderContext, getSamplerConfiguration, getTimeout, removeScanIterator, setBatchTimeout, setClassLoaderContext, setSamplerConfiguration, setTimeout, updateScanIteratorOption
-
Constructor Details
-
IsolatedScanner
-
IsolatedScanner
-
-
Method Details
-
iterator
Description copied from interface:ScannerBase
Returns 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.
-
setTimeOut
Deprecated.Description copied from interface:Scanner
This setting determines how long a scanner will automatically retry when a failure occurs. By default a scanner will retry forever.- Specified by:
setTimeOut
in interfaceScanner
- Parameters:
timeOut
- in seconds
-
getTimeOut
Deprecated.Description copied from interface:Scanner
Returns the setting for how long a scanner will automatically retry when a failure occurs.- Specified by:
getTimeOut
in interfaceScanner
- Returns:
- the timeout configured for this scanner
-
setRange
Description copied from interface:Scanner
Sets the range of keys to scan over. -
getRange
Description copied from interface:Scanner
Returns the range of keys to scan over. -
setBatchSize
public void setBatchSize(int size) Description copied from interface:Scanner
Sets the number of Key/Value pairs that will be fetched at a time from a tablet server.- Specified by:
setBatchSize
in interfaceScanner
- Parameters:
size
- the number of Key/Value pairs to fetch per call to Accumulo
-
getBatchSize
public int getBatchSize()Description copied from interface:Scanner
Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server.- Specified by:
getBatchSize
in interfaceScanner
- Returns:
- the batch size configured for this scanner
-
enableIsolation
public void enableIsolation()Description copied from interface:Scanner
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.- Specified by:
enableIsolation
in interfaceScanner
-
disableIsolation
public void disableIsolation()Description copied from interface:Scanner
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.- Specified by:
disableIsolation
in interfaceScanner
-
getReadaheadThreshold
public long getReadaheadThreshold()Description copied from interface:Scanner
The number of batches of Key/Value pairs returned before theScanner
will begin to prefetch the next batch- Specified by:
getReadaheadThreshold
in interfaceScanner
- Returns:
- Number of batches before read-ahead begins
-
setReadaheadThreshold
public void setReadaheadThreshold(long batches) Description copied from interface:Scanner
Sets the number of batches of Key/Value pairs returned before theScanner
will begin to prefetch the next batch- Specified by:
setReadaheadThreshold
in interfaceScanner
- Parameters:
batches
- Non-negative number of batches
-