Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
-
Reviewed
Description
In master branch,
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
// From line 2858 public void prepareDeleteTimestamps(Mutation mutation, Map<byte[], List<Cell>> familyMap, byte[] byteNow) throws IOException { for (Map.Entry<byte[], List<Cell>> e : familyMap.entrySet()) { // ... for (int i=0; i < listSize; i++) { // ... if (cell.getTimestamp() == HConstants.LATEST_TIMESTAMP && CellUtil.isDeleteType(cell)) { byte[] qual = CellUtil.cloneQualifier(cell); if (qual == null) qual = HConstants.EMPTY_BYTE_ARRAY; // <-- here ...
Might if (qual == null) qual = HConstants.EMPTY_BYTE_ARRAY; be removed?
Could it be null after CellUtil.cloneQualifier()?
hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java
public static byte[] cloneQualifier(Cell cell){ byte[] output = new byte[cell.getQualifierLength()]; copyQualifierTo(cell, output, 0); return output; }