Details
-
Type: Bug
-
Status: Resolved
-
Priority: Blocker
-
Resolution: Fixed
-
Affects Version/s: 0.6.0
-
Fix Version/s: 0.9.0
-
Component/s: HBase Module
-
Labels:None
Description
This may get overtaken by CDK-118, but I noticed a couple of oddities in ColumnEncoder/Decoder:
1. The javadoc says "int and long are serialized in standard 4 and 8 byte format", and uses DataInputStream/DataOutputStream. Should it use methods like toInt(byte[] bytes) and toBytes(int val) on org.apache.hadoop.hbase.util.Bytes instead since we are relying on HBase's atomic increment, so we should use HBase APis to encode?
2. ColumnDecoder#readString calls InputStream#available to find the size of the byte array to allocate, which is bad practice. I guess we can just use Avro's BinaryEncoder/Decoder for strings? (The javadoc says that it "is something we want to change in the future".)