You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by vj...@apache.org on 2020/12/29 12:05:19 UTC

[hbase] branch branch-1 updated: HBASE-25432 : branch-1 backport (Update SecureTestUtil) (#2820)

This is an automated email from the ASF dual-hosted git repository.

vjasani pushed a commit to branch branch-1
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/branch-1 by this push:
     new 14d8f2f  HBASE-25432 : branch-1 backport (Update SecureTestUtil) (#2820)
14d8f2f is described below

commit 14d8f2f268ff71e32a85ae5571bbff79fdc934f4
Author: lujiefsi <lu...@foxmail.com>
AuthorDate: Tue Dec 29 20:04:36 2020 +0800

    HBASE-25432 : branch-1 backport (Update SecureTestUtil) (#2820)
    
    Signed-off-by: Duo Zhang <zh...@apache.org>
    Signed-off-by: Viraj Jasani <vj...@apache.org>
---
 .../java/org/apache/hadoop/hbase/security/access/SecureTestUtil.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/SecureTestUtil.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/SecureTestUtil.java
index 92a44c4..b071a66 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/SecureTestUtil.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/access/SecureTestUtil.java
@@ -54,6 +54,7 @@ import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
 import org.apache.hadoop.hbase.coprocessor.ObserverContext;
 import org.apache.hadoop.hbase.coprocessor.MasterCoprocessorEnvironment;
 import org.apache.hadoop.hbase.io.hfile.HFile;
+import org.apache.hadoop.hbase.ipc.RemoteWithExtrasException;
 import org.apache.hadoop.hbase.master.HMaster;
 import org.apache.hadoop.hbase.protobuf.ProtobufUtil;
 import org.apache.hadoop.hbase.protobuf.generated.AccessControlProtos;
@@ -281,6 +282,9 @@ public class SecureTestUtil {
           // is buried in the stack trace
           Throwable ex = e;
           do {
+            if (ex instanceof RemoteWithExtrasException) {
+              ex = ((RemoteWithExtrasException) ex).unwrapRemoteException();
+            }
             if (ex instanceof AccessDeniedException) {
               isAccessDeniedException = true;
               break;