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

stack commented on HBASE-13450:
-------------------------------

Why is the passing of a comparator binarySearch deprecated?

2079      @Deprecated

Should say why in the (missing) @Deprecated that should be added to javadoc 
pointing folks at alternatives to use.

Ditto for the later binarySearch method that is deprecated (Is this only place 
that references Cell in Bytes?  Would be good to get Cell out of Bytes)

Do the overrides work? Isn't RawComparator<Cell> a subclass of 
Comparator<Cell>?  (The erasure would null out Cell?)  If it does, all well and 
good.

You could write the below:

586           if (comparatorClass != null) {
587             return comparatorClass.newInstance();
588           } else {
589             return null;
590           }

as: return comparatorClass != null? comparatorClass.newInstance: null;

In below...

We could use Bytes.BYTES_RAWCOMPARATOR for ROW Bloom

instead of 'could' say, 'can safely' (two places)

Above can be fixed on commit. +1.

> Purge RawBytescomparator from the writers and readers after HBASE-10800
> -----------------------------------------------------------------------
>
>                 Key: HBASE-13450
>                 URL: https://issues.apache.org/jira/browse/HBASE-13450
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 2.0.0
>
>         Attachments: HBASE-13450.patch, HBASE-13450_2.patch, 
> HBASE-13450_3.patch
>
>
> Currently KeyValue.RAW_COMPARATOR is written in the Trailer of the HFiles.  
> Ideally this need not be persisted to the trailer of the Hfiles because only 
> the ROW bloom and the meta index blocks uses this. Currently RAW_COMPARATOR 
> is also of type KVComparator.
> HBASE-10800 would introduce CellComparator and would expect only cells to be 
> compared.  We cannot have RAW_COMPARATOR a type of CellComparator.  Hence it 
> is better to avoid writing the RAW_COMPARATOR to the FFT and whereever we 
> need RAW_COMPARATOR we will directly use it as Bytes.BYTES_RAWCOMPARATOR.



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

Reply via email to