Return-Path: X-Original-To: apmail-hbase-issues-archive@www.apache.org Delivered-To: apmail-hbase-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 065D9181FB for ; Thu, 17 Dec 2015 05:54:48 +0000 (UTC) Received: (qmail 62740 invoked by uid 500); 17 Dec 2015 05:54:47 -0000 Delivered-To: apmail-hbase-issues-archive@hbase.apache.org Received: (qmail 62474 invoked by uid 500); 17 Dec 2015 05:54:47 -0000 Mailing-List: contact issues-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list issues@hbase.apache.org Received: (qmail 62053 invoked by uid 99); 17 Dec 2015 05:54:46 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2015 05:54:46 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id BA4BA2C1F75 for ; Thu, 17 Dec 2015 05:54:46 +0000 (UTC) Date: Thu, 17 Dec 2015 05:54:46 +0000 (UTC) From: "Ted Yu (JIRA)" To: issues@hbase.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Reopened] (HBASE-14995) Optimize setting tagsPresent in DefaultMemStore.java MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HBASE-14995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ted Yu reopened HBASE-14995: ---------------------------- > 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 > Fix For: 2.0.0, 1.2.0, 1.3.0 > > 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)