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-14995) Optimize setting tagsPresent in DefaultMemStore.java
Date Thu, 17 Dec 2015 12:26:46 GMT

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

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

bq. in HFileWriterImpl.java's append(), is the cell either NoTagsKeyValue or TagRewriteCell
That was a good question.  It made me to read the write flow again. Yes ideally we think it
will be any of these. But the fact is it wont be any of these (by default).
 By default we have MSLAB usage enabled which makes the cell to be reconstructed (by copying
the bytes to a new byte[] and create a KeyValue object) just before adding it to CSLM in Memstore.
 So the optimization what we thought wont getting applied.!!   Our bad... did not think abt
this before. We need some optimization. CC  [~ram_krish]

> Optimize setting tagsPresent in DefaultMemStore.java
> ----------------------------------------------------
>
>                 Key: HBASE-14995
>                 URL: https://issues.apache.org/jira/browse/HBASE-14995
>             Project: HBase
>          Issue Type: Improvement
>          Components: regionserver
>    Affects Versions: 2.0.0, 1.2.0
>            Reporter: huaxiang sun
>            Assignee: huaxiang sun
>            Priority: Minor
>         Attachments: HBASE-14995-v001.patch, HBASE-14995-v002.patch
>
>
> The current implementation calls e.getTagsLength() for each cell. Once tagsPresent is
set, e.getTagsLength() can be avoided.
> {code}
>   private boolean addToCellSet(Cell e) {
>     boolean b = this.cellSet.add(e);
>     // In no tags case this NoTagsKeyValue.getTagsLength() is a cheap call.
>     // When we use ACL CP or Visibility CP which deals with Tags during
>     // mutation, the TagRewriteCell.getTagsLength() is a cheaper call. We do not
>     // parse the byte[] to identify the tags length.
>     if(e.getTagsLength() > 0) {
>       tagsPresent = true;
>     }
>     setOldestEditTimeToNow();
>     return b;
>   }
> {code}



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

Mime
View raw message