Repository: hbase
Updated Branches:
  refs/heads/branch-2 6c039383b -> f3753e394


HBASE-20052 TestRegionOpen#testNonExistentRegionReplica fails due to NPE


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/f3753e39
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/f3753e39
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/f3753e39

Branch: refs/heads/branch-2
Commit: f3753e394aefa4ae391a059264d679d36315deef
Parents: 6c03938
Author: tedyu <yuzhih...@gmail.com>
Authored: Thu Feb 22 12:35:50 2018 -0800
Committer: tedyu <yuzhih...@gmail.com>
Committed: Thu Feb 22 12:35:50 2018 -0800

----------------------------------------------------------------------
 .../org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java   | 3 +--
 .../java/org/apache/hadoop/hbase/regionserver/TestRegionOpen.java | 2 --
 2 files changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/f3753e39/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
index 3c2d392..904060f 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionFileSystem.java
@@ -986,12 +986,11 @@ public class HRegionFileSystem {
 
       // Write HRI to a file in case we need to recover hbase:meta
       regionFs.writeRegionInfoOnFilesystem(false);
-      return regionFs;
     } else {
       if (LOG.isDebugEnabled())
         LOG.debug("Skipping creation of .regioninfo file for " + regionInfo);
     }
-    return null;
+    return regionFs;
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/hbase/blob/f3753e39/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionOpen.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionOpen.java
 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionOpen.java
index 48ca403..7190d84 100644
--- 
a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionOpen.java
+++ 
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestRegionOpen.java
@@ -45,7 +45,6 @@ import org.apache.hadoop.hbase.util.FSUtils;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.ClassRule;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -101,7 +100,6 @@ public class TestRegionOpen {
     assertEquals(completed + 1, exec.getCompletedTaskCount());
   }
 
-  @Ignore // Needs rewrite since HBASE-19391 which returns null out of 
createRegionOnFileSystem
   @Test
   public void testNonExistentRegionReplica() throws Exception {
     final TableName tableName = TableName.valueOf(name.getMethodName());

Reply via email to