hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CHIA-PING TSAI (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-17734) guard against possibly coping the qualifier in the ScanDeleteTracker
Date Sat, 04 Mar 2017 22:13:46 GMT
CHIA-PING TSAI created HBASE-17734:
--------------------------------------

             Summary: guard against possibly coping the qualifier in the ScanDeleteTracker
                 Key: HBASE-17734
                 URL: https://issues.apache.org/jira/browse/HBASE-17734
             Project: HBase
          Issue Type: Improvement
            Reporter: CHIA-PING TSAI
            Priority: Minor


If the input cell is ByteBufferKeyValue, the ByteBufferKeyValue#getQualifierArray will copy
the qualifier bytes.
ScanDeleteTracker should keep the cell rather than qualifier array.
{noformat}
  public void add(Cell cell) {
  long timestamp = cell.getTimestamp();
  byte type = cell.getTypeByte();
  if (!hasFamilyStamp || timestamp > familyStamp) {
  if (type == KeyValue.Type.DeleteFamily.getCode()) {
  hasFamilyStamp = true;
  familyStamp = timestamp;
  return;
  } else if (type == KeyValue.Type.DeleteFamilyVersion.getCode()) {
  familyVersionStamps.add(timestamp);
  return;
  }

  if (deleteBuffer != null && type < deleteType) {
  // same column, so ignore less specific delete
  if (CellUtil.matchingQualifier(cell, deleteBuffer, deleteOffset, deleteLength)) {
  return;
  }
  }
  // new column, or more general delete type
  deleteBuffer = cell.getQualifierArray();
  deleteOffset = cell.getQualifierOffset();
  deleteLength = cell.getQualifierLength();
  deleteType = type;
  deleteTimestamp = timestamp;
  }
  // missing else is never called.
  }
{noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message