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

stack commented on HBASE-15879:
-------------------------------

Shouldn't fact that a Key implementation is made of contiguous bytes be an 
implementation detail? And if we are saving copies by doubling down on the KV 
backed by a byte array, I'd rather we just did the copies?

Our poor KeyValue must be buckling under the weight of all the Interfaces it 
implements:

public class KeyValue implements Cell, HeapSize, Cloneable, SettableSequenceId, 
SettableTimestamp, Streamable, ContiguousKey {

Are we not able to remove some Interfaces?

> Introduce Key interface
> -----------------------
>
>                 Key: HBASE-15879
>                 URL: https://issues.apache.org/jira/browse/HBASE-15879
>             Project: HBase
>          Issue Type: Improvement
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>         Attachments: HBASE-15879.patch
>
>
> Introduce an interface called Key and allow Cell implementations to implement 
> this Key interface for cases like KeyValue, OffheapKeyValue and DBE cells 
> (Except prefix tree) so that we can avoid copies when we deal with only Cells 
> in case of block index creations (like ROOT, Bloom etc). Helps in reduction 
> of garbage also. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to