zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maoling <...@git.apache.org>
Subject [GitHub] zookeeper pull request #593: [ZOOKEEPER-3111] Add socket buffer size option ...
Date Sun, 19 Aug 2018 10:01:50 GMT
Github user maoling commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/593#discussion_r211098029
  
    --- Diff: src/java/main/org/apache/zookeeper/server/SocketUtil.java ---
    @@ -0,0 +1,63 @@
    +package org.apache.zookeeper.server;
    +
    +import java.net.ServerSocket;
    +import java.net.Socket;
    +import java.net.SocketAddress;
    +import java.net.SocketException;
    +import java.io.IOException;
    +
    +import org.slf4j.Logger;
    +import org.slf4j.LoggerFactory;
    +
    +public class SocketUtil {
    +
    +    private static final Logger LOG = LoggerFactory.getLogger(SocketUtil.class);
    +
    +    public static final String NETWORK_BUFFER_SIZE = "zookeeper.NetworkBufferSize";
    +    protected static int networkBufferSize;
    +
    +
    +    static {
    +        networkBufferSize = Integer.getInteger(NETWORK_BUFFER_SIZE, -1);
    +        LOG.info("{} = {}", NETWORK_BUFFER_SIZE, networkBufferSize);
    +    }
    --- End diff --
    
    add a unit: `byte` in the log is better?


---

Mime
View raw message