Package org.apache.hadoop.hbase
Class StartMiniClusterOption
java.lang.Object
org.apache.hadoop.hbase.StartMiniClusterOption
Deprecated.
Options for starting up a mini cluster (including an hbase, dfs and zookeeper clusters) in test.
The options include HDFS options to build mini dfs cluster, Zookeeper options to build mini zk
cluster, and mostly HBase options to build mini hbase cluster. To create an object, use a
StartMiniClusterOption.Builder
. Example usage:
StartMiniClusterOption option = StartMiniClusterOption.builder(). .numMasters(3).rsClass(MyRegionServer.class).createWALDir(true).build();Default values can be found in
StartMiniClusterOption.Builder
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic final class
Deprecated.Builder pattern for creating anStartMiniClusterOption
. -
Field Summary
Modifier and TypeFieldDescriptionprivate final boolean
Deprecated.Whether to create a new root or data directory path.private final boolean
Deprecated.Whether to create a new WAL directory.private final String[]
Deprecated.The hostnames of DataNodes to run on.Deprecated.The class to use as HMaster, or null for default.private final int
Deprecated.Number of masters that always remain standby.private final int
Deprecated.Number of datanodes.private final int
Deprecated.Number of masters to start up.private final int
Deprecated.Number of region servers to start up.private final int
Deprecated.Number of Zookeeper servers.private Class<? extends MiniHBaseCluster.MiniHBaseClusterRegionServer>
Deprecated.The class to use as HRegionServer, or null for default.Deprecated.Ports that RegionServer should use. -
Constructor Summary
ModifierConstructorDescriptionprivate
StartMiniClusterOption
(int numMasters, int numAlwaysStandByMasters, Class<? extends HMaster> masterClass, int numRegionServers, List<Integer> rsPorts, Class<? extends MiniHBaseCluster.MiniHBaseClusterRegionServer> rsClass, int numDataNodes, String[] dataNodeHosts, int numZkServers, boolean createRootDir, boolean createWALDir) Deprecated.Private constructor. -
Method Summary
-
Field Details
-
numMasters
Deprecated.Number of masters to start up. We'll start this many hbase masters. If numMasters > 1, you can find the active/primary master withMiniHBaseCluster.getMaster()
. -
numAlwaysStandByMasters
Deprecated.Number of masters that always remain standby. These set of masters never transition to active even if an active master does not exist. These are needed for testing scenarios where there are no active masters in the cluster but the cluster connection (backed by master registry) should still work. -
masterClass
Deprecated.The class to use as HMaster, or null for default. -
numRegionServers
Deprecated.Number of region servers to start up. If this value is > 1, then make sure config "hbase.regionserver.info.port" is -1 (i.e. no ui per regionserver) otherwise bind errors. -
rsPorts
Deprecated.Ports that RegionServer should use. Pass ports if you want to test cluster restart where for sure the regionservers come up on same address+port (but just with different startcode); by default mini hbase clusters choose new arbitrary ports on each cluster start. -
rsClass
Deprecated.The class to use as HRegionServer, or null for default. -
numDataNodes
Deprecated.Number of datanodes. Used to create mini DSF cluster. Surpassed bydataNodeHosts
size. -
dataNodeHosts
Deprecated.The hostnames of DataNodes to run on. This is useful if you want to run datanode on distinct hosts for things like HDFS block location verification. If you start MiniDFSCluster without host names, all instances of the datanodes will have the same host name. -
numZkServers
Deprecated.Number of Zookeeper servers. -
createRootDir
Deprecated.Whether to create a new root or data directory path. If true, the newly created data directory will be configured as HBase rootdir. This will overwrite existing root directory config. -
createWALDir
Deprecated.Whether to create a new WAL directory. If true, the newly created directory will be configured as HBase wal.dir which is separate from HBase rootdir.
-
-
Constructor Details
-
StartMiniClusterOption
private StartMiniClusterOption(int numMasters, int numAlwaysStandByMasters, Class<? extends HMaster> masterClass, int numRegionServers, List<Integer> rsPorts, Class<? extends MiniHBaseCluster.MiniHBaseClusterRegionServer> rsClass, int numDataNodes, String[] dataNodeHosts, int numZkServers, boolean createRootDir, boolean createWALDir) Deprecated.Private constructor. UseStartMiniClusterOption.Builder.build()
.
-
-
Method Details
-
getNumMasters
Deprecated. -
getNumAlwaysStandByMasters
Deprecated. -
getMasterClass
Deprecated. -
getNumRegionServers
Deprecated. -
getRsPorts
Deprecated. -
getRsClass
Deprecated. -
getNumDataNodes
Deprecated. -
getDataNodeHosts
Deprecated. -
getNumZkServers
Deprecated. -
isCreateRootDir
Deprecated. -
isCreateWALDir
Deprecated. -
toString
Deprecated. -
builder
Deprecated.Returns a new builder.
-
TestingHBaseCluster
instead.