Class SingleNodeDisruption
- java.lang.Object
-
- org.elasticsearch.test.disruption.SingleNodeDisruption
-
- All Implemented Interfaces:
ServiceDisruptionScheme
- Direct Known Subclasses:
BlockClusterStateProcessing
,BlockMasterServiceOnMaster
,BusyMasterServiceDisruption
,LongGCDisruption
,SlowClusterStateProcessing
public abstract class SingleNodeDisruption extends java.lang.Object implements ServiceDisruptionScheme
-
-
Field Summary
Fields Modifier and Type Field Description protected InternalTestCluster
cluster
protected java.lang.String
disruptedNode
protected org.apache.logging.log4j.Logger
logger
protected java.util.Random
random
-
Constructor Summary
Constructors Constructor Description SingleNodeDisruption(java.util.Random random)
-
Method Summary
Modifier and Type Method Description void
applyToCluster(InternalTestCluster cluster)
void
applyToNode(java.lang.String node, InternalTestCluster cluster)
protected void
ensureNodeCount(InternalTestCluster cluster)
void
removeFromCluster(InternalTestCluster cluster)
void
removeFromNode(java.lang.String node, InternalTestCluster cluster)
void
testClusterClosed()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.elasticsearch.test.disruption.ServiceDisruptionScheme
expectedTimeToHeal, removeAndEnsureHealthy, startDisrupting, stopDisrupting
-
-
-
-
Field Detail
-
logger
protected final org.apache.logging.log4j.Logger logger
-
disruptedNode
protected volatile java.lang.String disruptedNode
-
cluster
protected volatile InternalTestCluster cluster
-
random
protected final java.util.Random random
-
-
Method Detail
-
applyToCluster
public void applyToCluster(InternalTestCluster cluster)
- Specified by:
applyToCluster
in interfaceServiceDisruptionScheme
-
removeFromCluster
public void removeFromCluster(InternalTestCluster cluster)
- Specified by:
removeFromCluster
in interfaceServiceDisruptionScheme
-
applyToNode
public void applyToNode(java.lang.String node, InternalTestCluster cluster)
- Specified by:
applyToNode
in interfaceServiceDisruptionScheme
-
removeFromNode
public void removeFromNode(java.lang.String node, InternalTestCluster cluster)
- Specified by:
removeFromNode
in interfaceServiceDisruptionScheme
-
testClusterClosed
public void testClusterClosed()
- Specified by:
testClusterClosed
in interfaceServiceDisruptionScheme
-
ensureNodeCount
protected void ensureNodeCount(InternalTestCluster cluster)
-
-