Package org.apache.hadoop.hbase.ipc
Class NettyRpcClientConfigHelper
java.lang.Object
org.apache.hadoop.hbase.ipc.NettyRpcClientConfigHelper
Helper class for passing config to
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.
- Since:
- 2.0.0
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup,Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>> static final Stringprivate static final Map<String,Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup, Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>>> static final StringName of property to change netty rpc client eventloop thread count. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcreateEventLoopPerClient(org.apache.hadoop.conf.Configuration conf) TheNettyRpcClientwill create its ownNioEventLoopGroup.private static Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup,Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>> getDefaultEventLoopConfig(org.apache.hadoop.conf.Configuration conf) (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 voidsetEventLoopConfig(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 forAsyncRpcClient.
-
Field Details
-
EVENT_LOOP_CONFIG
- See Also:
-
HBASE_NETTY_EVENTLOOP_RPCCLIENT_THREADCOUNT_KEY
Name of property to change netty rpc client eventloop thread count. Default is 0. Tests may set this down from unlimited.- See Also:
-
CONFIG_NAME
- See Also:
-
EVENT_LOOP_CONFIG_MAP
private static final Map<String,Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup, EVENT_LOOP_CONFIG_MAPClass<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>>> -
DEFAULT_EVENT_LOOP
private static volatile Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup,Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>> DEFAULT_EVENT_LOOP
-
-
Constructor Details
-
NettyRpcClientConfigHelper
private NettyRpcClientConfigHelper()Shutdown constructor.
-
-
Method Details
-
setEventLoopConfig
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) Set the EventLoopGroup and channel class forAsyncRpcClient. -
createEventLoopPerClient
TheNettyRpcClientwill create its ownNioEventLoopGroup. -
getDefaultEventLoopConfig
private static Pair<org.apache.hbase.thirdparty.io.netty.channel.EventLoopGroup,Class<? extends org.apache.hbase.thirdparty.io.netty.channel.Channel>> getDefaultEventLoopConfig(org.apache.hadoop.conf.Configuration conf) -
getEventLoopConfig
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)
-