You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2014/06/04 20:45:48 UTC
[2/6] git commit: cleanup
cleanup
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/00b5c36c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/00b5c36c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/00b5c36c
Branch: refs/heads/cassandra-2.1
Commit: 00b5c36cc55f8ed65c9d769e93035f2fc8fb1eb0
Parents: 05ffa8f
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Jun 4 13:42:12 2014 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Jun 4 13:43:12 2014 -0500
----------------------------------------------------------------------
.../org/apache/cassandra/gms/FailureDetector.java | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/00b5c36c/src/java/org/apache/cassandra/gms/FailureDetector.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/gms/FailureDetector.java b/src/java/org/apache/cassandra/gms/FailureDetector.java
index c472974..507dfdc 100644
--- a/src/java/org/apache/cassandra/gms/FailureDetector.java
+++ b/src/java/org/apache/cassandra/gms/FailureDetector.java
@@ -77,13 +77,15 @@ public class FailureDetector implements IFailureDetector, FailureDetectorMBean
private static long getInitialValue()
{
String newvalue = System.getProperty("cassandra.fd_initial_value_ms");
- if (newvalue != null)
+ if (newvalue == null)
+ {
+ return Gossiper.intervalInMillis * 30;
+ }
+ else
{
logger.info("Overriding FD INITIAL_VALUE to {}ms", newvalue);
return Integer.parseInt(newvalue);
}
- else
- return Gossiper.intervalInMillis * 30;
}
public String getAllEndpointStates()
@@ -311,13 +313,15 @@ class ArrivalWindow
private static long getMaxInterval()
{
String newvalue = System.getProperty("cassandra.fd_max_interval_ms");
- if (newvalue != null)
+ if (newvalue == null)
+ {
+ return FailureDetector.INITIAL_VALUE_NANOS;
+ }
+ else
{
logger.info("Overriding FD MAX_INTERVAL to {}ms", newvalue);
return TimeUnit.NANOSECONDS.convert(Integer.parseInt(newvalue), TimeUnit.MILLISECONDS);
}
- else
- return FailureDetector.INITIAL_VALUE_NANOS;
}
synchronized void add(long value)