|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.accumulo.core.client.IteratorSetting
public class IteratorSetting
Configure an iterator for minc, majc, and/or scan. By default, IteratorSetting will be configured for scan. Every iterator has a priority, a name, a class, a set of scopes, and configuration parameters. A typical use case configured for scan:
IteratorSetting cfg = new IteratorSetting(priority, "myIter", MyIterator.class); MyIterator.addOption(cfg, 42); scanner.addScanIterator(cfg);
Nested Class Summary | |
---|---|
static class |
IteratorSetting.Column
A convenience class for passing column family and column qualifiers to iterator configuration methods. |
Constructor Summary | |
---|---|
IteratorSetting(DataInput din)
|
|
IteratorSetting(int priority,
Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass)
Constructs an iterator setting using the given class's SimpleName for the iterator name. |
|
IteratorSetting(int priority,
Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass,
Map<String,String> properties)
Constructs an iterator setting using the given class's SimpleName for the iterator name and configured for the specified scopes with the specified parameters. |
|
IteratorSetting(int priority,
String name,
Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass)
Constructs an iterator setting configured for the scan scope with no parameters. |
|
IteratorSetting(int priority,
String name,
String iteratorClass)
Constructs an iterator setting configured for the scan scope with no parameters. |
|
IteratorSetting(int priority,
String name,
String iteratorClass,
Map<String,String> properties)
Constructs an iterator setting configured for the specified scopes with the specified parameters. |
Method Summary | |
---|---|
void |
addOption(String option,
String value)
Add another option to the iterator. |
void |
addOptions(Map<String,String> properties)
Add many options to the iterator. |
void |
addOptions(Set<Map.Entry<String,String>> propertyEntries)
Add many options to the iterator. |
void |
clearOptions()
Remove all options from the iterator. |
String |
getIteratorClass()
Get the name of the class that implements the iterator. |
String |
getName()
Get the iterator's name. |
Map<String,String> |
getOptions()
Get the configuration parameters for this iterator. |
int |
getPriority()
Get layer at which this iterator applies. |
void |
readFields(DataInput din)
|
String |
removeOption(String option)
Remove an option from the iterator. |
void |
setIteratorClass(String iteratorClass)
Set the name of the class that implements the iterator. |
void |
setName(String name)
Set the iterator's name. |
void |
setPriority(int priority)
Set layer at which this iterator applies. |
String |
toString()
|
void |
write(DataOutput dout)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public IteratorSetting(int priority, String name, String iteratorClass)
priority
- the priority for the iterator (see setPriority(int)
)name
- the distinguishing name for the iteratoriteratorClass
- the fully qualified class name for the iteratorpublic IteratorSetting(int priority, String name, String iteratorClass, Map<String,String> properties)
priority
- the priority for the iterator (see setPriority(int)
)name
- the distinguishing name for the iteratoriteratorClass
- the fully qualified class name for the iteratorproperties
- any properties for the iteratorpublic IteratorSetting(int priority, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass)
priority
- the priority for the iterator (see setPriority(int)
)iteratorClass
- the class for the iteratorpublic IteratorSetting(int priority, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass, Map<String,String> properties)
priority
- the priority for the iterator (see setPriority(int)
)iteratorClass
- the class for the iteratorproperties
- any properties for the iteratorpublic IteratorSetting(int priority, String name, Class<? extends SortedKeyValueIterator<Key,Value>> iteratorClass)
priority
- the priority for the iterator (see setPriority(int)
)name
- the distinguishing name for the iteratoriteratorClass
- the class for the iteratorpublic IteratorSetting(DataInput din) throws IOException
IOException
Method Detail |
---|
public int getPriority()
setPriority(int)
for how the priority is used.
public void setPriority(int priority)
priority
- determines the order in which iterators are applied (system iterators are always applied first, then user-configured iterators, lowest priority
first)public String getName()
public void setName(String name)
name
- public String getIteratorClass()
public void setIteratorClass(String iteratorClass)
iteratorClass
- public void addOption(String option, String value)
option
- the name of the optionvalue
- the value of the optionpublic String removeOption(String option)
option
- the name of the option
public void addOptions(Set<Map.Entry<String,String>> propertyEntries)
propertyEntries
- a set of entries to add to the optionspublic void addOptions(Map<String,String> properties)
properties
- a map of entries to add to the optionspublic Map<String,String> getOptions()
public void clearOptions()
public String toString()
toString
in class Object
Object.toString()
public void readFields(DataInput din) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput dout) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |