This is an automated email from the ASF dual-hosted git repository.

apurtell pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
     new ca7ccb9  HBASE-22520 Avoid possible NPE while performing seekBefore in 
HalfStoreFileReader
ca7ccb9 is described below

commit ca7ccb95b0712c6bee81261c5476c3a62af597be
Author: virajjasani <[email protected]>
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 <[email protected]>
---
 .../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 {

Reply via email to