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

ramkrishna.s.vasudevan commented on HBASE-10800:
------------------------------------------------

bq.It is not you but what is compareStatic? (when the method is not static)
Okie.  Can change this to just compare.
bq.Why not compareKey rather than compareOnlyKeyPortion?
The reason for saying compareOnlyKeyPortion is because after the introduction 
of replay tags in certain cases we need to compare that and also the mvcc part 
of the key. (before flushing and compaction).
Hence this compareOnlyKeyPortion.
bq.Why we have to take a flag on compareStatic when Key only?
They flag is to denote the types of  compare that we may have to do as per the 
above comment. (Ignore or include replay tags and mvcc).
bq. Hmm... doesn't compareRows do the above? Call lit?
Changed such that compareRows is used.
bq.Would be trouble if the CellComparator itself changed
In many places we have an API called getKVComparator.  Now if we have different 
types of Cells and each cell has its own cellcomparator still when we say 
getComparator() we should be returning the Cell's comparator which is of type 
CellComparator?  Or we should totally remove those comparators getting passed 
as method params or these getKVComparator and just use CellComparator.compare 
in static mode.  That would also involve lot of places to change.  In the 
current patch that part of the code is not changed.
bq.I've asked before but forgot, what is a flat key? compareFlatKey
Comparing only the keyportion. This could be replaced with compare(Cell a, Cell 
b).Updated the patch.  But left the compareFlatKey that accepts the byte[] as 
params.
bq.Should CellComparator only have compareTo in it? And then CellUtil has the 
rest?
Same reasoning as above comment.  Wanted to have as instance methods and 
whereever could be accessed in static way move them to the CellUtil.

Take the case of MetaKeyComparator.  There we are creating MetaKeyComparator as 
a subclass of KVComparator.  
Suppose the reader v2 and v3 tries to do a comparison on two cells which are 
offheap then the cell comparator used by that class would be the one which 
operates on offheap and should be specific to that and the related areas.  
There I thought subclassing CellComparator would be helpful.  






> Use CellComparator instead of KVComparator
> ------------------------------------------
>
>                 Key: HBASE-10800
>                 URL: https://issues.apache.org/jira/browse/HBASE-10800
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 0.99.0
>
>         Attachments: HBASE-10800_1.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to