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
Modifier and TypeFieldDescriptionprotected File
Deprecated.Directory (a subdirectory of dataTestDir) used by the dfs cluster if anyprivate boolean
Deprecated.Set if we were passed a zkCluster.private MiniZooKeeperCluster
Deprecated.protected ZKWatcher
Deprecated.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
ConstructorDescriptionDeprecated.HBaseZKTestingUtility
(org.apache.hadoop.conf.Configuration conf) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Deprecated.Returns True if we removed the test dirs(package private) org.apache.hadoop.fs.Path
Deprecated.Deprecated.Deprecated.Returns a ZKWatcher instance.static ZKWatcher
getZooKeeperWatcher
(HBaseZKTestingUtility testUtil) Deprecated.Gets a ZKWatcher.protected void
Deprecated.Creates a directory for the cluster, under the test datavoid
setZkCluster
(MiniZooKeeperCluster zkCluster) Deprecated.void
Deprecated.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 MiniZooKeeperCluster
startMiniZKCluster
(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:
cleanupTestDir
in classHBaseCommonTestingUtility
-
TestingHBaseCluster
instead.