cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gdusba...@apache.org
Subject svn commit: r953349 - in /cassandra/trunk/src/java/org/apache/cassandra/streaming: StreamIn.java StreamInManager.java
Date Thu, 10 Jun 2010 15:30:27 GMT
Author: gdusbabek
Date: Thu Jun 10 15:30:27 2010
New Revision: 953349

URL: http://svn.apache.org/viewvc?rev=953349&view=rev
Log:
receivers indicate sources before anticompaction. patch by gdusbabek, reviewed by jbellis.
CASSANDRA-956

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamIn.java
    cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInManager.java

Modified: cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamIn.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamIn.java?rev=953349&r1=953348&r2=953349&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamIn.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamIn.java Thu Jun 10 15:30:27
2010
@@ -45,6 +45,7 @@ public class StreamIn
     {
         if (logger.isDebugEnabled())
             logger.debug("Requesting from " + source + " ranges " + StringUtils.join(ranges,
", "));
+        StreamInManager.initContect(source);
         StreamRequestMetadata streamRequestMetadata = new StreamRequestMetadata(FBUtilities.getLocalAddress(),
ranges, tableName);
         Message message = StreamRequestMessage.makeStreamRequestMessage(new StreamRequestMessage(streamRequestMetadata));
         MessagingService.instance.sendOneWay(message, source);

Modified: cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInManager.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInManager.java?rev=953349&r1=953348&r2=953349&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInManager.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/streaming/StreamInManager.java Thu Jun 10
15:30:27 2010
@@ -42,6 +42,15 @@ class StreamInManager
 
     public static final Multimap<InetAddress, PendingFile> activeStreams = Multimaps.synchronizedMultimap(HashMultimap.<InetAddress,
PendingFile>create());
 
+    public synchronized static void initContect(InetAddress key)
+    {
+        List<PendingFile> context = ctxBag_.get(key);
+        if (context == null)
+        {
+            context = new ArrayList<PendingFile>();
+            ctxBag_.put(key, context);
+        }
+    }
     /**
      * gets the next file to be received given a host key.
      * @param key



Mime
View raw message