@InterfaceAudience.Private public class BigDecimalColumnInterpreter extends ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>
| Constructor and Description |
|---|
BigDecimalColumnInterpreter() |
| Modifier and Type | Method and Description |
|---|---|
java.math.BigDecimal |
add(java.math.BigDecimal bd1,
java.math.BigDecimal bd2) |
java.math.BigDecimal |
castToCellType(java.math.BigDecimal bd)
The response message comes as type S.
|
java.math.BigDecimal |
castToReturnType(java.math.BigDecimal bd)
provides casting opportunity between the data types.
|
int |
compare(java.math.BigDecimal bd1,
java.math.BigDecimal bd2)
This takes care if either of arguments are null.
|
double |
divideForAvg(java.math.BigDecimal bd1,
java.lang.Long l2)
used for computing average of
|
java.math.BigDecimal |
getCellValueFromProto(HBaseProtos.BigDecimalMsg q)
This method gets the PB message corresponding to the cell type
|
java.math.BigDecimal |
getMaxValue()
returns the maximum value for this type T
|
java.math.BigDecimal |
getMinValue() |
java.math.BigDecimal |
getPromotedValueFromProto(HBaseProtos.BigDecimalMsg r)
This method gets the promoted type from the proto message
|
HBaseProtos.BigDecimalMsg |
getProtoForCellType(java.math.BigDecimal t)
This method gets the PB message corresponding to the cell type
|
HBaseProtos.BigDecimalMsg |
getProtoForPromotedType(java.math.BigDecimal 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.
|
java.math.BigDecimal |
getValue(byte[] colFamily,
byte[] colQualifier,
Cell kv) |
java.math.BigDecimal |
increment(java.math.BigDecimal bd) |
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).
|
java.math.BigDecimal |
multiply(java.math.BigDecimal bd1,
java.math.BigDecimal bd2) |
public java.math.BigDecimal getValue(byte[] colFamily,
byte[] colQualifier,
Cell kv)
throws java.io.IOException
getValue in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>java.io.IOExceptionpublic java.math.BigDecimal add(java.math.BigDecimal bd1,
java.math.BigDecimal bd2)
add in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public int compare(java.math.BigDecimal bd1,
java.math.BigDecimal bd2)
ColumnInterpretercompare in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public java.math.BigDecimal getMaxValue()
ColumnInterpretergetMaxValue in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public java.math.BigDecimal increment(java.math.BigDecimal bd)
increment in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public java.math.BigDecimal multiply(java.math.BigDecimal bd1,
java.math.BigDecimal bd2)
multiply in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public java.math.BigDecimal getMinValue()
getMinValue in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public double divideForAvg(java.math.BigDecimal bd1,
java.lang.Long l2)
ColumnInterpreterdivideForAvg in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public java.math.BigDecimal castToReturnType(java.math.BigDecimal bd)
ColumnInterpretercastToReturnType in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public java.math.BigDecimal castToCellType(java.math.BigDecimal bd)
ColumnInterpreterColumnInterpreter.castToReturnType(Object)castToCellType in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>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<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public void initialize(HBaseProtos.EmptyMsg msg)
ColumnInterpreterinitialize in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public HBaseProtos.BigDecimalMsg getProtoForCellType(java.math.BigDecimal t)
ColumnInterpretergetProtoForCellType in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public HBaseProtos.BigDecimalMsg getProtoForPromotedType(java.math.BigDecimal s)
ColumnInterpretergetProtoForPromotedType in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public java.math.BigDecimal getPromotedValueFromProto(HBaseProtos.BigDecimalMsg r)
ColumnInterpretergetPromotedValueFromProto in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>public java.math.BigDecimal getCellValueFromProto(HBaseProtos.BigDecimalMsg q)
ColumnInterpretergetCellValueFromProto in class ColumnInterpreter<java.math.BigDecimal,java.math.BigDecimal,HBaseProtos.EmptyMsg,HBaseProtos.BigDecimalMsg,HBaseProtos.BigDecimalMsg>