Package org.apache.hadoop.hbase
Class HBaseZKTestingUtility
java.lang.Object
org.apache.hadoop.hbase.HBaseCommonTestingUtility
org.apache.hadoop.hbase.HBaseZKTestingUtility
- Direct Known Subclasses:
 HBaseTestingUtility
Deprecated.
Helpers for testing HBase that do not depend on specific server/etc. things. The main difference
 from 
HBaseCommonTestingUtility is that we can start a zookeeper cluster.- 
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.HBaseCommonTestingUtility
HBaseCommonTestingUtility.PortAllocator - 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected FileDeprecated.Directory (a subdirectory of dataTestDir) used by the dfs cluster if anyprivate booleanDeprecated.Set if we were passed a zkCluster.private MiniZooKeeperClusterDeprecated.protected ZKWatcherDeprecated.Fields inherited from class org.apache.hadoop.hbase.HBaseCommonTestingUtility
BASE_TEST_DIRECTORY_KEY, BOOLEAN_PARAMETERIZED, COMPRESSION_ALGORITHMS, COMPRESSION_ALGORITHMS_PARAMETERIZED, conf, DEFAULT_BASE_TEST_DIRECTORY, LOG - 
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.HBaseZKTestingUtility(org.apache.hadoop.conf.Configuration conf) Deprecated. - 
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated.Returns True if we removed the test dirs(package private) org.apache.hadoop.fs.PathDeprecated.Deprecated.Deprecated.Returns a ZKWatcher instance.static ZKWatchergetZooKeeperWatcher(HBaseZKTestingUtility testUtil) Deprecated.Gets a ZKWatcher.protected voidDeprecated.Creates a directory for the cluster, under the test datavoidsetZkCluster(MiniZooKeeperCluster zkCluster) Deprecated.voidDeprecated.Shuts down zk cluster created by call tostartMiniZKCluster()or does nothing.Deprecated.Call this if you only want a zk cluster.startMiniZKCluster(int zooKeeperServerNum, int... clientPortList) Deprecated.Call this if you only want a zk cluster.private MiniZooKeeperClusterstartMiniZKCluster(File dir, int zooKeeperServerNum, int[] clientPortList) Deprecated.Start a mini ZK cluster.Methods inherited from class org.apache.hadoop.hbase.HBaseCommonTestingUtility
cleanupTestDir, createSubDir, deleteDir, deleteOnExit, getConfiguration, getDataTestDir, getDataTestDir, getRandomDir, getRandomUUID, randomFreePort, setupDataTestDir, waitFor, waitFor, waitFor 
- 
Field Details
- 
zkCluster
Deprecated. - 
passedZkCluster
Deprecated.Set if we were passed a zkCluster. If so, we won't shutdown zk as part of general shutdown. - 
zooKeeperWatcher
Deprecated. - 
clusterTestDir
Deprecated.Directory (a subdirectory of dataTestDir) used by the dfs cluster if any 
 - 
 - 
Constructor Details
- 
HBaseZKTestingUtility
public HBaseZKTestingUtility()Deprecated. - 
HBaseZKTestingUtility
Deprecated. 
 - 
 - 
Method Details
- 
getClusterTestDir
org.apache.hadoop.fs.Path getClusterTestDir()Deprecated.- Returns:
 - Where the cluster will write data on the local subsystem. Creates it if it does not
         exist already. A subdir of 
HBaseCommonTestingUtility#getBaseTestDir() 
 - 
setupClusterTestDir
Deprecated.Creates a directory for the cluster, under the test data - 
startMiniZKCluster
Deprecated.Call this if you only want a zk cluster.- Returns:
 - zk cluster started.
 - Throws:
 Exception- See Also:
 
 - 
startMiniZKCluster
public MiniZooKeeperCluster startMiniZKCluster(int zooKeeperServerNum, int... clientPortList) throws Exception Deprecated.Call this if you only want a zk cluster.- Returns:
 - zk cluster started.
 - Throws:
 Exception- See Also:
 
 - 
startMiniZKCluster
private MiniZooKeeperCluster startMiniZKCluster(File dir, int zooKeeperServerNum, int[] clientPortList) throws Exception Deprecated.Start a mini ZK cluster. If the property "test.hbase.zookeeper.property.clientPort" is set the port mentioned is used as the default port for ZooKeeper.- Throws:
 Exception
 - 
getZkCluster
Deprecated. - 
setZkCluster
Deprecated. - 
shutdownMiniZKCluster
Deprecated.Shuts down zk cluster created by call tostartMiniZKCluster()or does nothing.- Throws:
 IOException- See Also:
 
 - 
getZooKeeperWatcher
Deprecated.Returns a ZKWatcher instance. This instance is shared between HBaseTestingUtility instance users. Don't close it, it will be closed automatically when the cluster shutdowns- Returns:
 - The ZKWatcher instance.
 - Throws:
 IOException
 - 
getZooKeeperWatcher
Deprecated.Gets a ZKWatcher.- Throws:
 IOException
 - 
cleanupTestDir
Deprecated.Returns True if we removed the test dirs- Overrides:
 cleanupTestDirin classHBaseCommonTestingUtility
 
 - 
 
TestingHBaseClusterinstead.