public class TimestampFilter extends Filter
OptionDescriber.IteratorOptions
Modifier and Type | Field and Description |
---|---|
static String |
END |
static String |
END_INCL |
static String |
START |
static String |
START_INCL |
Constructor and Description |
---|
TimestampFilter() |
Modifier and Type | Method and Description |
---|---|
boolean |
accept(Key k,
Value v) |
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.
|
void |
init(SortedKeyValueIterator<Key,Value> source,
Map<String,String> options,
IteratorEnvironment env)
Initializes the iterator.
|
static void |
setEnd(IteratorSetting is,
long end,
boolean endInclusive)
A convenience method for setting the end timestamp accepted by the timestamp filter.
|
static void |
setEnd(IteratorSetting is,
String end,
boolean endInclusive)
A convenience method for setting the end timestamp accepted by the timestamp filter.
|
static void |
setRange(IteratorSetting is,
long start,
boolean startInclusive,
long end,
boolean endInclusive)
A convenience method for setting the range of timestamps accepted by the timestamp filter.
|
static void |
setRange(IteratorSetting is,
long start,
long end)
A convenience method for setting the range of timestamps accepted by the timestamp filter.
|
static void |
setRange(IteratorSetting is,
String start,
boolean startInclusive,
String end,
boolean endInclusive)
A convenience method for setting the range of timestamps accepted by the timestamp filter.
|
static void |
setRange(IteratorSetting is,
String start,
String end)
A convenience method for setting the range of timestamps accepted by the timestamp filter.
|
static void |
setStart(IteratorSetting is,
long start,
boolean startInclusive)
A convenience method for setting the start timestamp accepted by the timestamp filter.
|
static void |
setStart(IteratorSetting is,
String start,
boolean startInclusive)
A convenience method for setting the start timestamp accepted by the timestamp filter.
|
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, next, seek, setNegate
getSource, getTopKey, getTopValue, hasTop, setSource
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enableYielding
public static final String START
public static final String START_INCL
public static final String END
public static final String END_INCL
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 Filter
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 SortedKeyValueIterator<Key,Value> deepCopy(IteratorEnvironment env)
SortedKeyValueIterator
public OptionDescriber.IteratorOptions describeOptions()
OptionDescriber
describeOptions
in interface OptionDescriber
describeOptions
in class Filter
public boolean validateOptions(Map<String,String> options)
OptionDescriber
validateOptions
in interface OptionDescriber
validateOptions
in class Filter
options
- a map of option names to option valuespublic static void setRange(IteratorSetting is, String start, String end)
is
- the iterator setting object to configurestart
- the start timestamp, inclusive (yyyyMMddHHmmssz)end
- the end timestamp, inclusive (yyyyMMddHHmmssz)public static void setRange(IteratorSetting is, String start, boolean startInclusive, String end, boolean endInclusive)
is
- the iterator setting object to configurestart
- the start timestamp (yyyyMMddHHmmssz)startInclusive
- boolean indicating whether the start is inclusiveend
- the end timestamp (yyyyMMddHHmmssz)endInclusive
- boolean indicating whether the end is inclusivepublic static void setStart(IteratorSetting is, String start, boolean startInclusive)
is
- the iterator setting object to configurestart
- the start timestamp (yyyyMMddHHmmssz)startInclusive
- boolean indicating whether the start is inclusivepublic static void setEnd(IteratorSetting is, String end, boolean endInclusive)
is
- the iterator setting object to configureend
- the end timestamp (yyyyMMddHHmmssz)endInclusive
- boolean indicating whether the end is inclusivepublic static void setRange(IteratorSetting is, long start, long end)
is
- the iterator setting object to configurestart
- the start timestamp, inclusiveend
- the end timestamp, inclusivepublic static void setRange(IteratorSetting is, long start, boolean startInclusive, long end, boolean endInclusive)
is
- the iterator setting object to configurestart
- the start timestampstartInclusive
- boolean indicating whether the start is inclusiveend
- the end timestampendInclusive
- boolean indicating whether the end is inclusivepublic static void setStart(IteratorSetting is, long start, boolean startInclusive)
is
- the iterator setting object to configurestart
- the start timestampstartInclusive
- boolean indicating whether the start is inclusivepublic static void setEnd(IteratorSetting is, long end, boolean endInclusive)
is
- the iterator setting object to configureend
- the end timestampendInclusive
- boolean indicating whether the end is inclusiveCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.