|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hbase.coprocessor.ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
org.apache.hadoop.hbase.client.coprocessor.BigDecimalColumnInterpreter
@InterfaceAudience.Private public class BigDecimalColumnInterpreter
ColumnInterpreter for doing Aggregation's with BigDecimal columns. This class is required at the RegionServer also.
Constructor Summary | |
---|---|
BigDecimalColumnInterpreter()
|
Method Summary | |
---|---|
BigDecimal |
add(BigDecimal bd1,
BigDecimal bd2)
|
BigDecimal |
castToCellType(BigDecimal bd)
The response message comes as type S. |
BigDecimal |
castToReturnType(BigDecimal bd)
provides casting opportunity between the data types. |
int |
compare(BigDecimal bd1,
BigDecimal bd2)
This takes care if either of arguments are null. |
double |
divideForAvg(BigDecimal bd1,
Long l2)
used for computing average of |
BigDecimal |
getCellValueFromProto(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg q)
This method gets the PB message corresponding to the cell type |
BigDecimal |
getMaxValue()
returns the maximum value for this type T |
BigDecimal |
getMinValue()
|
BigDecimal |
getPromotedValueFromProto(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg r)
This method gets the promoted type from the proto message |
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg |
getProtoForCellType(BigDecimal t)
This method gets the PB message corresponding to the cell type |
org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg |
getProtoForPromotedType(BigDecimal 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. |
BigDecimal |
getValue(byte[] colFamily,
byte[] colQualifier,
Cell kv)
TODO: when removing ColumnInterpreter.getValue(byte[], byte[], KeyValue) , this method should be made abstract |
BigDecimal |
increment(BigDecimal bd)
|
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). |
BigDecimal |
multiply(BigDecimal bd1,
BigDecimal bd2)
|
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 BigDecimalColumnInterpreter()
Method Detail |
---|
public BigDecimal getValue(byte[] colFamily, byte[] colQualifier, Cell kv) throws IOException
ColumnInterpreter
ColumnInterpreter.getValue(byte[], byte[], KeyValue)
, this method should be made abstract
getValue
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
IOException
public BigDecimal add(BigDecimal bd1, BigDecimal bd2)
add
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public int compare(BigDecimal bd1, BigDecimal bd2)
ColumnInterpreter
public BigDecimal getMaxValue()
ColumnInterpreter
getMaxValue
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public BigDecimal increment(BigDecimal bd)
increment
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public BigDecimal multiply(BigDecimal bd1, BigDecimal bd2)
multiply
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public BigDecimal getMinValue()
getMinValue
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public double divideForAvg(BigDecimal bd1, Long l2)
ColumnInterpreter
divideForAvg
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public BigDecimal castToReturnType(BigDecimal bd)
ColumnInterpreter
castToReturnType
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public BigDecimal castToCellType(BigDecimal bd)
ColumnInterpreter
ColumnInterpreter.castToReturnType(Object)
castToCellType
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg getRequestData()
ColumnInterpreter
ColumnInterpreter.initialize(P)
method. If there is no ColumnInterpreter specific data (for e.g.,
LongColumnInterpreter
) then null should be returned.
getRequestData
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public void initialize(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg msg)
ColumnInterpreter
initialize
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg getProtoForCellType(BigDecimal t)
ColumnInterpreter
getProtoForCellType
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg getProtoForPromotedType(BigDecimal s)
ColumnInterpreter
getProtoForPromotedType
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public BigDecimal getPromotedValueFromProto(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg r)
ColumnInterpreter
getPromotedValueFromProto
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
public BigDecimal getCellValueFromProto(org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg q)
ColumnInterpreter
getCellValueFromProto
in class ColumnInterpreter<BigDecimal,BigDecimal,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.EmptyMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg,org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.BigDecimalMsg>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |