You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "huaxiang sun (JIRA)" <ji...@apache.org> on 2015/12/16 23:13:46 UTC
[jira] [Created] (HBASE-14995) Optimize setting tagsPresent in
DefaultMemStore.java
huaxiang sun created HBASE-14995:
------------------------------------
Summary: 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
Priority: Minor
The current implementation calls e.getTagsLength() for each cell. Once tagsPresent is set, e.getTagsLength() can be avoided.
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;
}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)