java.lang.Object
org.elasticsearch.cluster.health.ClusterShardHealth
- All Implemented Interfaces:
- Writeable,- ToXContent,- ToXContentFragment
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContentToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.WriteableWriteable.Reader<V>, Writeable.Writer<V>
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final ConstructingObjectParser<ClusterShardHealth,Integer> Fields inherited from interface org.elasticsearch.xcontent.ToXContentEMPTY_PARAMS
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbooleanstatic ClusterShardHealthfromXContent(XContentParser parser) intstatic ClusterHealthStatusgetInactivePrimaryHealth(ShardRouting shardRouting) Checks if an inactive primary shard should cause the cluster health to go RED.intintintintinthashCode()booleantoString()toXContent(XContentBuilder builder, ToXContent.Params params) voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentFragmentisFragment
- 
Field Details- 
PARSER
 
- 
- 
Constructor Details- 
ClusterShardHealth
- 
ClusterShardHealth- Throws:
- IOException
 
 
- 
- 
Method Details- 
getShardIdpublic int getShardId()
- 
getStatus
- 
getRelocatingShardspublic int getRelocatingShards()
- 
getActiveShardspublic int getActiveShards()
- 
isPrimaryActivepublic boolean isPrimaryActive()
- 
getInitializingShardspublic int getInitializingShards()
- 
getUnassignedShardspublic int getUnassignedShards()
- 
writeToDescription copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
- writeToin interface- Writeable
- Throws:
- IOException
 
- 
getInactivePrimaryHealthChecks 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.
- 
toXContentpublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
- toXContentin interface- ToXContent
- Throws:
- IOException
 
- 
fromXContent- Throws:
- IOException
 
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
 
-