apache / fluo

Apache Fluo
https://fluo.apache.org
Apache License 2.0
185 stars 78 forks source link

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

Open mikewalch opened 9 years ago

mikewalch commented 9 years ago

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();
keith-turner commented 9 years ago

could also have methods like :

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