You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "ChiaPing Tsai (JIRA)" <ji...@apache.org> on 2016/10/20 08:51:58 UTC

[jira] [Created] (HBASE-16888) Avoid unnecessary tags copy in Append

ChiaPing Tsai created HBASE-16888:
-------------------------------------

             Summary: Avoid unnecessary tags copy in Append
                 Key: HBASE-16888
                 URL: https://issues.apache.org/jira/browse/HBASE-16888
             Project: HBase
          Issue Type: Improvement
            Reporter: ChiaPing Tsai
            Priority: Minor


a) If the delta has tags and the mutation doesn’t apply the TTL, we shouldn’t create the TagRewriteCell.
{noformat}

    List<Tag> tags = TagUtil.carryForwardTags(delta);
    long ts = now;
    Cell newCell = null;
    byte [] row = mutation.getRow();
    if (currentValue != null) {
     ...
    } else {
      // Append's KeyValue.Type==Put and ts==HConstants.LATEST_TIMESTAMP
      CellUtil.updateLatestStamp(delta, now);
      newCell = delta;
      tags = TagUtil.carryForwardTTLTag(tags, mutation.getTTL());
      if (tags != null) {
        newCell = CellUtil.createCell(delta, tags);
      }
    }

{noformat}

b) If the cell has tags, the ShareableMemoryTagRewriteCell will make duplicate copy of tags. 
{noformat}

      Cell clonedBaseCell = ((ShareableMemory) this.cell).cloneToCell();
      return new TagRewriteCell(clonedBaseCell, this.tags);

{noformat}





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