|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.coprocessor.ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>
org.apache.hadoop.hbase.client.coprocessor.LongColumnInterpreter
@InterfaceAudience.Public @InterfaceStability.Evolving 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 |
castToCellType(Long l)
The response message comes as type S. |
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 |
getCellValueFromProto(HBaseProtos.LongMsg q)
This method gets the PB message corresponding to the cell type |
Long |
getMaxValue()
returns the maximum value for this type T |
Long |
getMinValue()
|
Long |
getPromotedValueFromProto(HBaseProtos.LongMsg r)
This method gets the promoted type from the proto message |
HBaseProtos.LongMsg |
getProtoForCellType(Long t)
This method gets the PB message corresponding to the cell type |
HBaseProtos.LongMsg |
getProtoForPromotedType(Long s)
This method gets the PB message corresponding to the promoted type |
HBaseProtos.EmptyMsg |
getRequestData()
This method should return any additional data that is needed on the server side to construct the ColumnInterpreter. |
Long |
getValue(byte[] colFamily,
byte[] colQualifier,
KeyValue kv)
|
Long |
increment(Long o)
|
void |
initialize(HBaseProtos.EmptyMsg msg)
This method should initialize any field(s) of the ColumnInterpreter with a parsing of the passed message bytes (used on the server side). |
Long |
multiply(Long l1,
Long l2)
|
| 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 class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>IOException
public Long add(Long l1,
Long l2)
add in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>
public int compare(Long l1,
Long l2)
ColumnInterpreter
compare in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public Long getMaxValue()
ColumnInterpreter
getMaxValue in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public Long increment(Long o)
increment in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>
public Long multiply(Long l1,
Long l2)
multiply in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public Long getMinValue()
getMinValue in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>
public double divideForAvg(Long l1,
Long l2)
ColumnInterpreter
divideForAvg in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public Long castToReturnType(Long o)
ColumnInterpreter
castToReturnType in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public Long castToCellType(Long l)
ColumnInterpreterColumnInterpreter.castToReturnType(Object)
castToCellType in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public HBaseProtos.EmptyMsg getRequestData()
ColumnInterpreterColumnInterpreter.initialize(P)
method. If there is no ColumnInterpreter specific data (for e.g.,
LongColumnInterpreter) then null should be returned.
getRequestData in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public void initialize(HBaseProtos.EmptyMsg msg)
ColumnInterpreter
initialize in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public HBaseProtos.LongMsg getProtoForCellType(Long t)
ColumnInterpreter
getProtoForCellType in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public HBaseProtos.LongMsg getProtoForPromotedType(Long s)
ColumnInterpreter
getProtoForPromotedType in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public Long getPromotedValueFromProto(HBaseProtos.LongMsg r)
ColumnInterpreter
getPromotedValueFromProto in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>public Long getCellValueFromProto(HBaseProtos.LongMsg q)
ColumnInterpreter
getCellValueFromProto in class ColumnInterpreter<Long,Long,HBaseProtos.EmptyMsg,HBaseProtos.LongMsg,HBaseProtos.LongMsg>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||