cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vi...@apache.org
Subject [1/2] git commit: sstableloader fails to stream data Patch by Vijay, reviewed by Yuki Morishita for CASSANDRA-6965
Date Wed, 02 Apr 2014 23:48:01 GMT
Repository: cassandra
Updated Branches:
  refs/heads/trunk 4be915fa9 -> afb5ce503


sstableloader fails to stream data
Patch by Vijay, reviewed by Yuki Morishita for CASSANDRA-6965


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

Branch: refs/heads/trunk
Commit: 69960afa3ec668c82d6bf42bb82bdcdf16b1bbe3
Parents: 5b56106
Author: Vijay <vijay2win@gmail.com>
Authored: Wed Apr 2 16:41:07 2014 -0700
Committer: Vijay <vijay2win@gmail.com>
Committed: Wed Apr 2 16:41:07 2014 -0700

----------------------------------------------------------------------
 src/java/org/apache/cassandra/streaming/StreamManager.java | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/69960afa/src/java/org/apache/cassandra/streaming/StreamManager.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/streaming/StreamManager.java b/src/java/org/apache/cassandra/streaming/StreamManager.java
index 872e524..6dfb1ac 100644
--- a/src/java/org/apache/cassandra/streaming/StreamManager.java
+++ b/src/java/org/apache/cassandra/streaming/StreamManager.java
@@ -76,8 +76,11 @@ public class StreamManager implements StreamManagerMBean
             double interDCThroughput = ((double) DatabaseDescriptor.getInterDCStreamThroughputOutboundMegabitsPerSec())
* ONE_MEGA_BYTE;
             mayUpdateThroughput(interDCThroughput, interDCLimiter);
 
-            isLocalDC = DatabaseDescriptor.getLocalDataCenter().equals(
-                        DatabaseDescriptor.getEndpointSnitch().getDatacenter(peer));
+            if (DatabaseDescriptor.getLocalDataCenter() != null && DatabaseDescriptor.getEndpointSnitch()
!= null)
+                isLocalDC = DatabaseDescriptor.getLocalDataCenter().equals(
+                            DatabaseDescriptor.getEndpointSnitch().getDatacenter(peer));
+            else
+                isLocalDC = true;
         }
 
         private void mayUpdateThroughput(double limit, RateLimiter rateLimiter)


Mime
View raw message