@InterfaceAudience.Public public final class TestingHBaseClusterOption extends Object
TestingHBaseCluster
(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 TestingHBaseClusterOption.Builder
. Example usage:
TestingHBaseClusterOption option = TestingHBaseClusterOption.builder(). .numMasters(3).createWALDir(true).build();Default values can be found in
TestingHBaseClusterOption.Builder
.Modifier and Type | Class and Description |
---|---|
static class |
TestingHBaseClusterOption.Builder
Builder pattern for creating an
TestingHBaseClusterOption . |
Modifier and Type | Field and Description |
---|---|
private org.apache.hadoop.conf.Configuration |
conf
Configuration for this testing cluster.
|
private boolean |
createRootDir
Whether to create a new root or data directory path.
|
private boolean |
createWALDir
Whether to create a new WAL directory.
|
private String[] |
dataNodeHosts
The hostnames of DataNodes to run on.
|
private String |
externalDfsUri |
private String |
externalZkConnectString |
private int |
numAlwaysStandByMasters
Number of masters that always remain standby.
|
private int |
numDataNodes
Number of datanodes.
|
private int |
numMasters
Number of masters to start up.
|
private int |
numRegionServers
Number of region servers to start up.
|
private int |
numZkServers
Number of Zookeeper servers.
|
private List<Integer> |
rsPorts
Ports that RegionServer should use.
|
Modifier | Constructor and Description |
---|---|
private |
TestingHBaseClusterOption(org.apache.hadoop.conf.Configuration conf,
int numMasters,
int numAlwaysStandByMasters,
int numRegionServers,
List<Integer> rsPorts,
int numDataNodes,
String[] dataNodeHosts,
int numZkServers,
boolean createRootDir,
boolean createWALDir,
String externalDfsUri,
String externalZkConnectString)
Private constructor.
|
Modifier and Type | Method and Description |
---|---|
static TestingHBaseClusterOption.Builder |
builder()
Returns a new builder.
|
org.apache.hadoop.conf.Configuration |
conf() |
(package private) StartMiniClusterOption |
convert()
Convert to the internal option.
|
String[] |
getDataNodeHosts() |
String |
getExternalDfsUri() |
String |
getExternalZkConnectString() |
int |
getNumAlwaysStandByMasters() |
int |
getNumDataNodes() |
int |
getNumMasters() |
int |
getNumRegionServers() |
int |
getNumZkServers() |
List<Integer> |
getRsPorts() |
boolean |
isCreateRootDir() |
boolean |
isCreateWALDir() |
String |
toString() |
private final org.apache.hadoop.conf.Configuration conf
null
.private final int numMasters
private final int numAlwaysStandByMasters
private final int numRegionServers
private final List<Integer> rsPorts
private final int numDataNodes
dataNodeHosts
size.private final String[] dataNodeHosts
private final int numZkServers
private final boolean createRootDir
private final boolean createWALDir
private final String externalDfsUri
private final String externalZkConnectString
private TestingHBaseClusterOption(org.apache.hadoop.conf.Configuration conf, int numMasters, int numAlwaysStandByMasters, int numRegionServers, List<Integer> rsPorts, int numDataNodes, String[] dataNodeHosts, int numZkServers, boolean createRootDir, boolean createWALDir, String externalDfsUri, String externalZkConnectString)
TestingHBaseClusterOption.Builder.build()
.public org.apache.hadoop.conf.Configuration conf()
public int getNumMasters()
public int getNumAlwaysStandByMasters()
public int getNumRegionServers()
public List<Integer> getRsPorts()
public int getNumDataNodes()
public String[] getDataNodeHosts()
public int getNumZkServers()
public boolean isCreateRootDir()
public boolean isCreateWALDir()
public String getExternalDfsUri()
public String getExternalZkConnectString()
StartMiniClusterOption convert()
public static TestingHBaseClusterOption.Builder builder()
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.