cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject svn commit: r1141194 [2/2] - in /cassandra/trunk: conf/ src/java/org/apache/cassandra/config/ src/java/org/apache/cassandra/db/ src/java/org/apache/cassandra/db/marshal/ src/java/org/apache/cassandra/db/migration/ src/java/org/apache/cassandra/dht/ src...
Date Wed, 29 Jun 2011 18:55:53 GMT
Modified: cassandra/trunk/src/java/org/apache/cassandra/tools/BulkLoader.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/tools/BulkLoader.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/tools/BulkLoader.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/tools/BulkLoader.java Wed Jun 29 18:55:50
2011
@@ -184,7 +184,7 @@ public class BulkLoader
                 StorageService.instance.initClient();
 
                 Set<InetAddress> hosts = Gossiper.instance.getLiveMembers();
-                hosts.remove(FBUtilities.getLocalAddress());
+                hosts.remove(FBUtilities.getBroadcastAddress());
                 if (hosts.isEmpty())
                     throw new IllegalStateException("Cannot load any sstable, no live member
found in the cluster");
 

Modified: cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/utils/FBUtilities.java Wed Jun 29 18:55:50
2011
@@ -61,6 +61,7 @@ public class FBUtilities
     public static final BigInteger TWO = new BigInteger("2");
 
     private static volatile InetAddress localInetAddress_;
+    private static volatile InetAddress broadcastInetAddress_;
 
     private static final ThreadLocal<MessageDigest> localMD5Digest = new ThreadLocal<MessageDigest>()
     {
@@ -129,6 +130,15 @@ public class FBUtilities
         return localInetAddress_;
     }
 
+    public static InetAddress getBroadcastAddress()
+    {
+        if (broadcastInetAddress_ == null)
+            broadcastInetAddress_ = DatabaseDescriptor.getBroadcastAddress() == null
+                                ? getLocalAddress()
+                                : DatabaseDescriptor.getBroadcastAddress();
+        return broadcastInetAddress_;
+    }
+
     /**
      * @param fractOrAbs A double that may represent a fraction or absolute value.
      * @param total If fractionOrAbs is a fraction, the total to take the fraction from

Modified: cassandra/trunk/src/java/org/apache/cassandra/utils/Mx4jTool.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/utils/Mx4jTool.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/utils/Mx4jTool.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/utils/Mx4jTool.java Wed Jun 29 18:55:50
2011
@@ -80,7 +80,7 @@ public class Mx4jTool
 
     private static String getAddress()
     {
-        return System.getProperty("mx4jaddress", FBUtilities.getLocalAddress().getHostAddress());
+        return System.getProperty("mx4jaddress", FBUtilities.getBroadcastAddress().getHostAddress());
     }
 
     private static int getPort()

Modified: cassandra/trunk/src/java/org/apache/cassandra/utils/NodeId.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/utils/NodeId.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/utils/NodeId.java (original)
+++ cassandra/trunk/src/java/org/apache/cassandra/utils/NodeId.java Wed Jun 29 18:55:50 2011
@@ -102,7 +102,7 @@ public class NodeId implements Comparabl
 
     public static NodeId generate()
     {
-        return new NodeId(ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress()))));
+        return new NodeId(ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress()))));
     }
 
     /*

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/DefsTest.java Wed Jun 29 18:55:50 2011
@@ -164,7 +164,7 @@ public class DefsTest extends CleanupHel
     public void saveAndRestore() throws IOException
     {
         // verify dump and reload.
-        UUID first = UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress());
+        UUID first = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress());
         DefsTable.dumpToStorage(first);
         List<KSMetaData> defs = new ArrayList<KSMetaData>(DefsTable.loadFromStorage(first));
 
@@ -200,7 +200,7 @@ public class DefsTest extends CleanupHel
     {
         // do a save. make sure it doesn't mess with the defs version.
         UUID prior = DatabaseDescriptor.getDefsVersion();
-        UUID ver0 = UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress());
+        UUID ver0 = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress());
         DefsTable.dumpToStorage(ver0);
         assert DatabaseDescriptor.getDefsVersion().equals(prior);
 

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/RowIterationTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/RowIterationTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/RowIterationTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/RowIterationTest.java Wed Jun 29 18:55:50
2011
@@ -42,7 +42,7 @@ import org.apache.cassandra.utils.ByteBu
 public class RowIterationTest extends CleanupHelper
 {
     public static final String TABLE1 = "Keyspace2";
-    public static final InetAddress LOCAL = FBUtilities.getLocalAddress();
+    public static final InetAddress LOCAL = FBUtilities.getBroadcastAddress();
 
     @Test
     public void testRowIteration() throws IOException, ExecutionException, InterruptedException

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/CompositeTypeTest.java Wed Jun
29 18:55:50 2011
@@ -62,7 +62,7 @@ public class CompositeTypeTest extends C
     static
     {
         for (int i = 0; i < UUID_COUNT; ++i)
-            uuids[i] = UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress());
+            uuids[i] = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress());
     }
 
     @Test

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java
(original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/DynamicCompositeTypeTest.java
Wed Jun 29 18:55:50 2011
@@ -53,7 +53,7 @@ public class DynamicCompositeTypeTest ex
     static
     {
         for (int i = 0; i < UUID_COUNT; ++i)
-            uuids[i] = UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress());
+            uuids[i] = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress());
     }
 
     @Test

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/marshal/RoundTripTest.java Wed Jun 29
18:55:50 2011
@@ -83,7 +83,7 @@ public class RoundTripTest
     @Test
     public void testLexicalUUID()
     {
-        UUID uuid = UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress());
+        UUID uuid = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress());
         assert LexicalUUIDType.instance.getString(LexicalUUIDType.instance.fromString(uuid.toString()))
                 .equals(uuid.toString());
         assert LexicalUUIDType.instance.fromString(LexicalUUIDType.instance.getString(ByteBuffer.wrap(UUIDGen.decompose(uuid))))
@@ -95,7 +95,7 @@ public class RoundTripTest
     @Test
     public void testTimeUUID()
     {
-        UUID uuid = UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress());
+        UUID uuid = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress());
         assert TimeUUIDType.instance.getString(TimeUUIDType.instance.fromString(uuid.toString()))
                 .equals(uuid.toString());
         assert TimeUUIDType.instance.fromString(TimeUUIDType.instance.getString(ByteBuffer.wrap(UUIDGen.decompose(uuid))))

Modified: cassandra/trunk/test/unit/org/apache/cassandra/db/migration/SerializationsTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/db/migration/SerializationsTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/db/migration/SerializationsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/db/migration/SerializationsTest.java Wed
Jun 29 18:55:50 2011
@@ -50,7 +50,7 @@ public class SerializationsTest extends 
         {
             String tableName = "Keyspace" + (i + 1);
             KSMetaData ksm = DatabaseDescriptor.getKSMetaData(tableName);
-            UUID uuid = UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress());
+            UUID uuid = UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress());
             DatabaseDescriptor.clearTableDefinition(ksm, uuid);
             Migration m = new AddKeyspace(ksm);
             ByteBuffer bytes = m.serialize();

Modified: cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/dht/BootStrapperTest.java Wed Jun 29 18:55:50
2011
@@ -48,7 +48,7 @@ public class BootStrapperTest extends Cl
     {
         StorageService.instance.initServer();
         // fetch a bootstrap token from the local node
-        assert BootStrapper.getBootstrapTokenFrom(FBUtilities.getLocalAddress()) != null;
+        assert BootStrapper.getBootstrapTokenFrom(FBUtilities.getBroadcastAddress()) != null;
     }
     
     @Test

Modified: cassandra/trunk/test/unit/org/apache/cassandra/gms/SerializationsTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/gms/SerializationsTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/gms/SerializationsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/gms/SerializationsTest.java Wed Jun 29
18:55:50 2011
@@ -109,7 +109,7 @@ public class SerializationsTest extends 
             EndpointSt.addApplicationState(ApplicationState.LOAD, vv0);
             EndpointSt.addApplicationState(ApplicationState.STATUS, vv1);
             for (int i = 0; i < 100; i++)
-                Digests.add(new GossipDigest(FBUtilities.getLocalAddress(), 100 + i, 1000
+ 2 * i));
+                Digests.add(new GossipDigest(FBUtilities.getBroadcastAddress(), 100 + i,
1000 + 2 * i));
         }
     }
 }

Modified: cassandra/trunk/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/io/LazilyCompactedRowTest.java Wed Jun
29 18:55:50 2011
@@ -291,7 +291,7 @@ public class LazilyCompactedRowTest exte
 
         ByteBuffer key = ByteBufferUtil.bytes("k");
         RowMutation rm = new RowMutation("Keyspace4", key);
-        ByteBuffer scKey = ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(FBUtilities.getLocalAddress())));
+        ByteBuffer scKey = ByteBuffer.wrap(UUIDGen.decompose(UUIDGen.makeType1UUIDFromHost(FBUtilities.getBroadcastAddress())));
         rm.add(new QueryPath("Super5", scKey , ByteBufferUtil.bytes("c")), ByteBufferUtil.EMPTY_BYTE_BUFFER,
0);
         rm.apply();
         cfs.forceBlockingFlush();

Modified: cassandra/trunk/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
(original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/locator/DynamicEndpointSnitchTest.java
Wed Jun 29 18:55:50 2011
@@ -38,7 +38,7 @@ public class DynamicEndpointSnitchTest
         StorageService.instance.initClient();
         int sleeptime = 150;
         DynamicEndpointSnitch dsnitch = new DynamicEndpointSnitch(new SimpleSnitch());
-        InetAddress self = FBUtilities.getLocalAddress();
+        InetAddress self = FBUtilities.getBroadcastAddress();
         ArrayList<InetAddress> order = new ArrayList<InetAddress>();
         InetAddress host1 = InetAddress.getByName("127.0.0.1");
         InetAddress host2 = InetAddress.getByName("127.0.0.2");

Modified: cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTestAbstract.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTestAbstract.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTestAbstract.java
(original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/service/AntiEntropyServiceTestAbstract.java
Wed Jun 29 18:55:50 2011
@@ -76,7 +76,7 @@ public abstract class AntiEntropyService
 
             init();
 
-            LOCAL = FBUtilities.getLocalAddress();
+            LOCAL = FBUtilities.getBroadcastAddress();
             StorageService.instance.initServer();
             // generate a fake endpoint for which we can spoof receiving/sending trees
             REMOTE = InetAddress.getByName("127.0.0.2");
@@ -180,7 +180,7 @@ public abstract class AntiEntropyService
     {
         // generate rf+1 nodes, and ensure that all nodes are returned
         Set<InetAddress> expected = addTokens(1 + Table.open(tablename).getReplicationStrategy().getReplicationFactor());
-        expected.remove(FBUtilities.getLocalAddress());
+        expected.remove(FBUtilities.getBroadcastAddress());
         Collection<Range> ranges = StorageService.instance.getLocalRanges(tablename);
         Set<InetAddress> neighbors = new HashSet<InetAddress>();
         for (Range range : ranges)
@@ -199,11 +199,11 @@ public abstract class AntiEntropyService
         addTokens(2 * Table.open(tablename).getReplicationStrategy().getReplicationFactor());
         AbstractReplicationStrategy ars = Table.open(tablename).getReplicationStrategy();
         Set<InetAddress> expected = new HashSet<InetAddress>();
-        for (Range replicaRange : ars.getAddressRanges().get(FBUtilities.getLocalAddress()))
+        for (Range replicaRange : ars.getAddressRanges().get(FBUtilities.getBroadcastAddress()))
         {
             expected.addAll(ars.getRangeAddresses(tmd).get(replicaRange));
         }
-        expected.remove(FBUtilities.getLocalAddress());
+        expected.remove(FBUtilities.getBroadcastAddress());
         Collection<Range> ranges = StorageService.instance.getLocalRanges(tablename);
         Set<InetAddress> neighbors = new HashSet<InetAddress>();
         for (Range range : ranges)

Modified: cassandra/trunk/test/unit/org/apache/cassandra/service/RemoveTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/service/RemoveTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/service/RemoveTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/service/RemoveTest.java Wed Jun 29 18:55:50
2011
@@ -71,7 +71,7 @@ public class RemoveTest extends CleanupH
         // create a ring of 5 nodes
         Util.createInitialRing(ss, partitioner, endpointTokens, keyTokens, hosts, 6);
 
-        MessagingService.instance().listen(FBUtilities.getLocalAddress());
+        MessagingService.instance().listen(FBUtilities.getBroadcastAddress());
         Gossiper.instance.start(1);
         for (int i = 0; i < 6; i++)
         {
@@ -145,7 +145,7 @@ public class RemoveTest extends CleanupH
         for (InetAddress host : hosts)
         {
             Message msg = new Message(host, StorageService.Verb.REPLICATION_FINISHED, new
byte[0], MessagingService.version_);
-            MessagingService.instance().sendRR(msg, FBUtilities.getLocalAddress());
+            MessagingService.instance().sendRR(msg, FBUtilities.getBroadcastAddress());
         }
 
         remover.join();
@@ -216,8 +216,8 @@ public class RemoveTest extends CleanupH
                 callCount++;
                 assertEquals(Stage.MISC, msg.getMessageType());
                 // simulate a response from remote server
-                Message response = msg.getReply(FBUtilities.getLocalAddress(), new byte[]{
}, msg.getVersion());
-                MessagingService.instance().sendReply(response, id, FBUtilities.getLocalAddress());
+                Message response = msg.getReply(FBUtilities.getBroadcastAddress(), new byte[]{
}, msg.getVersion());
+                MessagingService.instance().sendReply(response, id, FBUtilities.getBroadcastAddress());
                 return null;
             }
             else

Modified: cassandra/trunk/test/unit/org/apache/cassandra/service/SerializationsTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/service/SerializationsTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/service/SerializationsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/service/SerializationsTest.java Wed Jun
29 18:55:50 2011
@@ -78,8 +78,8 @@ public class SerializationsTest extends 
         DataOutputStream out = getOutput("service.TreeResponse.bin");
         AntiEntropyService.TreeResponseVerbHandler.SERIALIZER.serialize(v0, out, getVersion());
         AntiEntropyService.TreeResponseVerbHandler.SERIALIZER.serialize(v1, out, getVersion());
-        Message.serializer().serialize(AntiEntropyService.TreeResponseVerbHandler.makeVerb(FBUtilities.getLocalAddress(),
v0), out, getVersion());
-        Message.serializer().serialize(AntiEntropyService.TreeResponseVerbHandler.makeVerb(FBUtilities.getLocalAddress(),
v1), out, getVersion());
+        Message.serializer().serialize(AntiEntropyService.TreeResponseVerbHandler.makeVerb(FBUtilities.getBroadcastAddress(),
v0), out, getVersion());
+        Message.serializer().serialize(AntiEntropyService.TreeResponseVerbHandler.makeVerb(FBUtilities.getBroadcastAddress(),
v1), out, getVersion());
         out.close();
     }
     
@@ -100,6 +100,6 @@ public class SerializationsTest extends 
     private static class Statics
     {
         private static final AntiEntropyService.CFPair pair = new AntiEntropyService.CFPair("Keyspace1",
"Standard1");
-        private static final AntiEntropyService.TreeRequest req = new AntiEntropyService.TreeRequest("sessionId",
FBUtilities.getLocalAddress(), FULL_RANGE, pair);
+        private static final AntiEntropyService.TreeRequest req = new AntiEntropyService.TreeRequest("sessionId",
FBUtilities.getBroadcastAddress(), FULL_RANGE, pair);
     }
 }

Modified: cassandra/trunk/test/unit/org/apache/cassandra/streaming/SerializationsTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/streaming/SerializationsTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/streaming/SerializationsTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/streaming/SerializationsTest.java Wed Jun
29 18:55:50 2011
@@ -146,9 +146,9 @@ public class SerializationsTest extends 
         for (int i = 0; i < 5; i++)
             ranges.add(new Range(new BytesToken(ByteBufferUtil.bytes(Integer.toString(10*i))),
new BytesToken(ByteBufferUtil.bytes(Integer.toString(10*i+5)))));
         List<ColumnFamilyStore> stores = Collections.singletonList(Table.open("Keyspace1").getColumnFamilyStore("Standard1"));
-        StreamRequestMessage msg0 = new StreamRequestMessage(FBUtilities.getLocalAddress(),
ranges, "Keyspace1", stores, 123L, OperationType.RESTORE_REPLICA_COUNT);
-        StreamRequestMessage msg1 = new StreamRequestMessage(FBUtilities.getLocalAddress(),
makePendingFile(true, 100, OperationType.BOOTSTRAP), 124L);
-        StreamRequestMessage msg2 = new StreamRequestMessage(FBUtilities.getLocalAddress(),
makePendingFile(false, 100, OperationType.BOOTSTRAP), 124L);
+        StreamRequestMessage msg0 = new StreamRequestMessage(FBUtilities.getBroadcastAddress(),
ranges, "Keyspace1", stores, 123L, OperationType.RESTORE_REPLICA_COUNT);
+        StreamRequestMessage msg1 = new StreamRequestMessage(FBUtilities.getBroadcastAddress(),
makePendingFile(true, 100, OperationType.BOOTSTRAP), 124L);
+        StreamRequestMessage msg2 = new StreamRequestMessage(FBUtilities.getBroadcastAddress(),
makePendingFile(false, 100, OperationType.BOOTSTRAP), 124L);
 
         DataOutputStream out = getOutput("streaming.StreamRequestMessage.bin");
         StreamRequestMessage.serializer().serialize(msg0, out, getVersion());

Modified: cassandra/trunk/test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java
URL: http://svn.apache.org/viewvc/cassandra/trunk/test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java?rev=1141194&r1=1141193&r2=1141194&view=diff
==============================================================================
--- cassandra/trunk/test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java (original)
+++ cassandra/trunk/test/unit/org/apache/cassandra/streaming/StreamingTransferTest.java Wed
Jun 29 18:55:50 2011
@@ -48,7 +48,7 @@ import org.apache.cassandra.utils.ByteBu
 
 public class StreamingTransferTest extends CleanupHelper
 {
-    public static final InetAddress LOCAL = FBUtilities.getLocalAddress();
+    public static final InetAddress LOCAL = FBUtilities.getBroadcastAddress();
 
     @BeforeClass
     public static void setup() throws Exception



Mime
View raw message