cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [3/4] git commit: add concurrent sets to progressByHost (CASSANDRA-6129)
Date Thu, 03 Oct 2013 14:31:27 GMT
add concurrent sets to progressByHost (CASSANDRA-6129)


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

Branch: refs/heads/cassandra-2.0
Commit: 31a9a2fd1e93e41632b729b43c0894c0e8e0c4e9
Parents: 27f4ea2
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Thu Oct 3 09:30:50 2013 -0500
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Thu Oct 3 09:30:50 2013 -0500

----------------------------------------------------------------------
 src/java/org/apache/cassandra/tools/BulkLoader.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/31a9a2fd/src/java/org/apache/cassandra/tools/BulkLoader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/tools/BulkLoader.java b/src/java/org/apache/cassandra/tools/BulkLoader.java
index cd3c7e1..c89bb83 100644
--- a/src/java/org/apache/cassandra/tools/BulkLoader.java
+++ b/src/java/org/apache/cassandra/tools/BulkLoader.java
@@ -24,6 +24,7 @@ import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.TimeUnit;
 
+import com.google.common.collect.Sets;
 import org.apache.commons.cli.*;
 import org.apache.thrift.protocol.TBinaryProtocol;
 import org.apache.thrift.protocol.TProtocol;
@@ -115,7 +116,7 @@ public class BulkLoader
                 Set<ProgressInfo> progresses = progressByHost.get(progressInfo.peer);
                 if (progresses == null)
                 {
-                    progresses = new HashSet<>();
+                    progresses = Sets.newSetFromMap(new ConcurrentHashMap<ProgressInfo,
Boolean>());
                     progressByHost.put(progressInfo.peer, progresses);
                 }
                 if (progresses.contains(progressInfo))


Mime
View raw message