public class IteratorSetting extends Object implements org.apache.hadoop.io.Writable
IteratorSetting cfg = new IteratorSetting(priority, "myIter", MyIterator.class); MyIterator.addOption(cfg, 42); scanner.addScanIterator(cfg);
Modifier and Type | Class and Description |
---|---|
static class |
IteratorSetting.Column
A convenience class for passing column family and column qualifiers to iterator configuration methods.
|
Constructor and Description |
---|
IteratorSetting(DataInput din) |
IteratorSetting(int priority,
Class<? extends org.apache.accumulo.core.iterators.SortedKeyValueIterator<Key,Value>> iteratorClass)
Constructs an iterator setting using the given class's SimpleName for the iterator name.
|
IteratorSetting(int priority,
Class<? extends org.apache.accumulo.core.iterators.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 org.apache.accumulo.core.iterators.SortedKeyValueIterator<Key,Value>> iteratorClass)
Constructs an iterator setting configured for the scan scope with no parameters.
|
IteratorSetting(int priority,
String name,
Class<? extends org.apache.accumulo.core.iterators.SortedKeyValueIterator<Key,Value>> iteratorClass,
Map<String,String> properties)
Constructs an iterator setting using the provided name and the provided class's name for the scan scope with the provided 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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
boolean |
equals(Object obj) |
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.
|
int |
hashCode() |
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) |
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 org.apache.accumulo.core.iterators.SortedKeyValueIterator<Key,Value>> iteratorClass)
priority
- the priority for the iterator (see setPriority(int)
)iteratorClass
- the class for the iteratorpublic IteratorSetting(int priority, Class<? extends org.apache.accumulo.core.iterators.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 org.apache.accumulo.core.iterators.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(int priority, String name, Class<? extends org.apache.accumulo.core.iterators.SortedKeyValueIterator<Key,Value>> iteratorClass, Map<String,String> properties)
priority
- The priority for the iterator (see setPriority(int)
)name
- The distinguishing name for the iteratoriteratorClass
- The class for the iteratorproperties
- Any properties for the iteratorpublic IteratorSetting(DataInput din) throws IOException
IOException
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)
public String getIteratorClass()
public void setIteratorClass(String 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 optionpublic 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 int hashCode()
hashCode
in class Object
Object.hashCode()
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
Copyright © 2011–2016 The Apache Software Foundation. All rights reserved.