apurtell commented on code in PR #4619:
URL: https://github.com/apache/hbase/pull/4619#discussion_r921432168
##########
hbase-server/src/main/java/org/apache/hadoop/hbase/ipc/NettyRpcServer.java:
##########
@@ -97,21 +85,16 @@ public NettyRpcServer(Server server, String name,
List<BlockingServiceAndInterfa
super(server, name, services, bindAddress, conf, scheduler,
reservoirEnabled);
this.bindAddress = bindAddress;
this.channelAllocator = getChannelAllocator(conf);
- EventLoopGroup eventLoopGroup;
- Class<? extends ServerChannel> channelClass;
- if (server instanceof HRegionServer) {
- NettyEventLoopGroupConfig config = ((HBaseServerBase)
server).getEventLoopGroupConfig();
- eventLoopGroup = config.group();
- channelClass = config.serverChannelClass();
- } else {
- int threadCount = server == null
- ? EVENTLOOP_THREADCOUNT_DEFAULT
- :
server.getConfiguration().getInt(HBASE_NETTY_EVENTLOOP_RPCSERVER_THREADCOUNT_KEY,
- EVENTLOOP_THREADCOUNT_DEFAULT);
- eventLoopGroup = new NioEventLoopGroup(threadCount,
- new DefaultThreadFactory("NettyRpcServer", true, Thread.MAX_PRIORITY));
- channelClass = NioServerSocketChannel.class;
+ // Get the event loop group configuration from the server class if
available.
+ NettyEventLoopGroupConfig config = null;
+ if (server != null) {
Review Comment:
I will add the comment, sounds good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]