@InterfaceAudience.Public public class NettyRpcClientConfigHelper extends Object
NettyRpcClient
.
As hadoop Configuration can not pass an Object directly, we need to find a way to pass the
EventLoopGroup to AsyncRpcClient
if we want to use a single EventLoopGroup
for
the whole process.
Modifier and Type | Field and Description |
---|---|
static String |
EVENT_LOOP_CONFIG |
Constructor and Description |
---|
NettyRpcClientConfigHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
createEventLoopPerClient(org.apache.hadoop.conf.Configuration conf)
The
AsyncRpcClient will create its own NioEventLoopGroup . |
static void |
setEventLoopConfig(org.apache.hadoop.conf.Configuration conf,
org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup group,
Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel> channelClass)
Set the EventLoopGroup and channel class for
AsyncRpcClient . |
public static final String EVENT_LOOP_CONFIG
public static void setEventLoopConfig(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup group, Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel> channelClass)
AsyncRpcClient
.public static void createEventLoopPerClient(org.apache.hadoop.conf.Configuration conf)
AsyncRpcClient
will create its own NioEventLoopGroup
.Copyright © 2007–2019 Cloudera. All rights reserved.