Package org.apache.accumulo.harness
Class AccumuloClusterHarness
- java.lang.Object
-
- org.apache.accumulo.harness.AccumuloITBase
-
- org.apache.accumulo.harness.AccumuloClusterHarness
-
- All Implemented Interfaces:
ClusterUsers
,MiniClusterConfigurationCallback
- Direct Known Subclasses:
AccumuloClientIT
,AccumuloFileOutputFormatIT
,AccumuloFileOutputFormatIT
,AccumuloInputFormatIT
,AccumuloInputFormatIT
,AccumuloMultiTableInputFormatIT
,AccumuloMultiTableInputFormatIT
,AccumuloOutputFormatIT
,AccumuloRowInputFormatIT
,AccumuloRowInputFormatIT
,AddSplitIT
,BadDeleteMarkersCreatedIT
,BadIteratorMincIT
,BadLocalityGroupMincIT
,BalanceInPresenceOfOfflineTableIT
,BalanceIT
,BatchScanSplitIT
,BatchWriterFlushIT
,BatchWriterInTabletServerIT
,BatchWriterIT
,BigRootTabletIT
,BinaryIT
,BinaryStressIT
,BloomFilterIT
,BulkFailureIT
,BulkImportSequentialRowsIT
,BulkImportVolumeIT
,BulkIT
,BulkOldIT
,BulkSplitOptimizationIT
,ChaoticBalancerIT
,ClassLoaderIT
,CleanWalIT
,ClientSideIteratorIT
,CloneIT
,CloneTestIT
,CloseScannerIT
,CombinerIT
,CompactionIT
,ConcurrencyIT
,ConcurrentDeleteTableIT
,ConstraintIT
,CreateAndUseIT
,CreateInitialSplitsIT
,CreateManyScannersIT
,CredentialsIT
,DeleteEverythingIT
,DeleteFailIT
,DeleteIT
,DeleteRowsIT
,DeleteRowsSplitIT
,DeleteTableDuringSplitIT
,FateConcurrencyIT
,FateStarvationIT
,FindMaxIT
,ImportExportIT
,InterruptibleScannersIT
,IsolationAndDeepCopyIT
,IteratorEnvIT
,KeyValueEqualityIT
,LargeRowIT
,LocatorIT
,LogicalTimeIT
,ManyWriteAheadLogsIT
,MasterAssignmentIT
,MasterFailoverIT
,MaxOpenIT
,MergeIT
,MetaConstraintRetryIT
,MetadataIT
,MetaSplitIT
,MultiTableBatchWriterIT
,OrIteratorIT
,PermissionsIT
,ReadWriteIT
,RecoveryCompactionsAreFlushesIT
,RenameIT
,RestartIT
,RestartStressIT
,RowDeleteIT
,SampleIT
,ScanFlushWithTimeIT
,ScanIdIT
,ScanIteratorIT
,ScannerContextIT
,ScannerIT
,ScanRangeIT
,ScanSessionTimeOutIT
,ServerSideErrorIT
,ShellConfigIT
,SparseColumnFamilyIT
,SplitIT
,SplitRecoveryIT
,StartIT
,SummaryIT
,TableConfigurationUpdateIT
,TableIT
,TableOperationsIT
,TabletIT
,TabletStateChangeIteratorIT
,ThriftServerBindsBeforeZooKeeperLockIT
,TimeoutIT
,TokenFileIT
,TokenFileIT
,TooManyDeletesIT
,TransportCachingIT
,UserCompactionStrategyIT
,UsersIT
,VisibilityIT
,WriteAheadLogEncryptedIT
,WriteAheadLogIT
,WriteLotsIT
,YieldScannersIT
,ZooKeeperPropertiesIT
public abstract class AccumuloClusterHarness extends AccumuloITBase implements MiniClusterConfigurationCallback, ClusterUsers
Integration-Test base class that provides a MAC instance per test. WARNING: This IT type will setup and teardown an entire cluster for every test annotated with @Test and is reserved for more advanced ITs that do crazy things. For more typical, expected behavior of a cluster seeSharedMiniClusterBase
. This instance can be MAC or a standalone instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AccumuloClusterHarness.ClusterType
-
Nested classes/interfaces inherited from interface org.apache.accumulo.harness.MiniClusterConfigurationCallback
MiniClusterConfigurationCallback.NoCallback
-
-
Field Summary
Fields Modifier and Type Field Description protected static AccumuloCluster
cluster
protected static AccumuloClusterPropertyConfiguration
clusterConf
protected static TestingKdc
krb
protected static AccumuloClusterHarness.ClusterType
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 AccumuloClusterHarness()
-
Method Summary
-
Methods inherited from class org.apache.accumulo.harness.AccumuloITBase
createTestDir, defaultTimeoutSeconds, getSslDir, getUniqueNames, testsShouldTimeout
-
-
-
-
Field Detail
-
cluster
protected static AccumuloCluster cluster
-
type
protected static AccumuloClusterHarness.ClusterType type
-
clusterConf
protected static AccumuloClusterPropertyConfiguration clusterConf
-
krb
protected static TestingKdc krb
-
-
Method Detail
-
tearDownHarness
public static void tearDownHarness()
-
getKdc
public static TestingKdc getKdc()
TheTestingKdc
used for thisAccumuloCluster
. Might be null.
-
getCluster
public static AccumuloCluster getCluster()
-
getClusterControl
public static ClusterControl getClusterControl()
-
getClusterType
public static AccumuloClusterHarness.ClusterType getClusterType()
-
getAdminPrincipal
public static String getAdminPrincipal()
-
getClientProps
public static Properties getClientProps()
-
getClientInfo
public static ClientInfo getClientInfo()
-
getServerContext
public static ServerContext getServerContext()
-
saslEnabled
public static boolean saslEnabled()
-
getAdminToken
public static AuthenticationToken getAdminToken()
-
getAdminUser
public ClusterUser getAdminUser()
- Specified by:
getAdminUser
in interfaceClusterUsers
-
getUser
public ClusterUser getUser(int offset)
- Specified by:
getUser
in interfaceClusterUsers
-
getFileSystem
public static org.apache.hadoop.fs.FileSystem getFileSystem() throws IOException
- Throws:
IOException
-
getClusterConfiguration
public static AccumuloClusterConfiguration getClusterConfiguration()
-
configureMiniCluster
public void configureMiniCluster(MiniAccumuloConfigImpl cfg, org.apache.hadoop.conf.Configuration hadoopCoreSite)
- Specified by:
configureMiniCluster
in interfaceMiniClusterConfigurationCallback
-
canRunTest
public boolean canRunTest(AccumuloClusterHarness.ClusterType type)
A test may not be capable of running against a given AccumuloCluster. Implementations can override this method to advertise that they cannot (or perhaps do not) want to run the test.
-
getUsableDir
public org.apache.hadoop.fs.Path getUsableDir() throws IllegalArgumentException
Tries to give a reasonable directory which can be used to create temporary files for the test. Makes a basic attempt to create the directory if it does not already exist.- Returns:
- A directory which can be expected to exist on the Cluster's FileSystem
- Throws:
IllegalArgumentException
-
-