public final class ClusterInitService extends Object
| Constructor and Description |
|---|
ClusterInitService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isNativeTransportRunning(String storageNode,
int jmxPort) |
boolean |
ping(String[] storageNodes,
int[] jmxPorts,
int numHosts)
Pings the storage nodes to verify if they are available and native transport
is running.
|
void |
waitForClusterToStart(String[] storageNodes,
int[] jmxPorts)
This method attempts to establish a Thrift RPC connection to each host.
|
void |
waitForClusterToStart(String[] storageNodes,
int[] jmxPorts,
int numHosts,
int retries)
This method attempts to establish a Thrift RPC connection to each host for the
number specified.
|
void |
waitForClusterToStart(String[] storageNodes,
int[] jmxPorts,
int numHosts,
long delay,
int retries,
int initialWait)
This method attempts to establish a Thrift RPC connection to each host for the
number specified.
|
void |
waitForSchemaAgreement(String[] storageNodes,
int[] jmxPorts)
Waits for the cluster to reach schema agreement.
|
public boolean ping(String[] storageNodes, int[] jmxPorts, int numHosts)
storageNodes - storage node addressesjmxPorts - JMX portsnumHosts - minimum number of active hostspublic void waitForClusterToStart(String[] storageNodes, int[] jmxPorts)
#waitForClusterToStart(int, java.util.List, int) for details.storageNodes - The cluster nodes to which a connection should be madejmxPorts - JMX port for each cluster node addresspublic void waitForClusterToStart(String[] storageNodes, int[] jmxPorts, int numHosts, int retries)
numHosts
is 2, this method will block only until it can connect to two of the hosts. If the
connection fails, the host is retried after going through the other, remaining
hosts.
numHosts - The number of hosts to which a successful connection has to be made
before returning.retries - The number of times to retry connecting. A runtime exception will be
thrown when the number of failed connections exceeds this value.public void waitForClusterToStart(String[] storageNodes, int[] jmxPorts, int numHosts, long delay, int retries, int initialWait)
numHosts
is 2, this method will block only until it can connect to two of the hosts. If the
connection fails, the host is retried after going through the other, remaining
hosts.
numHosts - The number of hosts to which a successful connection has to be made
before returning.delay - The amount of time wait between attempts to make a connectionretries - The number of times to retry connecting. A runtime exception will be
thrown when the number of failed connections exceeds this value.initialWait - The amount of seconds before first try.public void waitForSchemaAgreement(String[] storageNodes, int[] jmxPorts) throws Exception
hosts - The cluster nodesExceptionCopyright © 2008-2014 Red Hat, Inc.. All Rights Reserved.