zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject zookeeper git commit: ZOOKEEPER-2638: ZooKeeper should log which serverCnxnFactory is used during startup
Date Sat, 08 Apr 2017 22:16:36 GMT
Repository: zookeeper
Updated Branches:
  refs/heads/branch-3.4 8a0c6f421 -> a1b39d4a1


ZOOKEEPER-2638: ZooKeeper should log which serverCnxnFactory is used during startup

Author: Abraham Fine <afine@apache.org>

Reviewers: Michael Han <hanm@apache.org>

Closes #218 from afine/ZOOKEEPER-2638_3.4


Project: http://git-wip-us.apache.org/repos/asf/zookeeper/repo
Commit: http://git-wip-us.apache.org/repos/asf/zookeeper/commit/a1b39d4a
Tree: http://git-wip-us.apache.org/repos/asf/zookeeper/tree/a1b39d4a
Diff: http://git-wip-us.apache.org/repos/asf/zookeeper/diff/a1b39d4a

Branch: refs/heads/branch-3.4
Commit: a1b39d4a152f932077bb678a7d4816df4b6fe591
Parents: 8a0c6f4
Author: Abraham Fine <afine@apache.org>
Authored: Sat Apr 8 15:16:43 2017 -0700
Committer: Michael Han <hanm@apache.org>
Committed: Sat Apr 8 15:16:43 2017 -0700

----------------------------------------------------------------------
 .../main/org/apache/zookeeper/server/ServerCnxnFactory.java   | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zookeeper/blob/a1b39d4a/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
----------------------------------------------------------------------
diff --git a/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java b/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
index cf417f8..2a67ec5 100644
--- a/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
+++ b/src/java/main/org/apache/zookeeper/server/ServerCnxnFactory.java
@@ -46,7 +46,7 @@ public abstract class ServerCnxnFactory {
         public void processPacket(ByteBuffer packet, ServerCnxn src);
     }
     
-    Logger LOG = LoggerFactory.getLogger(ServerCnxnFactory.class);
+    private static final Logger LOG = LoggerFactory.getLogger(ServerCnxnFactory.class);
 
     /**
      * The buffer will cause the connection to be close when we do a send.
@@ -107,8 +107,9 @@ public abstract class ServerCnxnFactory {
             serverCnxnFactoryName = NIOServerCnxnFactory.class.getName();
         }
         try {
-            return (ServerCnxnFactory) Class.forName(serverCnxnFactoryName)
-                                                .newInstance();
+            ServerCnxnFactory serverCnxnFactory = (ServerCnxnFactory) Class.forName(serverCnxnFactoryName).newInstance();
+            LOG.info("Using {} as server connection factory", serverCnxnFactoryName);
+            return serverCnxnFactory;
         } catch (Exception e) {
             IOException ioe = new IOException("Couldn't instantiate "
                     + serverCnxnFactoryName);


Mime
View raw message