|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.accumulo.core.client.impl.ScannerOptions org.apache.accumulo.core.client.ClientSideIteratorScanner
public class ClientSideIteratorScanner
A scanner that instantiates iterators on the client side instead of on the tablet server. This can be useful for testing iterators or in cases where you
don't want iterators affecting the performance of tablet servers.
Suggested usage:
Scanner scanner = new ClientSideIteratorScanner(connector.createScanner(tableName, authorizations));
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).
Nested Class Summary | |
---|---|
class |
ClientSideIteratorScanner.ScannerTranslator
A class that wraps a Scanner in a SortedKeyValueIterator so that other accumulo iterators can use it as a source. |
Field Summary |
---|
Fields inherited from class org.apache.accumulo.core.client.impl.ScannerOptions |
---|
fetchedColumns, serverSideIteratorList, serverSideIteratorOptions, timeOut |
Constructor Summary | |
---|---|
ClientSideIteratorScanner(Scanner scanner)
Constructs a scanner that can execute client-side iterators. |
Method Summary | |
---|---|
void |
disableIsolation()
Disables row isolation. |
void |
enableIsolation()
Enables row isolation. |
int |
getBatchSize()
Returns the batch size (number of Key/Value pairs) that will be fetched at a time from a tablet server. |
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 |
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. |
Methods inherited from class org.apache.accumulo.core.client.impl.ScannerOptions |
---|
addScanIterator, clearColumns, clearScanIterators, close, fetchColumn, fetchColumn, fetchColumnFamily, getFetchedColumns, getTimeout, removeScanIterator, setOptions, setTimeout, updateScanIteratorOption |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.accumulo.core.client.ScannerBase |
---|
addScanIterator, clearColumns, clearScanIterators, close, fetchColumn, fetchColumnFamily, getTimeout, removeScanIterator, setTimeout, updateScanIteratorOption |
Constructor Detail |
---|
public ClientSideIteratorScanner(Scanner scanner)
scanner
- the source scannerMethod Detail |
---|
public void setSource(Scanner scanner)
public Iterator<Map.Entry<Key,Value>> iterator()
ScannerBase
iterator
in interface Iterable<Map.Entry<Key,Value>>
iterator
in interface ScannerBase
iterator
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
setRange
in interface Scanner
range
- key range to begin and end scanpublic Range getRange()
Scanner
getRange
in interface 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 batch
getReadaheadThreshold
in interface Scanner
public void setReadaheadThreshold(long batches)
Scanner
Scanner
will begin to prefetch the next batch
setReadaheadThreshold
in interface Scanner
batches
- Non-negative number of batches
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |