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:
AccumuloFileOutputFormatIT
,AccumuloFileOutputFormatIT
,AccumuloInputFormatIT
,AccumuloInputFormatIT
,AccumuloMultiTableInputFormatIT
,AccumuloMultiTableInputFormatIT
,AccumuloOutputFormatIT
,AccumuloRowInputFormatIT
,AccumuloRowInputFormatIT
,AddSplitIT
,BadDeleteMarkersCreatedIT
,BadIteratorMincIT
,BadLocalityGroupMincIT
,BalanceInPresenceOfOfflineTableIT
,BalanceIT
,BatchScanSplitIT
,BatchWriterFlushIT
,BatchWriterInTabletServerIT
,BatchWriterIT
,BigRootTabletIT
,BinaryIT
,BinaryStressIT
,BloomFilterIT
,BulkFailureIT
,BulkFileIT
,BulkImportSequentialRowsIT
,BulkImportVolumeIT
,BulkIT
,BulkSplitOptimizationIT
,ChaoticBalancerIT
,ChunkInputFormatIT
,ChunkInputStreamIT
,ClassLoaderIT
,CleanWalIT
,ClientSideIteratorIT
,CloneIT
,CloneTestIT
,CombinerIT
,CompactionIT
,ConcurrencyIT
,ConcurrentDeleteTableIT
,ConditionalWriterIT
,ConstraintIT
,CreateAndUseIT
,CreateManyScannersIT
,CredentialsIT
,DeleteEverythingIT
,DeleteIT
,DeleteRowsIT
,DeleteRowsSplitIT
,DeleteTableDuringSplitIT
,ExamplesIT
,FateConcurrencyIT
,FateStarvationIT
,FindMaxIT
,ImportExportIT
,InterruptibleScannersIT
,IsolationAndDeepCopyIT
,KeyValueEqualityIT
,LargeRowIT
,LegacyMetricsIT
,LocatorIT
,LogicalTimeIT
,ManyWriteAheadLogsIT
,MasterAssignmentIT
,MasterFailoverIT
,MasterMetricsIT
,MaxOpenIT
,MergeIT
,MetaConstraintRetryIT
,MetadataIT
,MetaSplitIT
,MultiTableBatchWriterIT
,NamespacesIT
,OrIteratorIT
,PermissionsIT
,ReadWriteIT
,RecoveryCompactionsAreFlushesIT
,RenameIT
,RestartIT
,RestartStressIT
,RowDeleteIT
,SampleIT
,ScanFlushWithTimeIT
,ScanIdIT
,ScanIteratorIT
,ScannerContextIT
,ScannerIT
,ScanRangeIT
,ScanSessionTimeOutIT
,ServerSideErrorIT
,ShellConfigIT
,SparseColumnFamilyIT
,SplitIT
,SplitRecoveryIT
,StartIT
,TableConfigurationUpdateIT
,TableIT
,TableOperationsIT
,TabletIT
,TabletStateChangeIteratorIT
,TimeoutIT
,TokenFileIT
,TokenFileIT
,TransportCachingIT
,UserCompactionStrategyIT
,UsersIT
,VisibilityIT
,WriteAheadLogIT
,WriteLotsIT
,YieldScannersIT
,ZooKeeperPropertiesIT
public abstract class AccumuloClusterHarness extends AccumuloITBase implements MiniClusterConfigurationCallback, ClusterUsers
General Integration-Test base class that provides access to an Accumulo instance for testing. This instance could 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canRunTest(AccumuloClusterHarness.ClusterType type)
A test may not be capable of running against a given AccumuloCluster.void
cleanupTables()
void
cleanupUsers()
void
configureMiniCluster(MiniAccumuloConfigImpl cfg, org.apache.hadoop.conf.Configuration hadoopCoreSite)
static String
getAdminPrincipal()
static AuthenticationToken
getAdminToken()
ClusterUser
getAdminUser()
static AccumuloCluster
getCluster()
static AccumuloClusterConfiguration
getClusterConfiguration()
static ClusterControl
getClusterControl()
static AccumuloClusterHarness.ClusterType
getClusterType()
Connector
getConnector()
static org.apache.hadoop.fs.FileSystem
getFileSystem()
static TestingKdc
getKdc()
TheTestingKdc
used for thisAccumuloCluster
.org.apache.hadoop.fs.Path
getUsableDir()
Tries to give a reasonable directory which can be used to create temporary files for the test.ClusterUser
getUser(int offset)
static void
setUp()
void
setupCluster()
void
teardownCluster()
static void
tearDownKdc()
-
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
-
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()
-
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()
-
getConnector
public Connector getConnector()
-
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, IOException
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
IOException
-
-