@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 |
---|---|
private static String |
CONFIG_NAME |
static String |
EVENT_LOOP_CONFIG |
private static Map<String,Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup,Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>>> |
EVENT_LOOP_CONFIG_MAP |
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 . |
(package private) static Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup,Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>> |
getEventLoopConfig(org.apache.hadoop.conf.Configuration conf) |
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
private static final String CONFIG_NAME
private static final Map<String,Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup,Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>>> EVENT_LOOP_CONFIG_MAP
public NettyRpcClientConfigHelper()
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
.static Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup,Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>> getEventLoopConfig(org.apache.hadoop.conf.Configuration conf)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.