[ 
https://issues.apache.org/jira/browse/HBASE-19160?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Mike Drob updated HBASE-19160:
------------------------------
    Summary: Re-expose CellComparator  (was: Re-expose some CellUtil methods)

bq. The method should be declared as "static" rather than "default".
Yep, thanks!

bq. So seeing this change can we just mark CellComparator @Public? So that even 
clients like MR/spark can make use of it?
Yea, I think that is my intent, but I didn't connect the dots that we also need 
to make it IA.Public, will do that in next patch.

bq. Coming to the createXXXOnRow() can you see if you can try using 
CellBuilder.create(byte[]) in crunch code?
Hmm, yea, I think it's possible to use the CellBuilder API for this, but it 
gets a little more clunky and less obvious what is happening. I'll think about 
this some more and probably spin it off into a separate JIRA so that I can do 
the Comparator work here.

> Re-expose CellComparator
> ------------------------
>
>                 Key: HBASE-19160
>                 URL: https://issues.apache.org/jira/browse/HBASE-19160
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 2.0.0-alpha-4
>            Reporter: Mike Drob
>            Assignee: Mike Drob
>            Priority: Critical
>             Fix For: 2.0.0-beta-1
>
>         Attachments: HBASE-19160.patch
>
>
> On HBASE-18995 we moved a bunch of public methods to Private places. This 
> inadvertently breaks donwstream consumers. Let's see if we can ease up on 
> some of the lockdown and make life easier for them.
> Copying [~ram_krish]'s previous analysis:
> {quote}
> I read the Crunch projec't hbase-support related code. 
> -> It uses both CellUtil (Public exposed) and KeyValueUtil (@Private) classes 
> for helper methods.
> -> All methods in CellUtil that are getting used are even now exposed in 
> branch-2's CellUtil and they are very common helper methods. So we are safe 
> here.
> -> Wrt KeyValueUtil the API is createFirstOnRow(). It is used in test cases 
> and in some core code. In most of the places they are trying to create the 
> splitKeys from the region's start keys and that is also getting persisted. I 
> think here they can safely create a cell out of the given byte[] of the row.
> But there is one place where they are trying to do some scanning on a 
> HFileScanner directly (@Private) scanner. So this should be changed because 
> it is an internal interface for us. And on this scanner they have copied our 
> seekTo() code into their source files for some scanning purpose. In this code 
> they are actually using the KvUtil.createFirstOnRow() to seek to that first 
> cell of that row.
> More over I think in branch-2 we are restricting even CPs from accessing some 
> of our internal scanners and they can only use InternalScanner interface. So 
> this code in crunch needs heavy refactoring to work with branch-2 in case 
> they want to fit into the Public/Private exposed semantics that HBase 
> presents to the downstreamers.
> -> If still they want some APIs like this we can expose 
> CellUtil#createFirstOnRow, createLastOnRow, createFirstOnCol and 
> createLastOnCol at the maximum. I think others are not useful and are more 
> internal stuffs.
> {quote}



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

Reply via email to