hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anoop Sam John (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-18361) CellComparator compare function should compare cell's value along with other attributes
Date Tue, 11 Jul 2017 16:33:00 GMT

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

Anoop Sam John commented on HBASE-18361:
----------------------------------------

All parts 1 to 6 are parts of key in one way or other.  So only those are considered for equality
check.  Just consider like Map.. U have key and value. The key is what decides equality. It
is same way. Value is not considered for any equals check or ordering.

> CellComparator compare function should compare cell's value along with other attributes
> ---------------------------------------------------------------------------------------
>
>                 Key: HBASE-18361
>                 URL: https://issues.apache.org/jira/browse/HBASE-18361
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 1.3.1
>            Reporter: Amit Kabra
>            Assignee: Amit Kabra
>         Attachments: HBASE-18361.patch
>
>
> CellComparator.compare(Cell a, Cell b) should compare a and b's value as well.
> If we create two cells as 
>     byte [] row = Bytes.toBytes("row");
>     byte [] value = Bytes.toBytes("value");
>     byte [] value1 = Bytes.toBytes("value1");
>     Cell c1 = CellUtil.createCell(row, value);
>     Cell c2 = CellUtil.createCell(row, value1);
> And compare them using CellComparator.compare(c1, c2,true) , it returns 0 i.e it matches
them while they are different.CellComparator compares each attribute of cell but value.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message