From b1c60940da7035ce1473a11fb5aa0abdccb8d382 Mon Sep 17 00:00:00 2001 From: tedyu Date: Fri, 5 Aug 2016 10:54:20 -0700 Subject: [PATCH] HBASE-16359 Addendum fixes TestZKBasedOpenCloseRegion --- .../hadoop/hbase/regionserver/RSRpcServices.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 0daff17f552..5c19eaedf3e 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,6 +1599,11 @@ 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); @@ -1641,11 +1646,6 @@ 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()); }