public class CfCqSliceSeekingFilter extends SeekingFilter implements OptionDescriber
SeekingFilter.AdvanceResult, SeekingFilter.FilterResult
OptionDescriber.IteratorOptions
NEGATE
Constructor and Description |
---|
CfCqSliceSeekingFilter() |
Modifier and Type | Method and Description |
---|---|
SortedKeyValueIterator<Key,Value> |
deepCopy(IteratorEnvironment env)
Creates a deep copy of this iterator as though seek had not yet been called.
|
OptionDescriber.IteratorOptions |
describeOptions()
Gets an iterator options object that contains information needed to configure this iterator.
|
SeekingFilter.FilterResult |
filter(Key k,
Value v)
Subclasses must provide an implementation which examines the given key and value and determines
(1) whether to accept the KV pair and (2) how far to advance the source iterator past the key.
|
Key |
getNextKeyHint(Key k,
Value v)
Whenever the subclass returns AdvanceResult.USE_HINT from its filter predicate, this method
will be called to see how far to advance the source iterator.
|
void |
init(SortedKeyValueIterator<Key,Value> source,
Map<String,String> options,
IteratorEnvironment env)
Initializes the iterator.
|
boolean |
validateOptions(Map<String,String> options)
Check to see if an options map contains all options required by an iterator and that the option
values are in the expected formats.
|
findTop, hasTop, next, seek
getSource, getTopKey, getTopValue, setSource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enableYielding
public void init(SortedKeyValueIterator<Key,Value> source, Map<String,String> options, IteratorEnvironment env) throws IOException
SortedKeyValueIterator
init
in interface SortedKeyValueIterator<Key,Value>
init
in class SeekingFilter
source
- SortedKeyValueIterator source to read data from.options
- Map map of string option names to option values.env
- IteratorEnvironment environment in which iterator is being run.IOException
- unused.public SeekingFilter.FilterResult filter(Key k, Value v)
SeekingFilter
filter
in class SeekingFilter
k
- a keyv
- a valuepublic Key getNextKeyHint(Key k, Value v) throws IllegalArgumentException
SeekingFilter
getNextKeyHint
in class SeekingFilter
k
- a keyv
- a valueIllegalArgumentException
public SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
SortedKeyValueIterator
deepCopy
in interface SortedKeyValueIterator<Key,Value>
deepCopy
in class SeekingFilter
env
- IteratorEnvironment environment in which iterator is being run.public OptionDescriber.IteratorOptions describeOptions()
OptionDescriber
describeOptions
in interface OptionDescriber
public boolean validateOptions(Map<String,String> options)
OptionDescriber
validateOptions
in interface OptionDescriber
options
- a map of option names to option valuesCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.