From 811f0e7d2afba0dee8cf6401153caf9ec9b716ec Mon Sep 17 00:00:00 2001 From: Duo Zhang Date: Thu, 28 Jul 2022 17:20:13 +0800 Subject: [PATCH] HBASE-27185 Addendum fix TestShadeSaslAuthenticationProvider --- .../org/apache/hadoop/hbase/ipc/NettyRpcConnection.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcConnection.java b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcConnection.java index d211b1b98e57..dd34856f5643 100644 --- a/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcConnection.java +++ b/hbase-client/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcConnection.java @@ -35,6 +35,7 @@ import org.apache.hadoop.hbase.security.NettyHBaseRpcConnectionHeaderHandler; import org.apache.hadoop.hbase.security.NettyHBaseSaslRpcClientHandler; import org.apache.hadoop.hbase.security.SaslChallengeDecoder; +import org.apache.hadoop.hbase.util.NettyFutureUtils; import org.apache.hadoop.hbase.util.Threads; import org.apache.hadoop.security.UserGroupInformation; import org.apache.yetus.audience.InterfaceAudience; @@ -216,8 +217,9 @@ private void saslNegotiate(final Channel ch) { failInit(ch, e); return; } - ch.pipeline().addFirst(new SaslChallengeDecoder(), saslHandler); - saslPromise.addListener(new FutureListener() { + ch.pipeline().addFirst("SaslDecoder", new SaslChallengeDecoder()).addAfter("SaslDecoder", + "SaslHandler", saslHandler); + NettyFutureUtils.addListener(saslPromise, new FutureListener() { @Override public void operationComplete(Future future) throws Exception {