|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.hbase.coprocessor.ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>
org.apache.hadoop.hbase.client.coprocessor.DoubleColumnInterpreter
@InterfaceAudience.Public @InterfaceStability.Evolving public class DoubleColumnInterpreter
a concrete column interpreter implementation. The cell value is a Double value and its promoted data type is also a Double 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 TestDoubleColumnInterpreter methods for its sample usage. Its methods handle null arguments gracefully.
| Constructor Summary | |
|---|---|
DoubleColumnInterpreter()
|
|
| Method Summary | |
|---|---|
Double |
add(Double d1,
Double d2)
|
Double |
castToCellType(Double d)
The response message comes as type S. |
Double |
castToReturnType(Double o)
provides casting opportunity between the data types. |
int |
compare(Double d1,
Double d2)
This takes care if either of arguments are null. |
double |
divideForAvg(Double d1,
Long l2)
used for computing average of |
Double |
getCellValueFromProto(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg q)
This method gets the PB message corresponding to the cell type |
Double |
getMaxValue()
returns the maximum value for this type T |
Double |
getMinValue()
|
Double |
getPromotedValueFromProto(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg r)
This method gets the promoted type from the proto message |
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg |
getProtoForCellType(Double t)
This method gets the PB message corresponding to the cell type |
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg |
getProtoForPromotedType(Double s)
This method gets the PB message corresponding to the promoted type |
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg |
getRequestData()
This method should return any additional data that is needed on the server side to construct the ColumnInterpreter. |
Double |
getValue(byte[] colFamily,
byte[] colQualifier,
Cell c)
TODO: when removing ColumnInterpreter.getValue(byte[], byte[], KeyValue), this method should be made abstract |
Double |
increment(Double o)
|
void |
initialize(org.apache.hadoop.hbase.protobuf.generated.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). |
Double |
multiply(Double d1,
Double d2)
|
| Methods inherited from class org.apache.hadoop.hbase.coprocessor.ColumnInterpreter |
|---|
getValue |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DoubleColumnInterpreter()
| Method Detail |
|---|
public Double getValue(byte[] colFamily,
byte[] colQualifier,
Cell c)
throws IOException
ColumnInterpreterColumnInterpreter.getValue(byte[], byte[], KeyValue), this method should be made abstract
getValue in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>IOException
public Double add(Double d1,
Double d2)
add in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>
public int compare(Double d1,
Double d2)
ColumnInterpreter
public Double getMaxValue()
ColumnInterpreter
getMaxValue in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public Double increment(Double o)
increment in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>
public Double multiply(Double d1,
Double d2)
multiply in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public Double getMinValue()
getMinValue in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>
public double divideForAvg(Double d1,
Long l2)
ColumnInterpreter
divideForAvg in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public Double castToReturnType(Double o)
ColumnInterpreter
castToReturnType in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public Double castToCellType(Double d)
ColumnInterpreterColumnInterpreter.castToReturnType(Object)
castToCellType in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public org.apache.hadoop.hbase.protobuf.generated.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<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public void initialize(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg msg)
ColumnInterpreter
initialize in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg getProtoForCellType(Double t)
ColumnInterpreter
getProtoForCellType in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg getProtoForPromotedType(Double s)
ColumnInterpreter
getProtoForPromotedType in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public Double getPromotedValueFromProto(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg r)
ColumnInterpreter
getPromotedValueFromProto in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>public Double getCellValueFromProto(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg q)
ColumnInterpreter
getCellValueFromProto in class ColumnInterpreter<Double,Double,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.DoubleMsg>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||