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 |
Modifier | Constructor and Description |
---|---|
protected |
ScannerOptions() |
|
ScannerOptions(ScannerOptions so) |
Modifier and Type | Method and Description |
---|---|
void |
addScanIterator(IteratorSetting si)
Adds server-side scan iterators.
|
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 |
fetchColumn(Column column) |
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)
Limit a scan to the specified column family.
|
SortedSet<Column> |
getFetchedColumns() |
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.
|
void |
setColumnFamilyRegex(String regex)
Deprecated.
since 1.4, use
addScanIterator(IteratorSetting) |
void |
setColumnQualifierRegex(String regex)
Deprecated.
since 1.4, use
addScanIterator(IteratorSetting) |
protected static void |
setOptions(ScannerOptions dst,
ScannerOptions src) |
void |
setRowRegex(String regex)
Deprecated.
since 1.4, use
addScanIterator(IteratorSetting) |
void |
setScanIteratorOption(String iteratorName,
String key,
String value)
Deprecated.
since 1.4, use
updateScanIteratorOption(String, String, String) |
void |
setScanIterators(int priority,
String iteratorClass,
String iteratorName)
Deprecated.
since 1.4, use
addScanIterator(IteratorSetting) |
void |
setupRegex(String iteratorName,
int iteratorPriority)
Deprecated.
since 1.4, use
addScanIterator(IteratorSetting) |
void |
setValueRegex(String regex)
Deprecated.
since 1.4, use
addScanIterator(IteratorSetting) |
void |
updateScanIteratorOption(String iteratorName,
String key,
String value)
Override any existing options on the given named iterator
|
protected ScannerOptions()
public ScannerOptions(ScannerOptions so)
public void addScanIterator(IteratorSetting si)
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 setScanIterators(int priority, String iteratorClass, String iteratorName)
addScanIterator(IteratorSetting)
setScanIterators
in interface ScannerBase
public void setScanIteratorOption(String iteratorName, String key, String value)
updateScanIteratorOption(String, String, String)
setScanIteratorOption
in interface ScannerBase
public void updateScanIteratorOption(String iteratorName, String key, String value)
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 setupRegex(String iteratorName, int iteratorPriority) throws IOException
addScanIterator(IteratorSetting)
setupRegex
in interface ScannerBase
iteratorName
- a nickname for the iteratoriteratorPriority
- determines the order in which iterators are applied (system iterators are always applied first, then per-table and scan-time, lowest first)IOException
- if an exception occurs reading from the iterator stackRegExFilter
public void setRowRegex(String regex)
addScanIterator(IteratorSetting)
setRowRegex
in interface ScannerBase
regex
- java regular expression to matchRegExFilter
public void setColumnFamilyRegex(String regex)
addScanIterator(IteratorSetting)
setColumnFamilyRegex
in interface ScannerBase
regex
- java regular expression to matchRegExFilter
public void setColumnQualifierRegex(String regex)
addScanIterator(IteratorSetting)
setColumnQualifierRegex
in interface ScannerBase
regex
- java regular expression to matchRegExFilter
public void setValueRegex(String regex)
addScanIterator(IteratorSetting)
setValueRegex
in interface ScannerBase
regex
- java regular expression to matchRegExFilter
public void fetchColumnFamily(org.apache.hadoop.io.Text col)
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(Column column)
public void clearColumns()
ScannerBase
clearColumns
in interface ScannerBase
public void clearScanIterators()
clearScanIterators
in interface ScannerBase
protected static void setOptions(ScannerOptions dst, ScannerOptions src)
public Iterator<Map.Entry<Key,Value>> iterator()
ScannerBase
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.