[ 
https://issues.apache.org/jira/browse/HBASE-7162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13502169#comment-13502169
 ] 

Matt Corgan commented on HBASE-7162:
------------------------------------

We could add a getCurrentCell method to the EncodedSeeker interface and 
deprecate the getKeyValue, getKeyValueBuffer, and getKeyDeepCopy methods.  
While deprecated, those methods can be reimplemented like:
{code}  
  @Override
  public ByteBuffer getKeyDeepCopy() {
    return KeyValueTool.copyKeyToNewByteBuffer(getCurrentCell());
  }
  @Override
  public KeyValue getKeyValue() {
    return KeyValueTool.copyToNewKeyValue(getCurrentCell());
  }
  @Override
  public ByteBuffer getKeyValueBuffer() {
    return KeyValueTool.copyToNewByteBuffer(getCurrentCell());
  }
{code}

{quote}There's one sticky issue still, where we use the key portion of the KV 
(i.e. row, CF, qual), that would still need to be assembled on each call.{quote}
There's a method for converting from Cell to only the key portion of KeyValue: 
KeyValueTool.copyKeyToNewByteBuffer.  We'd eventually want to stop doing that 
copying altogether, but it's a quick fix for the tricky places.

There's also an opportunity to switch some of the lower level Bytes.compareTo 
calls to more readable method calls, like for a row-only comparison we could 
call CellComparator.compareRow(cellA, cellB).
                
> Prefix Compression - Trie data block encoding; hbase-common and hbase-server 
> changes
> ------------------------------------------------------------------------------------
>
>                 Key: HBASE-7162
>                 URL: https://issues.apache.org/jira/browse/HBASE-7162
>             Project: HBase
>          Issue Type: New Feature
>    Affects Versions: 0.96.0
>            Reporter: stack
>            Assignee: Matt Corgan
>             Fix For: 0.96.0
>
>         Attachments: HBASE-4676-common-and-server-v8.patch, 
> HBASE-4676-common-and-server-v9.patch, HBASE-7162-common-and-server-v10.patch
>
>
> These are the hbase-common and hbase-server changes for hbase-4676 Prefix 
> Compression - Trie data block encoding.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to