cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yu...@apache.org
Subject [02/10] git commit: Follow up on CASSANDRA-6596
Date Tue, 22 Jul 2014 21:18:57 GMT
Follow up on CASSANDRA-6596

Add null check for sstableloader


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

Branch: refs/heads/cassandra-2.1.0
Commit: ef894c2aad85fbb980be20f5c42f735966871d47
Parents: 9906a4e
Author: Yuki Morishita <yukim@apache.org>
Authored: Tue Jul 22 16:14:14 2014 -0500
Committer: Yuki Morishita <yukim@apache.org>
Committed: Tue Jul 22 16:14:14 2014 -0500

----------------------------------------------------------------------
 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/ef894c2a/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 366f3ff..b5b1c7f 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_BIT;
             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