You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hbase.apache.org by "CHIA-PING TSAI (JIRA)" <ji...@apache.org> on 2017/03/04 22:13:46 UTC
[jira] [Created] (HBASE-17734) guard against possibly coping the
qualifier in the ScanDeleteTracker
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)