public class UnassignedInfo extends Object implements ToXContent
Modifier and Type | Class and Description |
---|---|
static class |
UnassignedInfo.Reason
Reason why the shard is in unassigned state.
|
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Modifier and Type | Field and Description |
---|---|
static FormatDateTimeFormatter |
DATE_TIME_FORMATTER |
static String |
INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING |
EMPTY_PARAMS
Constructor and Description |
---|
UnassignedInfo(UnassignedInfo.Reason reason,
String details) |
Modifier and Type | Method and Description |
---|---|
static long |
findNextDelayedAllocationIn(Settings settings,
ClusterState state)
Finds the next (closest) delay expiration of an unassigned shard.
|
static long |
findSmallestDelayedAllocationSetting(Settings settings,
ClusterState state)
Finds the smallest delay expiration setting of an unassigned shard.
|
long |
getAllocationDelayTimeoutSetting(Settings settings,
Settings indexSettings)
The allocation delay value associated with the index (defaulting to node settings if not set).
|
long |
getDelayAllocationExpirationIn(Settings settings,
Settings indexSettings)
The time in millisecond until this unassigned shard can be reassigned.
|
String |
getDetails()
Returns optional details explaining the reasons.
|
static int |
getNumberOfDelayedUnassigned(Settings settings,
ClusterState state)
Returns the number of shards that are unassigned and currently being delayed.
|
UnassignedInfo.Reason |
getReason()
The reason why the shard is unassigned.
|
long |
getTimestampInMillis()
The timestamp in milliseconds since epoch.
|
UnassignedInfo |
readFrom(StreamInput in) |
String |
toString() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out) |
public static final FormatDateTimeFormatter DATE_TIME_FORMATTER
public static final String INDEX_DELAYED_NODE_LEFT_TIMEOUT_SETTING
public UnassignedInfo(UnassignedInfo.Reason reason, String details)
public void writeTo(StreamOutput out) throws IOException
IOException
public UnassignedInfo readFrom(StreamInput in) throws IOException
IOException
public UnassignedInfo.Reason getReason()
public long getTimestampInMillis()
public long getAllocationDelayTimeoutSetting(Settings settings, Settings indexSettings)
public long getDelayAllocationExpirationIn(Settings settings, Settings indexSettings)
public static int getNumberOfDelayedUnassigned(Settings settings, ClusterState state)
public static long findSmallestDelayedAllocationSetting(Settings settings, ClusterState state)
public static long findNextDelayedAllocationIn(Settings settings, ClusterState state)
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException
toXContent
in interface ToXContent
IOException
Copyright © 2009–2015. All rights reserved.