|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.client.coprocessor.LongColumnInterpreter
public class LongColumnInterpreter
a concrete column interpreter implementation. The cell value is a Long value and its promoted data type is also a Long value. For computing aggregation function, this class is used to find the datatype of the cell value. Client is supposed to instantiate it and passed along as a parameter. See TestAggregateProtocol methods for its sample usage. Its methods handle null arguments gracefully.
Constructor Summary | |
---|---|
LongColumnInterpreter()
|
Method Summary | |
---|---|
Long |
add(Long l1,
Long l2)
|
Long |
castToReturnType(Long o)
provides casting opportunity between the data types. |
int |
compare(Long l1,
Long l2)
This takes care if either of arguments are null. |
double |
divideForAvg(Long l1,
Long l2)
used for computing average of |
Long |
getMaxValue()
returns the maximum value for this type T |
Long |
getMinValue()
|
Long |
getValue(byte[] colFamily,
byte[] colQualifier,
KeyValue kv)
|
Long |
increment(Long o)
|
Long |
multiply(Long l1,
Long l2)
|
void |
readFields(DataInput arg0)
|
void |
write(DataOutput arg0)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LongColumnInterpreter()
Method Detail |
---|
public Long getValue(byte[] colFamily, byte[] colQualifier, KeyValue kv) throws IOException
getValue
in interface ColumnInterpreter<Long,Long>
IOException
public Long add(Long l1, Long l2)
add
in interface ColumnInterpreter<Long,Long>
public int compare(Long l1, Long l2)
ColumnInterpreter
compare
in interface ColumnInterpreter<Long,Long>
public Long getMaxValue()
ColumnInterpreter
getMaxValue
in interface ColumnInterpreter<Long,Long>
public Long increment(Long o)
increment
in interface ColumnInterpreter<Long,Long>
public Long multiply(Long l1, Long l2)
multiply
in interface ColumnInterpreter<Long,Long>
public Long getMinValue()
getMinValue
in interface ColumnInterpreter<Long,Long>
public void readFields(DataInput arg0) throws IOException
readFields
in interface org.apache.hadoop.io.Writable
IOException
public void write(DataOutput arg0) throws IOException
write
in interface org.apache.hadoop.io.Writable
IOException
public double divideForAvg(Long l1, Long l2)
ColumnInterpreter
divideForAvg
in interface ColumnInterpreter<Long,Long>
public Long castToReturnType(Long o)
ColumnInterpreter
castToReturnType
in interface ColumnInterpreter<Long,Long>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |