Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A0726200B34 for ; Fri, 17 Jun 2016 14:01:29 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 9F37D160A62; Fri, 17 Jun 2016 12:01:29 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E5E25160A61 for ; Fri, 17 Jun 2016 14:01:28 +0200 (CEST) Received: (qmail 81349 invoked by uid 500); 17 Jun 2016 12:01:28 -0000 Mailing-List: contact commits-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list commits@ignite.apache.org Received: (qmail 81338 invoked by uid 99); 17 Jun 2016 12:01:28 -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, 17 Jun 2016 12:01:28 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id EB027E094C; Fri, 17 Jun 2016 12:01:27 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: vkulichenko@apache.org To: commits@ignite.apache.org Date: Fri, 17 Jun 2016 12:01:29 -0000 Message-Id: In-Reply-To: <408d5184d0234035baac9c64dad0822d@git.apache.org> References: <408d5184d0234035baac9c64dad0822d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [3/4] ignite git commit: IGNITE-3334 - TcpDiscoveryZookeeperIpFinder used INFO logging without isInfoEnabled() check archived-at: Fri, 17 Jun 2016 12:01:29 -0000 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 Authored: Fri Jun 17 14:57:45 2016 +0300 Committer: Valentin Kulichenko 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 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 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 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 si = ourInstances.get(addr); @@ -362,4 +367,4 @@ public class TcpDiscoveryZookeeperIpFinder extends TcpDiscoveryIpFinderAdapter { } -} \ No newline at end of file +}