geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From u..@apache.org
Subject [35/50] [abbrv] incubator-geode git commit: Fix e.printStackTrace() in ClientPartitionAdvisor
Date Wed, 10 Aug 2016 19:41:21 GMT
Fix e.printStackTrace() in ClientPartitionAdvisor

the exception was logged using e.printstacktrace(), switch to use the
LoggerService.

This closes #225


Project: http://git-wip-us.apache.org/repos/asf/incubator-geode/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-geode/commit/8897b879
Tree: http://git-wip-us.apache.org/repos/asf/incubator-geode/tree/8897b879
Diff: http://git-wip-us.apache.org/repos/asf/incubator-geode/diff/8897b879

Branch: refs/heads/feature/GEODE-420
Commit: 8897b879ea772219f43542ac8603d866d6ba7736
Parents: 91e234f
Author: Olivier Mallassi <olivier.mallassi@gmail.com>
Authored: Wed Aug 3 10:28:38 2016 +0200
Committer: Dan Smith <upthewaterspout@apache.org>
Committed: Thu Aug 4 10:20:03 2016 -0700

----------------------------------------------------------------------
 .../cache/client/internal/ClientPartitionAdvisor.java       | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-geode/blob/8897b879/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientPartitionAdvisor.java
----------------------------------------------------------------------
diff --git a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientPartitionAdvisor.java
b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientPartitionAdvisor.java
index 6a42d46..f245c3e 100755
--- a/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientPartitionAdvisor.java
+++ b/geode-core/src/main/java/com/gemstone/gemfire/cache/client/internal/ClientPartitionAdvisor.java
@@ -38,6 +38,8 @@ import com.gemstone.gemfire.internal.cache.FixedPartitionAttributesImpl;
 import com.gemstone.gemfire.internal.cache.BucketServerLocation66;
 import com.gemstone.gemfire.internal.cache.GemFireCacheImpl;
 import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
+import com.gemstone.gemfire.internal.logging.LogService;
+import org.apache.logging.log4j.Logger;
 
 /**
  * Stores the information such as partition attributes and meta data details
@@ -48,6 +50,8 @@ import com.gemstone.gemfire.internal.i18n.LocalizedStrings;
  */
 public class ClientPartitionAdvisor {
 
+  private static final Logger logger = LogService.getLogger();
+
   private final ConcurrentMap<Integer, List<BucketServerLocation66>> bucketServerLocationsMap

   = new ConcurrentHashMap<Integer, List<BucketServerLocation66>>();
 
@@ -76,7 +80,10 @@ public class ClientPartitionAdvisor {
       }
     }
     catch (Exception e) {
-      e.printStackTrace();
+      if(logger.isErrorEnabled()) {
+        logger.error(e.getMessage(), e);
+      }
+      
       throw new InternalGemFireException(LocalizedStrings.ClientPartitionAdvisor_CANNOT_CREATE_AN_INSTANCE_OF_PARTITION_RESOLVER_0.toLocalizedString(partitionResolverName));
     }
     if (fpaSet != null) {


Mime
View raw message