Repository: hbase
Updated Branches:
  refs/heads/branch-1 cd847e599 -> fb1239766
  refs/heads/branch-1.3 8a831e9dd -> 054a0bd9b


HBASE-17572 HMaster: Caught throwable while processing event C_M_MERGE_REGION 
(UndeclaredThrowableException)


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

Branch: refs/heads/branch-1.3
Commit: 054a0bd9be9e646971a5036ac9ca14bfc05f545e
Parents: 8a831e9
Author: Andrew Purtell <[email protected]>
Authored: Thu Feb 2 14:49:56 2017 -0800
Committer: Andrew Purtell <[email protected]>
Committed: Fri Feb 3 14:15:53 2017 -0800

----------------------------------------------------------------------
 .../hadoop/hbase/protobuf/ProtobufUtil.java     | 36 ++++++++++----------
 1 file changed, 18 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/054a0bd9/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
----------------------------------------------------------------------
diff --git 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
index ac48ecd..e83ec40 100644
--- 
a/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
+++ 
b/hbase-client/src/main/java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java
@@ -1985,26 +1985,26 @@ public final class ProtobufUtil {
       final boolean forcible, final User user) throws IOException {
     final MergeRegionsRequest request = 
RequestConverter.buildMergeRegionsRequest(
         region_a.getRegionName(), region_b.getRegionName(),forcible);
-    if (user != null) {
-      try {
-        user.getUGI().doAs(new PrivilegedExceptionAction<Void>() {
-          @Override
-          public Void run() throws Exception {
-            admin.mergeRegions(controller, request);
-            return null;
-          }
-        });
-      } catch (InterruptedException ie) {
-        InterruptedIOException iioe = new InterruptedIOException();
-        iioe.initCause(ie);
-        throw iioe;
-      }
-    } else {
-      try {
+    try {
+      if (user != null) {
+        try {
+          user.getUGI().doAs(new PrivilegedExceptionAction<Void>() {
+            @Override
+            public Void run() throws Exception {
+              admin.mergeRegions(controller, request);
+              return null;
+            }
+          });
+        } catch (InterruptedException ie) {
+          InterruptedIOException iioe = new InterruptedIOException();
+          iioe.initCause(ie);
+          throw iioe;
+        }
+      } else {
         admin.mergeRegions(controller, request);
-      } catch (ServiceException se) {
-        throw ProtobufUtil.getRemoteException(se);
       }
+    } catch (ServiceException se) {
+      throw ProtobufUtil.getRemoteException(se);
     }
   }
 

Reply via email to