You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by ap...@apache.org on 2019/06/20 22:13:24 UTC
[hbase] branch branch-1.3 updated: HBASE-22520 Avoid possible NPE
while performing seekBefore in HalfStoreFileReader
This is an automated email from the ASF dual-hosted git repository.
apurtell pushed a commit to branch branch-1.3
in repository https://gitbox.apache.org/repos/asf/hbase.git
The following commit(s) were added to refs/heads/branch-1.3 by this push:
new 9daa108 HBASE-22520 Avoid possible NPE while performing seekBefore in HalfStoreFileReader
9daa108 is described below
commit 9daa1082584bfd0975398c6a4d9fb822d9264cd8
Author: virajjasani <34...@users.noreply.github.com>
AuthorDate: Fri Jun 7 04:13:36 2019 +0530
HBASE-22520 Avoid possible NPE while performing seekBefore in HalfStoreFileReader
Conflicts:
hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
Co-authored-by: Andrew Purtell <ap...@apache.org>
---
.../src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
index c259fc2..972c3b5 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/HalfStoreFileReader.java
@@ -297,7 +297,7 @@ public class HalfStoreFileReader extends StoreFile.Reader {
public boolean seekBefore(Cell key) throws IOException {
if (top) {
Cell fk = new KeyValue.KeyOnlyKeyValue(getFirstKey(), 0, getFirstKey().length);
- if (getComparator().compareOnlyKeyPortion(key, fk) <= 0) {
+ if (fk != null && getComparator().compareOnlyKeyPortion(key, fk) <= 0) {
return false;
}
} else {