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()
void
closeClient()
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
setup()
-
Methods inherited from class org.apache.accumulo.harness.AccumuloClusterHarness
canRunTest, cleanupTables, cleanupUsers, configureMiniCluster, getAdminPrincipal, getAdminToken, getAdminUser, getClientInfo, getClientProps, getCluster, getClusterConfiguration, getClusterControl, getClusterType, getFileSystem, getKdc, getServerContext, getUsableDir, getUser, saslEnabled, setupCluster, setUpHarness, teardownCluster, tearDownHarness
-
Methods inherited from class org.apache.accumulo.harness.AccumuloITBase
createTestDir, getSslDir, getUniqueNames, testsShouldTimeout
-
-
-
-
Method Detail
-
setup
public void setup()
-
closeClient
public void closeClient()
-
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.
-
-