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-11777) Find a way to use KV.setSequenceId() on Cells on the server-side read path
Date Sat, 30 Aug 2014 16:43:53 GMT

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

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

I see.. you mean here Ram?
StoreFileScanner#setCurrentCell
{code}
   if(this.cur != null && this.reader.isBulkLoaded() && cur.getSequenceId()
<= 0) {
     KeyValue curKV = KeyValueUtil.ensureKeyValue(cur);
     curKV.setSequenceId(this.reader.getSequenceID());
{code}

Compactor#performCompaction
{code}
       for (Cell c : kvs) {
         KeyValue kv = KeyValueUtil.ensureKeyValue(c);
         if (cleanSeqId && kv.getSequenceId() <= smallestReadPoint) {
           kv.setSequenceId(0);
{code}

Up in the scan layer we set the seqId and here we can get an object of BufferedDataBlockEncoder.ClonedSeekerState.
I know the 1st one is added recently.  But both these existing code were not good wrt performance.
We added BufferedDataBlockEncoder.ClonedSeekerState to avoid need for copy value part also
when we scan encoded data. But see the call to KeyValueUtil.ensureKeyValue which will recreate
KV and copy both key and value parts!!!

I can correct this by BufferedDataBlockEncoder.ClonedSeekerState implementing SettableSequenceId
and now we wont be having KeyValueUtil.ensureKeyValue.

Also suggest we can get rid of this KeyValueUtil.ensureKeyValue.  We can work on that with
sub tasks later.

> Find a way to use KV.setSequenceId() on Cells on the server-side read path
> --------------------------------------------------------------------------
>
>                 Key: HBASE-11777
>                 URL: https://issues.apache.org/jira/browse/HBASE-11777
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 0.99.0
>            Reporter: ramkrishna.s.vasudevan
>            Assignee: ramkrishna.s.vasudevan
>             Fix For: 0.99.0, 2.0.0
>
>         Attachments: CellWithSequenceNumber.java, HBASE-11777.patch, HBASE-11777_V2.patch,
HBASE-11777_V3.patch
>
>
> Over in HBASE-11591 there was a need to set the sequenceId of the HFile to the bulk loaded
KVs.  Since we are trying to use the concept of Cells in the read path if we need to use setSequenceId(),
then the Cell has to be converted to KV and only KeyValue impl has the accessor setSequenceId().
> [~anoop.hbase] suggested if we can use a Server side impl of Cell and have these accessors
in them.
> This JIRA aims to solve this and see the related code changes that needs to be carried
out for this.



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

Mime
View raw message