Package org.elasticsearch.cluster.health
Class ClusterShardHealth
java.lang.Object
org.elasticsearch.cluster.health.ClusterShardHealth
- All Implemented Interfaces:
Writeable
,org.elasticsearch.common.xcontent.ToXContent
,org.elasticsearch.common.xcontent.ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Modifier and TypeFieldDescriptionstatic org.elasticsearch.common.xcontent.ConstructingObjectParser<ClusterShardHealth,Integer>
Fields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static ClusterShardHealth
fromXContent(org.elasticsearch.common.xcontent.XContentParser parser)
int
static ClusterHealthStatus
getInactivePrimaryHealth(ShardRouting shardRouting)
Checks if an inactive primary shard should cause the cluster health to go RED.int
int
int
int
int
hashCode()
boolean
toString()
org.elasticsearch.common.xcontent.XContentBuilder
toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params)
void
writeTo(StreamOutput out)
Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.common.xcontent.ToXContentFragment
isFragment
-
Field Details
-
PARSER
public static final org.elasticsearch.common.xcontent.ConstructingObjectParser<ClusterShardHealth,Integer> PARSER
-
-
Constructor Details
-
ClusterShardHealth
-
ClusterShardHealth
- Throws:
IOException
-
-
Method Details
-
getShardId
public int getShardId() -
getStatus
-
getRelocatingShards
public int getRelocatingShards() -
getActiveShards
public int getActiveShards() -
isPrimaryActive
public boolean isPrimaryActive() -
getInitializingShards
public int getInitializingShards() -
getUnassignedShards
public int getUnassignedShards() -
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
getInactivePrimaryHealth
Checks if an inactive primary shard should cause the cluster health to go RED. An inactive primary shard in an index should cause the cluster health to be RED to make it visible that some of the existing data is unavailable. In case of index creation, snapshot restore or index shrinking, which are unexceptional events in the cluster lifecycle, cluster health should not turn RED for the time where primaries are still in the initializing state but go to YELLOW instead. However, in case of exceptional events, for example when the primary shard cannot be assigned to a node or initialization fails at some point, cluster health should still turn RED. NB: this method should *not* be called on active shards nor on non-primary shards. -
toXContent
public org.elasticsearch.common.xcontent.XContentBuilder toXContent(org.elasticsearch.common.xcontent.XContentBuilder builder, org.elasticsearch.common.xcontent.ToXContent.Params params) throws IOException- Specified by:
toXContent
in interfaceorg.elasticsearch.common.xcontent.ToXContent
- Throws:
IOException
-
fromXContent
public static ClusterShardHealth fromXContent(org.elasticsearch.common.xcontent.XContentParser parser) throws IOException- Throws:
IOException
-
toString
-
equals
-
hashCode
public int hashCode()
-