hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-10800) Use CellComparator instead of KVComparator
Date Tue, 01 Jul 2014 19:20:25 GMT

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

stack commented on HBASE-10800:

It is not you but what is compareStatic? (when the method is not static)

Why not compareKey rather than compareOnlyKeyPortion?

Why we have to take a flag on compareStatic when Key only?  Should there be a compareKey only
method that is called when you are comparing the whole Cell?  (Do we ever compare Value? If
not, why we have to say compare Key at all?)

Should this be a method on its own?

+    int c = Bytes.compareTo(a.getRowArray(), a.getRowOffset(), a.getRowLength(),
+        b.getRowArray(), b.getRowOffset(), b.getRowLength());

My sense is that it is done lots of times throughout the codebase.  Hmm... doesn't compareRows
do the above?  Call lit?

Why you have non-static methods?  You ask if should be an Interface.  You thinking different
CellComparators?  I'd think that it'd be the Cell that would change implementation.  Would
be trouble if the CellComparator itself changed... If we come up w/ faster CellComparator
lets just use it in place of the old?  Or what you thinking Ram?

I've asked before but forgot, what is a flat key?  compareFlatKey

Should CellComparator only have compareTo in it?  And then CellUtil has the rest?  Maybe KVComparator
didn't do this so you have CellComparator not doing it.  MatchingRow was in KVComparator?
Should it be in CellUtil?  Hmm... seems like you have put a bunch of the compares into CellUtil.
 Good.  Make the separation cleaner?

Feels like these methods should be static again Ram.

If you can get away with purging that much from KeyValue, more power to you!

Thanks for digging in on this Ram.

> 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

View raw message