me.prettyprint.cassandra.connection
Class HostTimeoutTracker
java.lang.Object
me.prettyprint.cassandra.connection.BackgroundCassandraHostService
me.prettyprint.cassandra.connection.HostTimeoutTracker
public class HostTimeoutTracker
- extends BackgroundCassandraHostService
Keep track of how often a node replies with a HTimeoutException. If we go
past the threshold of [timeoutCounter] timeouts within [timeWindow] milliseconds,
then we mark the node as suspended. (10 timeouts within 500ms by default)
Periodically check the suspended nodes list every retryDelayInSeconds. If
the node has been suspended longer than nodeSuspensionDurationInSeconds,
then we unsuspend, placing it back in the available pool. (10 second
suspension retried every 10 seconds by default).
- Author:
- zznate
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEF_TIMEOUT_COUNTER
public static final int DEF_TIMEOUT_COUNTER
- See Also:
- Constant Field Values
DEF_TIMEOUT_WINDOW
public static final int DEF_TIMEOUT_WINDOW
- See Also:
- Constant Field Values
DEF_NODE_SUSPENSION_DURATION_IN_SECONDS
public static final int DEF_NODE_SUSPENSION_DURATION_IN_SECONDS
- See Also:
- Constant Field Values
DEF_NODE_UNSUSPEND_CHECK_DELAY_IN_SECONDS
public static final int DEF_NODE_UNSUSPEND_CHECK_DELAY_IN_SECONDS
- See Also:
- Constant Field Values
HostTimeoutTracker
public HostTimeoutTracker(HConnectionManager connectionManager,
CassandraHostConfigurator cassandraHostConfigurator)
checkTimeout
public boolean checkTimeout(CassandraHost cassandraHost)
Copyright © 2011. All Rights Reserved.