From acf93f044bc698f84c91a8601f96194eb549e97a Mon Sep 17 00:00:00 2001 From: Sylvain Lebresne Date: Tue, 13 Sep 2011 17:34:08 +0000 Subject: [PATCH] merge from 1.0.0 git-svn-id: https://svn.apache.org/repos/asf/cassandra/branches/cassandra-1.0@1170264 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 +- .../cassandra/streaming/StreamingRepairTask.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d1a2061d4e..507945a393 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -58,7 +58,7 @@ * generate hints for replicas that timeout, not just replicas that are known to be down before starting (CASSANDRA-2034) * Add throttling for internode streaming (CASSANDRA-3080) - * make the repair of a range repair all replica (CASSANDRA-2610) + * make the repair of a range repair all replica (CASSANDRA-2610, 3194) * expose the ability to repair the first range (as returned by the partitioner) of a node (CASSANDRA-2606) * Streams Compression (CASSANDRA-3015) diff --git a/src/java/org/apache/cassandra/streaming/StreamingRepairTask.java b/src/java/org/apache/cassandra/streaming/StreamingRepairTask.java index 4a93f9286b..6cee195757 100644 --- a/src/java/org/apache/cassandra/streaming/StreamingRepairTask.java +++ b/src/java/org/apache/cassandra/streaming/StreamingRepairTask.java @@ -78,7 +78,7 @@ public class StreamingRepairTask implements Runnable public static StreamingRepairTask create(InetAddress ep1, InetAddress ep2, String tableName, String cfName, Collection ranges, Runnable callback) { - InetAddress local = FBUtilities.getLocalAddress(); + InetAddress local = FBUtilities.getBroadcastAddress(); UUID id = UUIDGen.makeType1UUIDFromHost(local); // We can take anyone of the node as source or destination, however if one is localhost, we put at source to avoid a forwarding InetAddress src = ep2.equals(local) ? ep2 : ep1; @@ -99,7 +99,7 @@ public class StreamingRepairTask implements Runnable public void run() { - if (src.equals(FBUtilities.getLocalAddress())) + if (src.equals(FBUtilities.getBroadcastAddress())) { initiateStreaming(); } @@ -205,7 +205,7 @@ public class StreamingRepairTask implements Runnable throw new IOError(e); } - assert task.src.equals(FBUtilities.getLocalAddress()); + assert task.src.equals(FBUtilities.getBroadcastAddress()); assert task.owner.equals(message.getFrom()); logger.info(String.format("[streaming task #%s] Received task from %s to stream %d ranges to %s", task.id, message.getFrom(), task.ranges.size(), task.dst)); @@ -219,7 +219,7 @@ public class StreamingRepairTask implements Runnable ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); StreamingRepairTask.serializer.serialize(task, dos, version); - Message msg = new Message(FBUtilities.getLocalAddress(), StorageService.Verb.STREAMING_REPAIR_REQUEST, bos.toByteArray(), version); + Message msg = new Message(FBUtilities.getBroadcastAddress(), StorageService.Verb.STREAMING_REPAIR_REQUEST, bos.toByteArray(), version); MessagingService.instance().sendOneWay(msg, task.src); } } @@ -248,7 +248,7 @@ public class StreamingRepairTask implements Runnable return; } - assert task.owner.equals(FBUtilities.getLocalAddress()); + assert task.owner.equals(FBUtilities.getBroadcastAddress()); logger.info(String.format("[streaming task #%s] task succeeded", task.id)); if (task.callback != null) @@ -262,7 +262,7 @@ public class StreamingRepairTask implements Runnable ByteArrayOutputStream bos = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(bos); UUIDGen.write(taskid, dos); - Message msg = new Message(FBUtilities.getLocalAddress(), StorageService.Verb.STREAMING_REPAIR_RESPONSE, bos.toByteArray(), version); + Message msg = new Message(FBUtilities.getBroadcastAddress(), StorageService.Verb.STREAMING_REPAIR_RESPONSE, bos.toByteArray(), version); MessagingService.instance().sendOneWay(msg, remote); } }