You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2022/07/14 17:58:34 UTC

[GitHub] [hbase] apurtell commented on a diff in pull request #4619: HBASE-27195 Clean up netty worker/thread pool configuration

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: issues-unsubscribe@hbase.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org