cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject git commit: presize collection
Date Wed, 08 May 2013 01:35:02 GMT
Updated Branches:
  refs/heads/trunk dbc8bd85f -> 782536176


presize collection


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

Branch: refs/heads/trunk
Commit: 782536176e24fdb34635e024b48085343dada337
Parents: dbc8bd8
Author: Dave Brosius <dbrosius@apache.org>
Authored: Tue May 7 21:33:59 2013 -0400
Committer: Dave Brosius <dbrosius@apache.org>
Committed: Tue May 7 21:33:59 2013 -0400

----------------------------------------------------------------------
 .../cassandra/locator/DynamicEndpointSnitch.java   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/78253617/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
index 1094a00..978c2e2 100644
--- a/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
+++ b/src/java/org/apache/cassandra/locator/DynamicEndpointSnitch.java
@@ -229,7 +229,7 @@ public class DynamicEndpointSnitch extends AbstractEndpointSnitch implements
ILa
         }
         double maxLatency = 1;
         long maxPenalty = 1;
-        HashMap<InetAddress, Long> penalties = new HashMap<InetAddress, Long>();
+        HashMap<InetAddress, Long> penalties = new HashMap<InetAddress, Long>(samples.size());
         // We're going to weight the latency and time since last reply for each host against
the worst one we see, to arrive at sort of a 'badness percentage' for both of them.
         // first, find the worst for each.
         for (Map.Entry<InetAddress, ExponentiallyDecayingSample> entry : samples.entrySet())


Mime
View raw message