public class ScannerOptions extends Object implements ScannerBase
Modifier and Type | Field and Description |
---|---|
protected SortedSet<Column> |
fetchedColumns |
protected List<IterInfo> |
serverSideIteratorList |
protected Map<String,Map<String,String>> |
serverSideIteratorOptions |
protected long |
timeOut |
Modifier | Constructor and Description |
---|---|
protected |
ScannerOptions() |
|
ScannerOptions(ScannerOptions so) |
Modifier and Type | Method and Description |
---|---|
void |
addScanIterator(IteratorSetting si)
Add a server-side scan iterator.
|
void |
clearColumns()
Clears the columns to be fetched (useful for resetting the scanner for reuse).
|
void |
clearScanIterators()
Clears scan iterators prior to returning a scanner to the pool.
|
void |
close()
Closes any underlying connections on the scanner
|
void |
fetchColumn(IteratorSetting.Column column)
Adds a column to the list of columns that will be fetch by this scanner.
|
void |
fetchColumn(org.apache.hadoop.io.Text colFam,
org.apache.hadoop.io.Text colQual)
Adds a column to the list of columns that will be fetched by this scanner.
|
void |
fetchColumnFamily(org.apache.hadoop.io.Text col)
Adds a column family to the list of columns that will be fetched by this scanner.
|
Authorizations |
getAuthorizations()
Returns the authorizations that have been set on the scanner
|
SortedSet<Column> |
getFetchedColumns() |
long |
getTimeout(TimeUnit timeunit)
Returns the setting for how long a scanner will automatically retry when a failure occurs.
|
Iterator<Map.Entry<Key,Value>> |
iterator()
Returns an iterator over an accumulo table.
|
void |
removeScanIterator(String iteratorName)
Remove an iterator from the list of iterators.
|
protected static void |
setOptions(ScannerOptions dst,
ScannerOptions src) |
void |
setTimeout(long timeout,
TimeUnit timeUnit)
This setting determines how long a scanner will automatically retry when a failure occurs.
|
void |
updateScanIteratorOption(String iteratorName,
String key,
String value)
Update the options for an iterator.
|
protected ScannerOptions()
public ScannerOptions(ScannerOptions so)
public void addScanIterator(IteratorSetting si)
ScannerBase
addScanIterator
in interface ScannerBase
si
- fully specified scan-time iterator, including all options for the iterator. Any changes to the iterator setting after this call are not propagated
to the stored iterator.public void removeScanIterator(String iteratorName)
ScannerBase
removeScanIterator
in interface ScannerBase
iteratorName
- nickname used for the iteratorpublic void updateScanIteratorOption(String iteratorName, String key, String value)
ScannerBase
updateScanIteratorOption
in interface ScannerBase
iteratorName
- the name of the iterator to changekey
- the name of the optionvalue
- the new value for the named optionpublic void fetchColumnFamily(org.apache.hadoop.io.Text col)
ScannerBase
This can help limit which locality groups are read on the server side.
fetchColumnFamily
in interface ScannerBase
col
- the column family to be fetchedpublic void fetchColumn(org.apache.hadoop.io.Text colFam, org.apache.hadoop.io.Text colQual)
ScannerBase
fetchColumn
in interface ScannerBase
colFam
- the column family of the column to be fetchedcolQual
- the column qualifier of the column to be fetchedpublic void fetchColumn(IteratorSetting.Column column)
ScannerBase
fetchColumn
in interface ScannerBase
column
- the IteratorSetting.Column
to fetchpublic void clearColumns()
ScannerBase
clearColumns
in interface ScannerBase
public void clearScanIterators()
ScannerBase
clearScanIterators
in interface ScannerBase
protected static void setOptions(ScannerOptions dst, ScannerOptions src)
public Iterator<Map.Entry<Key,Value>> iterator()
ScannerBase
Keys returned by the iterator are not guaranteed to be in sorted order.
public void setTimeout(long timeout, TimeUnit timeUnit)
ScannerBase
Setting the timeout to zero (with any time unit) or Long.MAX_VALUE
(with TimeUnit.MILLISECONDS
) means no timeout.
setTimeout
in interface ScannerBase
timeout
- the length of the timeouttimeUnit
- the units of the timeoutpublic long getTimeout(TimeUnit timeunit)
ScannerBase
getTimeout
in interface ScannerBase
public void close()
ScannerBase
close
in interface ScannerBase
public Authorizations getAuthorizations()
ScannerBase
getAuthorizations
in interface ScannerBase
Copyright © 2015 Apache Accumulo Project. All rights reserved.