hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-16359 NullPointerException in RSRpcServices.openRegion()
Date Fri, 05 Aug 2016 10:21:36 GMT
Repository: hbase
Updated Branches:
  refs/heads/branch-1 7a62076ae -> 00f6af2e8


HBASE-16359 NullPointerException in RSRpcServices.openRegion()


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

Branch: refs/heads/branch-1
Commit: 00f6af2e85c175f0d35e73579b399084469680cb
Parents: 7a62076
Author: tedyu <yuzhihong@gmail.com>
Authored: Fri Aug 5 03:21:23 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Fri Aug 5 03:21:23 2016 -0700

----------------------------------------------------------------------
 .../hadoop/hbase/regionserver/RSRpcServices.java       | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/00f6af2e/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
index 329abb6..0daff17 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RSRpcServices.java
@@ -1599,11 +1599,6 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
           }
         }
         LOG.info("Open " + region.getRegionNameAsString());
-        htd = htds.get(region.getTable());
-        if (htd == null) {
-          htd = regionServer.tableDescriptors.get(region.getTable());
-          htds.put(region.getTable(), htd);
-        }
 
         final Boolean previous = regionServer.regionsInTransitionInRS.putIfAbsent(
           region.getEncodedNameAsBytes(), Boolean.TRUE);
@@ -1646,6 +1641,14 @@ public class RSRpcServices implements HBaseRPCErrorHandler,
                 tmpRegions);
             }
           }
+          htd = htds.get(region.getTable());
+          if (htd == null) {
+            htd = regionServer.tableDescriptors.get(region.getTable());
+            htds.put(region.getTable(), htd);
+          }
+          if (htd == null) {
+            throw new IOException("Missing table descriptor for " + region.getEncodedName());
+          }
           // If there is no action in progress, we can submit a specific handler.
           // Need to pass the expected version in the constructor.
           if (region.isMetaRegion()) {


Mime
View raw message