org.apache.accumulo.core.iterators
public abstract class LongCombiner extends TypedValueCombiner<Long>
Modifier and Type | Class and Description |
---|---|
static class |
LongCombiner.FixedLenEncoder
An Encoder that uses an 8-byte encoding for Longs.
|
static class |
LongCombiner.StringEncoder
An Encoder that uses a String representation of Longs.
|
static class |
LongCombiner.Type |
static class |
LongCombiner.VarLenEncoder
An Encoder that uses a variable-length encoding for Longs.
|
TypedValueCombiner.Encoder<V>
Combiner.ValueIterator
OptionDescriber.IteratorOptions
Modifier and Type | Field and Description |
---|---|
protected static String |
CLASS_PREFIX |
static TypedValueCombiner.Encoder<Long> |
FIXED_LEN_ENCODER |
static TypedValueCombiner.Encoder<Long> |
STRING_ENCODER |
protected static String |
TYPE |
static TypedValueCombiner.Encoder<Long> |
VAR_LEN_ENCODER |
LOSSY
ALL_OPTION, COLUMNS_OPTION
Constructor and Description |
---|
LongCombiner() |
Modifier and Type | Method and Description |
---|---|
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 long |
safeAdd(long a,
long b) |
static void |
setEncodingType(IteratorSetting is,
Class<? extends TypedValueCombiner.Encoder<Long>> encoderClass)
A convenience method for setting the long encoding type.
|
static void |
setEncodingType(IteratorSetting is,
LongCombiner.Type type)
A convenience method for setting the long encoding type.
|
static void |
setEncodingType(IteratorSetting is,
String encoderClassName)
A convenience method for setting the long encoding type.
|
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.
|
deepCopy, reduce, setEncoder, setEncoder, setLossyness, testEncoder, testEncoder, typedReduce
getTopKey, getTopValue, hasTop, next, seek, setColumns, setCombineAllColumns
getSource, setSource
public static final TypedValueCombiner.Encoder<Long> FIXED_LEN_ENCODER
public static final TypedValueCombiner.Encoder<Long> VAR_LEN_ENCODER
public static final TypedValueCombiner.Encoder<Long> STRING_ENCODER
protected static final String TYPE
protected static final String CLASS_PREFIX
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 TypedValueCombiner<Long>
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 OptionDescriber.IteratorOptions describeOptions()
OptionDescriber
describeOptions
in interface OptionDescriber
describeOptions
in class TypedValueCombiner<Long>
public boolean validateOptions(Map<String,String> options)
OptionDescriber
validateOptions
in interface OptionDescriber
validateOptions
in class TypedValueCombiner<Long>
options
- a map of option names to option valuespublic static long safeAdd(long a, long b)
public static void setEncodingType(IteratorSetting is, LongCombiner.Type type)
is
- IteratorSetting object to configure.type
- LongCombiner.Type specifying the encoding type.public static void setEncodingType(IteratorSetting is, Class<? extends TypedValueCombiner.Encoder<Long>> encoderClass)
is
- IteratorSetting object to configure.encoderClass
- Class extends Encoderpublic static void setEncodingType(IteratorSetting is, String encoderClassName)
is
- IteratorSetting object to configure.encoderClassName
- name of a class specifying the encoding type.Copyright © 2014 Apache Accumulo Project. All Rights Reserved.