zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eolivelli <...@git.apache.org>
Subject [GitHub] zookeeper pull request #669: ZOOKEEPER-3152: Port ZK netty stack to netty4
Date Fri, 19 Oct 2018 15:38:52 GMT
Github user eolivelli commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/669#discussion_r226690548
  
    --- Diff: zookeeper-server/src/main/java/org/apache/zookeeper/server/NettyServerCnxnFactory.java
---
    @@ -335,29 +260,34 @@ public void operationComplete(ChannelFuture future)
         CnxnChannelHandler channelHandler = new CnxnChannelHandler();
     
         NettyServerCnxnFactory() {
    -        bootstrap = new ServerBootstrap(
    -                new NioServerSocketChannelFactory(
    -                        Executors.newCachedThreadPool(),
    -                        Executors.newCachedThreadPool()));
    -        // parent channel
    -        bootstrap.setOption("reuseAddress", true);
    -        // child channels
    -        bootstrap.setOption("child.tcpNoDelay", true);
    -        /* set socket linger to off, so that socket close does not block */
    -        bootstrap.setOption("child.soLinger", -1);
    -        bootstrap.setPipelineFactory(new ChannelPipelineFactory() {
    -            @Override
    -            public ChannelPipeline getPipeline() throws Exception {
    -                ChannelPipeline p = Channels.pipeline();
    -                if (secure) {
    -                    initSSL(p);
    -                }
    -                p.addLast("servercnxnfactory", channelHandler);
    -
    -                return p;
    -            }
    -        });
             x509Util = new ClientX509Util();
    +
    +        EventLoopGroup bossGroup = new NioEventLoopGroup(0, Executors.newCachedThreadPool());
    --- End diff --
    
    Consider EPoll


---

Mime
View raw message