cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject cassandra git commit: use parameterized logging
Date Thu, 18 May 2017 01:00:12 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk e368cf91a -> d8836d485


use parameterized logging


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

Branch: refs/heads/trunk
Commit: d8836d4856599375951ef77f8189fb71a4335ada
Parents: e368cf9
Author: Dave Brosius <dbrosius@mebigfatguy.com>
Authored: Wed May 17 20:59:20 2017 -0400
Committer: Dave Brosius <dbrosius@mebigfatguy.com>
Committed: Wed May 17 20:59:20 2017 -0400

----------------------------------------------------------------------
 src/java/org/apache/cassandra/dht/RangeStreamer.java         | 6 +++---
 src/java/org/apache/cassandra/net/OutboundTcpConnection.java | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8836d48/src/java/org/apache/cassandra/dht/RangeStreamer.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/dht/RangeStreamer.java b/src/java/org/apache/cassandra/dht/RangeStreamer.java
index d104b23..134ed13 100644
--- a/src/java/org/apache/cassandra/dht/RangeStreamer.java
+++ b/src/java/org/apache/cassandra/dht/RangeStreamer.java
@@ -181,7 +181,7 @@ public class RangeStreamer
     {
         if(Keyspace.open(keyspaceName).getReplicationStrategy() instanceof LocalStrategy)
         {
-            logger.info("Not adding ranges for Local Strategy keyspace=" + keyspaceName);
+            logger.info("Not adding ranges for Local Strategy keyspace={}", keyspaceName);
             return;
         }
 
@@ -190,7 +190,7 @@ public class RangeStreamer
                 ? getAllRangesWithStrictSourcesFor(keyspaceName, ranges) : getAllRangesWithSourcesFor(keyspaceName,
ranges);
 
         for (Map.Entry<Range<Token>, InetAddress> entry : rangesForKeyspace.entries())
-            logger.info(String.format("{}: range {} exists on {} for keyspace {}", description,
entry.getKey(), entry.getValue(), keyspaceName));
+            logger.info("{}: range {} exists on {} for keyspace {}", description, entry.getKey(),
entry.getValue(), keyspaceName);
 
 
         Multimap<InetAddress, Range<Token>> rangeFetchMap = useStrictSource ?
getRangeFetchMap(rangesForKeyspace, sourceFilters, keyspaceName, useStrictConsistency) :
@@ -375,7 +375,7 @@ public class RangeStreamer
     {
         RangeFetchMapCalculator calculator = new RangeFetchMapCalculator(rangesWithSources,
sourceFilters, keyspace);
         Multimap<InetAddress, Range<Token>> rangeFetchMapMap = calculator.getRangeFetchMap();
-        logger.info("Output from RangeFetchMapCalculator for keyspace " + keyspace);
+        logger.info("Output from RangeFetchMapCalculator for keyspace {}", keyspace);
         validateRangeFetchMap(rangesWithSources, rangeFetchMapMap, keyspace);
         return rangeFetchMapMap;
     }

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d8836d48/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
index 0677958..42abbe6 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
@@ -193,7 +193,7 @@ public class OutboundTcpConnection extends FastThreadLocalThread
     /**
      * This is a helper method for unit testing. Disclaimer: Do not use this method outside
unit tests, as
      * this method is iterating the queue which can be an expensive operation (CPU time,
queue locking).
-     * 
+     *
      * @return true, if the queue contains at least one expired element
      */
     @VisibleForTesting // (otherwise = VisibleForTesting.NONE)
@@ -275,7 +275,7 @@ public class OutboundTcpConnection extends FastThreadLocalThread
                 }
                 catch (InternodeAuthFailed e)
                 {
-                    logger.warn("Internode auth failed connecting to " + poolReference.endPoint());
+                    logger.warn("Internode auth failed connecting to {}", poolReference.endPoint());
                     //Remove the connection pool and other thread so messages aren't queued
                     MessagingService.instance().destroyConnectionPool(poolReference.endPoint());
                 }
@@ -594,7 +594,7 @@ public class OutboundTcpConnection extends FastThreadLocalThread
     /**
      * Expire elements from the queue if the queue is pretty full and expiration is not already
in progress.
      * This method will only remove droppable expired entries. If no such element exists,
nothing is removed from the queue.
-     * 
+     *
      * @param timestampNanos The current time as from System.nanoTime()
      */
     @VisibleForTesting


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org


Mime
View raw message