From dev-return-74820-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Fri Oct 19 17:38:56 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id C4FF9180652 for ; Fri, 19 Oct 2018 17:38:55 +0200 (CEST) Received: (qmail 11447 invoked by uid 500); 19 Oct 2018 15:38:53 -0000 Mailing-List: contact dev-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list dev@zookeeper.apache.org Received: (qmail 10691 invoked by uid 99); 19 Oct 2018 15:38:53 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Oct 2018 15:38:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C68BCDFC43; Fri, 19 Oct 2018 15:38:52 +0000 (UTC) From: eolivelli To: dev@zookeeper.apache.org Reply-To: dev@zookeeper.apache.org References: In-Reply-To: Subject: [GitHub] zookeeper pull request #669: ZOOKEEPER-3152: Port ZK netty stack to netty4 Content-Type: text/plain Message-Id: <20181019153852.C68BCDFC43@git1-us-west.apache.org> Date: Fri, 19 Oct 2018 15:38:52 +0000 (UTC) Github user eolivelli commented on a diff in the pull request: https://github.com/apache/zookeeper/pull/669#discussion_r226681741 --- Diff: zookeeper-common/src/main/java/org/apache/zookeeper/ClientCnxnSocketNetty.java --- @@ -68,18 +70,21 @@ public class ClientCnxnSocketNetty extends ClientCnxnSocket { private static final Logger LOG = LoggerFactory.getLogger(ClientCnxnSocketNetty.class); - ChannelFactory channelFactory = new NioClientSocketChannelFactory( - Executors.newCachedThreadPool(), Executors.newCachedThreadPool()); - Channel channel; - CountDownLatch firstConnect; - ChannelFuture connectFuture; - Lock connectLock = new ReentrantLock(); - AtomicBoolean disconnected = new AtomicBoolean(); - AtomicBoolean needSasl = new AtomicBoolean(); - Semaphore waitSasl = new Semaphore(0); + private final EventLoopGroup eventLoopGroup; + private Channel channel; + private CountDownLatch firstConnect; + private ChannelFuture connectFuture; + private final Lock connectLock = new ReentrantLock(); + private final AtomicBoolean disconnected = new AtomicBoolean(); + private final AtomicBoolean needSasl = new AtomicBoolean(); + private final Semaphore waitSasl = new Semaphore(0); + + private static final AtomicReference TEST_ALLOCATOR = + new AtomicReference<>(null); ClientCnxnSocketNetty(ZKClientConfig clientConfig) throws IOException { this.clientConfig = clientConfig; + eventLoopGroup = new NioEventLoopGroup(0, Executors.newCachedThreadPool()); --- End diff -- Let's move to Epoll. It can be a followup change (I can send of you don't have already it on your stack of changes) ---