ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkuliche...@apache.org
Subject [3/4] ignite git commit: IGNITE-3334 - TcpDiscoveryZookeeperIpFinder used INFO logging without isInfoEnabled() check
Date Fri, 17 Jun 2016 12:01:29 GMT
IGNITE-3334 - TcpDiscoveryZookeeperIpFinder used INFO logging without isInfoEnabled() check


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

Branch: refs/heads/master
Commit: 106b8691a313d2c4480bb18bd8e3cfc902b5e214
Parents: 0773332
Author: Valentin Kulichenko <valentin.lulichenko@gmail.com>
Authored: Fri Jun 17 14:57:45 2016 +0300
Committer: Valentin Kulichenko <valentin.lulichenko@gmail.com>
Committed: Fri Jun 17 14:59:49 2016 +0300

----------------------------------------------------------------------
 .../zk/TcpDiscoveryZookeeperIpFinder.java        | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/106b8691/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/TcpDiscoveryZookeeperIpFinder.java
----------------------------------------------------------------------
diff --git a/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/TcpDiscoveryZookeeperIpFinder.java
b/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/TcpDiscoveryZookeeperIpFinder.java
index 238987b..e7a732a 100644
--- a/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/TcpDiscoveryZookeeperIpFinder.java
+++ b/modules/zookeeper/src/main/java/org/apache/ignite/spi/discovery/tcp/ipfinder/zk/TcpDiscoveryZookeeperIpFinder.java
@@ -17,7 +17,6 @@
 
 package org.apache.ignite.spi.discovery.tcp.ipfinder.zk;
 
-import com.google.common.collect.Sets;
 import java.net.InetSocketAddress;
 import java.util.Collection;
 import java.util.Collections;
@@ -26,6 +25,7 @@ import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.atomic.AtomicBoolean;
+import com.google.common.collect.Sets;
 import org.apache.curator.RetryPolicy;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.curator.framework.CuratorFrameworkFactory;
@@ -134,7 +134,8 @@ public class TcpDiscoveryZookeeperIpFinder extends TcpDiscoveryIpFinderAdapter
{
         if (sysPropZkConnString != null && sysPropZkConnString.trim().length() >
0)
             zkConnectionString = sysPropZkConnString;
 
-        log.info("Initializing ZooKeeper IP Finder.");
+        if (log.isInfoEnabled())
+            log.info("Initializing ZooKeeper IP Finder.");
 
         if (curator == null) {
             A.notNullOrEmpty(zkConnectionString, String.format("ZooKeeper URL (or system
property %s) cannot be null " +
@@ -162,7 +163,8 @@ public class TcpDiscoveryZookeeperIpFinder extends TcpDiscoveryIpFinderAdapter
{
             return;
         }
 
-        log.info("Destroying ZooKeeper IP Finder.");
+        if (log.isInfoEnabled())
+            log.info("Destroying ZooKeeper IP Finder.");
 
         super.onSpiContextDestroyed();
 
@@ -193,7 +195,8 @@ public class TcpDiscoveryZookeeperIpFinder extends TcpDiscoveryIpFinderAdapter
{
         for (ServiceInstance<IgniteInstanceDetails> si : serviceInstances)
             answer.add(new InetSocketAddress(si.getAddress(), si.getPort()));
 
-        log.info("ZooKeeper IP Finder resolved addresses: " + answer);
+        if (log.isInfoEnabled())
+            log.info("ZooKeeper IP Finder resolved addresses: " + answer);
 
         return answer;
     }
@@ -202,7 +205,8 @@ public class TcpDiscoveryZookeeperIpFinder extends TcpDiscoveryIpFinderAdapter
{
     @Override public void registerAddresses(Collection<InetSocketAddress> addrs) throws
IgniteSpiException {
         init();
 
-        log.info("Registering addresses with ZooKeeper IP Finder: " + addrs);
+        if (log.isInfoEnabled())
+            log.info("Registering addresses with ZooKeeper IP Finder: " + addrs);
 
         Set<InetSocketAddress> registrationsToIgnore = Sets.newHashSet();
         if (!allowDuplicateRegistrations) {
@@ -248,7 +252,8 @@ public class TcpDiscoveryZookeeperIpFinder extends TcpDiscoveryIpFinderAdapter
{
         if (curator.getState() != CuratorFrameworkState.STARTED)
             return;
 
-        log.info("Unregistering addresses with ZooKeeper IP Finder: " + addrs);
+        if (log.isInfoEnabled())
+            log.info("Unregistering addresses with ZooKeeper IP Finder: " + addrs);
 
         for (InetSocketAddress addr : addrs) {
             ServiceInstance<IgniteInstanceDetails> si = ourInstances.get(addr);
@@ -362,4 +367,4 @@ public class TcpDiscoveryZookeeperIpFinder extends TcpDiscoveryIpFinderAdapter
{
 
     }
 
-}
\ No newline at end of file
+}


Mime
View raw message