HBASE-25432 : branch-1 backport (Update SecureTestUtil) (#2820)

Signed-off-by: Duo Zhang <zhangduo@apache.org>
Signed-off-by: Viraj Jasani <vjasani@apache.org>
This commit is contained in:
lujiefsi 2020-12-29 20:04:36 +08:00 committed by GitHub
parent 73d079eb67
commit 14d8f2f268
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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;