public class ClientSideIteratorScanner extends ScannerOptions implements Scanner
Suggested usage:
Scanner scanner = client.createScanner(tableName, authorizations);
scanner = new ClientSideIteratorScanner(scanner);
Iterators added to this scanner will be run in the client JVM. Separate scan iterators can be run on the server side and client side by adding iterators to the source scanner (which will execute server side) and to the client side scanner (which will execute client side).
batchTimeOut, classLoaderContext, executionHints, fetchedColumns, serverSideIteratorList, serverSideIteratorOptions, timeOut
Constructor and Description |
---|
ClientSideIteratorScanner(Scanner scanner)
Constructs a scanner that can execute client-side iterators.
|
Modifier and Type | Method and Description |
---|---|
void |
clearIteratorSamplerConfiguration()
Clear any iterator sampler configuration.
|
void |
disableIsolation()
Disables row isolation.
|
void |
enableIsolation()
Enables row isolation.
|
Authorizations |
getAuthorizations()
Returns the authorizations that have been set on the scanner
|
int |
getBatchSize()
Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet
server.
|
SamplerConfiguration |
getIteratorSamplerConfiguration() |
Range |
getRange()
Returns the range of keys to scan over.
|
long |
getReadaheadThreshold()
The number of batches of Key/Value pairs returned before the
Scanner will begin to
prefetch the next batch |
int |
getTimeOut()
Deprecated.
|
Iterator<Map.Entry<Key,Value>> |
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 |
setIteratorSamplerConfiguration(SamplerConfiguration sc)
This is provided for the case where no sampler configuration is set on the scanner, but there
is a need to create iterator deep copies that have sampling enabled.
|
void |
setRange(Range range)
Sets the range of keys to scan over.
|
void |
setReadaheadThreshold(long batches)
Sets the number of batches of Key/Value pairs returned before the
Scanner will begin to
prefetch the next batch |
void |
setSource(Scanner scanner)
Sets the source Scanner.
|
void |
setTimeOut(int timeOut)
Deprecated.
|
addScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, close, fetchColumn, fetchColumn, fetchColumnFamily, getBatchTimeout, getClassLoaderContext, getFetchedColumns, getSamplerConfiguration, getTimeout, removeScanIterator, setBatchTimeout, setClassLoaderContext, setExecutionHints, setOptions, setSamplerConfiguration, setTimeout, updateScanIteratorOption
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addScanIterator, clearClassLoaderContext, clearColumns, clearSamplerConfiguration, clearScanIterators, close, fetchColumn, fetchColumn, fetchColumnFamily, getBatchTimeout, getClassLoaderContext, getSamplerConfiguration, getTimeout, removeScanIterator, setBatchTimeout, setClassLoaderContext, setExecutionHints, setSamplerConfiguration, setTimeout, updateScanIteratorOption
forEach, spliterator
public ClientSideIteratorScanner(Scanner scanner)
scanner
- the source scannerpublic void setSource(Scanner scanner)
public Iterator<Map.Entry<Key,Value>> iterator()
ScannerBase
Keys returned by the iterator are not guaranteed to be in sorted order.
iterator
in interface Iterable<Map.Entry<Key,Value>>
iterator
in interface ScannerBase
iterator
in class ScannerOptions
public Authorizations getAuthorizations()
ScannerBase
getAuthorizations
in interface ScannerBase
getAuthorizations
in class ScannerOptions
@Deprecated public void setTimeOut(int timeOut)
Scanner
setTimeOut
in interface Scanner
timeOut
- in seconds@Deprecated public int getTimeOut()
Scanner
getTimeOut
in interface Scanner
public void setRange(Range range)
Scanner
public Range getRange()
Scanner
public void setBatchSize(int size)
Scanner
setBatchSize
in interface Scanner
size
- the number of Key/Value pairs to fetch per call to Accumulopublic int getBatchSize()
Scanner
getBatchSize
in interface Scanner
public void enableIsolation()
Scanner
enableIsolation
in interface Scanner
public void disableIsolation()
Scanner
disableIsolation
in interface Scanner
public long getReadaheadThreshold()
Scanner
Scanner
will begin to
prefetch the next batchgetReadaheadThreshold
in interface Scanner
public void setReadaheadThreshold(long batches)
Scanner
Scanner
will begin to
prefetch the next batchsetReadaheadThreshold
in interface Scanner
batches
- Non-negative number of batchespublic void setIteratorSamplerConfiguration(SamplerConfiguration sc)
Setting this differently than the scanners sampler configuration may cause exceptions.
public void clearIteratorSamplerConfiguration()
public SamplerConfiguration getIteratorSamplerConfiguration()
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.