[2/2] hbase git commit: HBASE-17572 HMaster: Caught throwable while processing event C_M_MERGE_REGION

2017-02-09 Thread apurtell
HBASE-17572 HMaster: Caught throwable while processing event C_M_MERGE_REGION


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

Branch: refs/heads/branch-1.3
Commit: 65d1af5711302d4ba37025c8891e5a9524619400
Parents: 6959208
Author: Andrew Purtell 
Authored: Wed Feb 8 16:04:47 2017 -0800
Committer: Andrew Purtell 
Committed: Thu Feb 9 13:37:42 2017 -0800

--
 .../java/org/apache/hadoop/hbase/protobuf/ProtobufUtil.java| 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/hbase/blob/65d1af57/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..5a78601 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
@@ -1990,7 +1990,11 @@ public final class ProtobufUtil {
 user.getUGI().doAs(new PrivilegedExceptionAction() {
   @Override
   public Void run() throws Exception {
-admin.mergeRegions(controller, request);
+try {
+  admin.mergeRegions(controller, request);
+} catch (ServiceException se) {
+  throw ProtobufUtil.getRemoteException(se);
+}
 return null;
   }
 });



[2/2] hbase git commit: HBASE-17572 HMaster: Caught throwable while processing event C_M_MERGE_REGION (UndeclaredThrowableException)

2017-02-03 Thread apurtell
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/fb123976
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fb123976
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fb123976

Branch: refs/heads/branch-1
Commit: fb1239766d08ef7b888261d25ecfd42e95566081
Parents: cd847e5
Author: Andrew Purtell 
Authored: Thu Feb 2 14:49:56 2017 -0800
Committer: Andrew Purtell 
Committed: Fri Feb 3 14:15:56 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/fb123976/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 ca2dd04..715d106 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
@@ -1993,26 +1993,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() {
-  @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() {
+@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);
 }
   }