Class HalfDeadTServerIT
- java.lang.Object
-
- org.apache.accumulo.harness.WithTestNames
-
- org.apache.accumulo.harness.AccumuloITBase
-
- org.apache.accumulo.test.functional.ConfigurableMacBase
-
- org.apache.accumulo.test.functional.HalfDeadTServerIT
-
public class HalfDeadTServerIT extends ConfigurableMacBase
This test verifies tserver behavior when the node experiences certain failure states that cause it to be unresponsive to network I/O and/or disk access.This failure state is simulated in a tserver by running that tserver with a shared library that hooks the read/write system calls. When the shared library sees a specific trigger file, it pauses the system calls and prints "sleeping", until that file is deleted, after which it proxies the system call to the real system implementation.
In response to failures of the type this test simulates, the tserver should recover if the system call is stalled for less than the ZooKeeper timeout. Otherwise, it should lose its lock in ZooKeeper and terminate itself.
-
-
Field Summary
-
Fields inherited from class org.apache.accumulo.test.functional.ConfigurableMacBase
cluster, log, ROOT_PASSWORD
-
Fields inherited from class org.apache.accumulo.harness.AccumuloITBase
MINI_CLUSTER_ONLY, random, STANDALONE_CAPABLE_CLUSTER, SUNNY_DAY, ZOOKEEPER_TESTING_SERVER
-
-
Constructor Summary
Constructors Constructor Description HalfDeadTServerIT()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
buildSharedLib()
void
configure(MiniAccumuloConfigImpl cfg, org.apache.hadoop.conf.Configuration hadoopCoreSite)
protected Duration
defaultTimeout()
Time to wait per-method before declaring a timeout, in seconds.String
test(int seconds, boolean expectTserverDied)
void
testRecover()
void
testTimeout()
-
Methods inherited from class org.apache.accumulo.test.functional.ConfigurableMacBase
beforeClusterStart, configureForEnvironment, configureForSsl, exec, getClientProperties, getCluster, getServerContext, setUp, tearDown
-
Methods inherited from class org.apache.accumulo.harness.AccumuloITBase
createTestDir, getOnlyElement, getOnlyElement, getSslDir, getUniqueNames, initJar
-
Methods inherited from class org.apache.accumulo.harness.WithTestNames
setTestName, testName
-
-
-
-
Method Detail
-
defaultTimeout
protected Duration defaultTimeout()
Description copied from class:AccumuloITBase
Time to wait per-method before declaring a timeout, in seconds.- Overrides:
defaultTimeout
in classAccumuloITBase
-
configure
public void configure(MiniAccumuloConfigImpl cfg, org.apache.hadoop.conf.Configuration hadoopCoreSite)
- Overrides:
configure
in classConfigurableMacBase
-
buildSharedLib
@BeforeAll public static void buildSharedLib() throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
-