hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "CHIA-PING TSAI (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HBASE-17734) Guard against possibly copying the qualifier in the ScanDeleteTracker
Date Sun, 05 Mar 2017 00:29:33 GMT

     [ https://issues.apache.org/jira/browse/HBASE-17734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

CHIA-PING TSAI updated HBASE-17734:
-----------------------------------
    Status: Patch Available  (was: Open)

> Guard against possibly copying 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
>            Assignee: CHIA-PING TSAI
>            Priority: Minor
>             Fix For: 2.0.0
>
>         Attachments: HBASE-17734.v0.patch, HBASE-17734.v1.patch
>
>
> 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