java.lang.Object
org.elasticsearch.cluster.health.ClusterShardHealth
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentFragment
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, 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 final ConstructingObjectParser<ClusterShardHealth,
Integer> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
static ClusterShardHealth
fromXContent
(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()
toXContent
(XContentBuilder builder, 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.xcontent.ToXContentFragment
isFragment
-
Field Details
-
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 XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
fromXContent
- Throws:
IOException
-
toString
-
equals
-
hashCode
public int hashCode()
-