fluo
fluo copied to clipboard
Create class to clean up pulling Fluo data from Key/Value pair
Fluo stores extra data in Key/Value pairs returned from Accumulo. This data is retrieved using masks. It would cleaner to hide this hide the masking from the user and create in data class that could be called KeyValue.
Current
Entry<Key,Value> entry = iterator.next()
long colType = entry.getKey().getTimestamp() & ColumnUtil.PREFIX_MASK;
long ts = entry.getKey().getTimestamp() & ColumnUtil.TIMESTAMP_MASK;
Using KeyValue
KeyValue kv = iterator.next()
ColumnType colType = kv.getColumnType();
long ts = kv.getTimestamp();
could also have methods like :
Bytes getFamily()
Bytes getQualifier()
Bytes getValue()