fluo icon indicating copy to clipboard operation
fluo copied to clipboard

Create class to clean up pulling Fluo data from Key/Value pair

Open mikewalch opened this issue 11 years ago • 1 comments

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();

mikewalch avatar Aug 01 '14 16:08 mikewalch

could also have methods like :

  Bytes getFamily()
   Bytes getQualifier()
   Bytes getValue()

keith-turner avatar Aug 01 '14 16:08 keith-turner