public final class ClusterStateHealth extends java.lang.Object implements java.lang.Iterable<ClusterIndexHealth>, Streamable
Constructor and Description |
---|
ClusterStateHealth(ClusterState clusterState)
Creates a new
ClusterStateHealth instance considering the current cluster state and all indices in the cluster. |
ClusterStateHealth(ClusterState clusterState,
java.lang.String[] concreteIndices)
Creates a new
ClusterStateHealth instance considering the current cluster state and the provided index names. |
ClusterStateHealth(MetaData clusterMetaData,
RoutingTable routingTables)
Creates a new
ClusterStateHealth instance based on cluster meta data and its routing table as a convenience. |
Modifier and Type | Method and Description |
---|---|
int |
getActivePrimaryShards() |
int |
getActiveShards() |
double |
getActiveShardsPercent() |
java.util.Map<java.lang.String,ClusterIndexHealth> |
getIndices() |
int |
getInitializingShards() |
int |
getNumberOfDataNodes() |
int |
getNumberOfNodes() |
int |
getRelocatingShards() |
ClusterHealthStatus |
getStatus() |
int |
getUnassignedShards() |
java.util.List<java.lang.String> |
getValidationFailures() |
java.util.Iterator<ClusterIndexHealth> |
iterator() |
static ClusterStateHealth |
readClusterHealth(StreamInput in) |
void |
readFrom(StreamInput in)
Set this object's fields from a StreamInput.
|
void |
writeTo(StreamOutput out)
Write this object's fields to a StreamOutput.
|
public ClusterStateHealth(MetaData clusterMetaData, RoutingTable routingTables)
ClusterStateHealth
instance based on cluster meta data and its routing table as a convenience.clusterMetaData
- Current cluster meta data. Must not be null.routingTables
- Current routing table. Must not be null.public ClusterStateHealth(ClusterState clusterState)
ClusterStateHealth
instance considering the current cluster state and all indices in the cluster.clusterState
- The current cluster state. Must not be null.public ClusterStateHealth(ClusterState clusterState, java.lang.String[] concreteIndices)
ClusterStateHealth
instance considering the current cluster state and the provided index names.clusterState
- The current cluster state. Must not be null.concreteIndices
- An array of index names to consider. Must not be null but may be empty.public static ClusterStateHealth readClusterHealth(StreamInput in) throws java.io.IOException
java.io.IOException
public java.util.List<java.lang.String> getValidationFailures()
public int getActiveShards()
public int getRelocatingShards()
public int getActivePrimaryShards()
public int getInitializingShards()
public int getUnassignedShards()
public int getNumberOfNodes()
public int getNumberOfDataNodes()
public ClusterHealthStatus getStatus()
public java.util.Map<java.lang.String,ClusterIndexHealth> getIndices()
public double getActiveShardsPercent()
public java.util.Iterator<ClusterIndexHealth> iterator()
iterator
in interface java.lang.Iterable<ClusterIndexHealth>
public void readFrom(StreamInput in) throws java.io.IOException
Streamable
readFrom
in interface Streamable
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Streamable
writeTo
in interface Streamable
java.io.IOException