Repository: hbase
Updated Branches:
  refs/heads/branch-1 cadc2efd1 -> 4d9589b16


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/4d9589b1
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/4d9589b1
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/4d9589b1

Branch: refs/heads/branch-1
Commit: 4d9589b16546a56623e7ab786438536ffdf3dc22
Parents: cadc2ef
Author: tedyu <yuzhih...@gmail.com>
Authored: Thu Feb 22 12:41:13 2018 -0800
Committer: tedyu <yuzhih...@gmail.com>
Committed: Thu Feb 22 12:41:13 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/4d9589b1/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 62c5f5a..7907073c 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
@@ -997,12 +997,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/4d9589b1/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 62aabce..f45df18 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
@@ -47,7 +47,6 @@ import org.apache.hadoop.hbase.util.Bytes;
 import org.apache.hadoop.hbase.util.FSUtils;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -98,7 +97,6 @@ public class TestRegionOpen {
     assertEquals(2, 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