Class FateConcurrencyIT
- java.lang.Object
-
- org.apache.accumulo.harness.AccumuloITBase
-
- org.apache.accumulo.harness.AccumuloClusterHarness
-
- org.apache.accumulo.test.functional.FateConcurrencyIT
-
- All Implemented Interfaces:
ClusterUsers
,MiniClusterConfigurationCallback
public class FateConcurrencyIT extends AccumuloClusterHarness
IT Tests that create / run a "slow" FATE transaction so that other operations can be checked. Included tests for:- ACCUMULO-4574. Test to verify that changing table state to online / offline
TableOperations.online(String)
when the table is already in that state returns without blocking. - AdminUtil refactor to provide methods that provide FATE status, one with table lock info (original) and additional method without.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.accumulo.harness.AccumuloClusterHarness
AccumuloClusterHarness.ClusterType
-
Nested classes/interfaces inherited from interface org.apache.accumulo.harness.MiniClusterConfigurationCallback
MiniClusterConfigurationCallback.NoCallback
-
-
Field Summary
-
Fields inherited from class org.apache.accumulo.harness.AccumuloClusterHarness
cluster, clusterConf, krb, type
-
Fields inherited from class org.apache.accumulo.harness.AccumuloITBase
testName
-
Fields inherited from interface org.apache.accumulo.harness.MiniClusterConfigurationCallback
NO_CALLBACK
-
-
Constructor Summary
Constructors Constructor Description FateConcurrencyIT()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
changeTableStateTest()
Validate thatTableOperations
online operation does not block when table is already online and fate transaction lock is held by other operations.static void
cleanup()
protected int
defaultTimeoutSeconds()
time to wait per-method before declaring a timeout, in seconds.void
getFateStatus()
Validate the the AdminUtil.getStatus works correctly after refactor and validate that getTransactionStatus can be called without lock map(s).void
multipleCompactions()
Concurrency testing - ensure that tests are valid id multiple compactions are running.void
setup()
-
Methods inherited from class org.apache.accumulo.harness.AccumuloClusterHarness
canRunTest, cleanupTables, cleanupUsers, configureMiniCluster, getAdminPrincipal, getAdminToken, getAdminUser, getCluster, getClusterConfiguration, getClusterControl, getClusterType, getConnector, getFileSystem, getKdc, getUsableDir, getUser, setUp, setupCluster, teardownCluster, tearDownKdc
-
Methods inherited from class org.apache.accumulo.harness.AccumuloITBase
createTestDir, getSslDir, getUniqueNames, testsShouldTimeout
-
-
-
-
Method Detail
-
setup
public void setup()
-
cleanup
public static void cleanup()
-
defaultTimeoutSeconds
protected int defaultTimeoutSeconds()
Description copied from class:AccumuloITBase
time to wait per-method before declaring a timeout, in seconds.- Overrides:
defaultTimeoutSeconds
in classAccumuloITBase
-
changeTableStateTest
public void changeTableStateTest() throws Exception
Validate thatTableOperations
online operation does not block when table is already online and fate transaction lock is held by other operations. The test creates, populates a table and then runs a compaction with a slow iterator so that operation takes long enough to simulate the condition. After the online operation while compaction is running completes, the test is complete and the compaction is canceled so that other tests can run.- Throws:
Exception
- any exception is a test failure.
-
getFateStatus
public void getFateStatus()
Validate the the AdminUtil.getStatus works correctly after refactor and validate that getTransactionStatus can be called without lock map(s). The test starts a long running fate transaction (slow compaction) and the calls AdminUtil functions to get the FATE.
-
multipleCompactions
public void multipleCompactions()
Concurrency testing - ensure that tests are valid id multiple compactions are running. for development testing - force transient condition that was failing this test so that we know if multiple compactions are running, they are properly handled by the test code and the tests are valid.
-
-