HBASE-23987 NettyRpcClientConfigHelper will not share event loop by default which is incorrect (#1288)

Signed-off-by: stack <stack@apache.org>
This commit is contained in:
Duo Zhang 2020-03-14 13:47:41 +08:00 committed by stack
parent 30607308db
commit 2d27e8d2d5
1 changed files with 2 additions and 4 deletions

View File

@ -23,6 +23,7 @@ import org.apache.commons.lang3.StringUtils;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.util.Pair;
import org.apache.yetus.audience.InterfaceAudience;
import org.apache.hbase.thirdparty.com.google.common.base.Preconditions;
import org.apache.hbase.thirdparty.io.netty.channel.Channel;
import org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup;
@ -106,10 +107,7 @@ public final class NettyRpcClientConfigHelper {
static Pair<EventLoopGroup, Class<? extends Channel>> getEventLoopConfig(Configuration conf) {
String name = conf.get(EVENT_LOOP_CONFIG);
if (name == null) {
int threadCount = conf.getInt(HBASE_NETTY_EVENTLOOP_RPCCLIENT_THREADCOUNT_KEY, 0);
return new Pair<>(new NioEventLoopGroup(threadCount,
new DefaultThreadFactory("RPCClient-NioEventLoopGroup", true,
Thread.NORM_PRIORITY)), NioSocketChannel.class);
return getDefaultEventLoopConfig(conf);
}
if (StringUtils.isBlank(name)) {
return null;