public ShardAllocationDecision(StreamInput in) throws IOException { allocateDecision = new AllocateUnassignedDecision(in); moveDecision = new MoveDecision(in); }
private static AllocateUnassignedDecision no(AllocationStatus allocationStatus, @Nullable List<NodeAllocationResult> decisions, boolean reuseStore, long remainingDelay, long totalDelay) { if (decisions != null) { return new AllocateUnassignedDecision(allocationStatus, null, null, decisions, reuseStore, remainingDelay, totalDelay); } else { return getCachedDecision(allocationStatus); } }
/** * Creates a YES decision with the given individual node-level decisions that * comprised the final YES decision, along with the node id to which the shard is assigned and * the allocation id for the shard, if available. */ public static AllocateUnassignedDecision yes(DiscoveryNode assignedNode, @Nullable String allocationId, @Nullable List<NodeAllocationResult> decisions, boolean reuseStore) { return new AllocateUnassignedDecision(null, assignedNode, allocationId, decisions, reuseStore, 0L, 0L); }
/** * Returns a THROTTLE decision, with the individual node-level decisions that * comprised the final THROTTLE decision if in explain mode. */ public static AllocateUnassignedDecision throttle(@Nullable List<NodeAllocationResult> decisions) { if (decisions != null) { return new AllocateUnassignedDecision(AllocationStatus.DECIDERS_THROTTLED, null, null, decisions, false, 0L, 0L); } else { return getCachedDecision(AllocationStatus.DECIDERS_THROTTLED); } }
/** * Creates a {@link AllocateUnassignedDecision} from the given {@link Decision} and the assigned node, if any. */ public static AllocateUnassignedDecision fromDecision(Decision decision, @Nullable DiscoveryNode assignedNode, @Nullable List<NodeAllocationResult> nodeDecisions) { final Type decisionType = decision.type(); AllocationStatus allocationStatus = decisionType != Type.YES ? AllocationStatus.fromDecision(decisionType) : null; return new AllocateUnassignedDecision(allocationStatus, assignedNode, null, nodeDecisions, false, 0L, 0L); }
public ShardAllocationDecision(StreamInput in) throws IOException { allocateDecision = new AllocateUnassignedDecision(in); moveDecision = new MoveDecision(in); }
public ShardAllocationDecision(StreamInput in) throws IOException { allocateDecision = new AllocateUnassignedDecision(in); moveDecision = new MoveDecision(in); }
public ShardAllocationDecision(StreamInput in) throws IOException { allocateDecision = new AllocateUnassignedDecision(in); moveDecision = new MoveDecision(in); }
/** * Creates a YES decision with the given individual node-level decisions that * comprised the final YES decision, along with the node id to which the shard is assigned and * the allocation id for the shard, if available. */ public static AllocateUnassignedDecision yes(DiscoveryNode assignedNode, @Nullable String allocationId, @Nullable List<NodeAllocationResult> decisions, boolean reuseStore) { return new AllocateUnassignedDecision(null, assignedNode, allocationId, decisions, reuseStore, 0L, 0L); }
/** * Creates a YES decision with the given individual node-level decisions that * comprised the final YES decision, along with the node id to which the shard is assigned and * the allocation id for the shard, if available. */ public static AllocateUnassignedDecision yes(DiscoveryNode assignedNode, @Nullable String allocationId, @Nullable List<NodeAllocationResult> decisions, boolean reuseStore) { return new AllocateUnassignedDecision(null, assignedNode, allocationId, decisions, reuseStore, 0L, 0L); }
private static AllocateUnassignedDecision no(AllocationStatus allocationStatus, @Nullable List<NodeAllocationResult> decisions, boolean reuseStore, long remainingDelay, long totalDelay) { if (decisions != null) { return new AllocateUnassignedDecision(allocationStatus, null, null, decisions, reuseStore, remainingDelay, totalDelay); } else { return getCachedDecision(allocationStatus); } }
private static AllocateUnassignedDecision no(AllocationStatus allocationStatus, @Nullable List<NodeAllocationResult> decisions, boolean reuseStore, long remainingDelay, long totalDelay) { if (decisions != null) { return new AllocateUnassignedDecision(allocationStatus, null, null, decisions, reuseStore, remainingDelay, totalDelay); } else { return getCachedDecision(allocationStatus); } }
/** * Returns a THROTTLE decision, with the individual node-level decisions that * comprised the final THROTTLE decision if in explain mode. */ public static AllocateUnassignedDecision throttle(@Nullable List<NodeAllocationResult> decisions) { if (decisions != null) { return new AllocateUnassignedDecision(AllocationStatus.DECIDERS_THROTTLED, null, null, decisions, false, 0L, 0L); } else { return getCachedDecision(AllocationStatus.DECIDERS_THROTTLED); } }
/** * Returns a THROTTLE decision, with the individual node-level decisions that * comprised the final THROTTLE decision if in explain mode. */ public static AllocateUnassignedDecision throttle(@Nullable List<NodeAllocationResult> decisions) { if (decisions != null) { return new AllocateUnassignedDecision(AllocationStatus.DECIDERS_THROTTLED, null, null, decisions, false, 0L, 0L); } else { return getCachedDecision(AllocationStatus.DECIDERS_THROTTLED); } }
private static AllocateUnassignedDecision no(AllocationStatus allocationStatus, @Nullable List<NodeAllocationResult> decisions, boolean reuseStore, long remainingDelay, long totalDelay) { if (decisions != null) { return new AllocateUnassignedDecision(allocationStatus, null, null, decisions, reuseStore, remainingDelay, totalDelay); } else { return getCachedDecision(allocationStatus); } }
/** * Returns a THROTTLE decision, with the individual node-level decisions that * comprised the final THROTTLE decision if in explain mode. */ public static AllocateUnassignedDecision throttle(@Nullable List<NodeAllocationResult> decisions) { if (decisions != null) { return new AllocateUnassignedDecision(AllocationStatus.DECIDERS_THROTTLED, null, null, decisions, false, 0L, 0L); } else { return getCachedDecision(AllocationStatus.DECIDERS_THROTTLED); } }
/** * Creates a YES decision with the given individual node-level decisions that * comprised the final YES decision, along with the node id to which the shard is assigned and * the allocation id for the shard, if available. */ public static AllocateUnassignedDecision yes(DiscoveryNode assignedNode, @Nullable String allocationId, @Nullable List<NodeAllocationResult> decisions, boolean reuseStore) { return new AllocateUnassignedDecision(null, assignedNode, allocationId, decisions, reuseStore, 0L, 0L); }
/** * Creates a {@link AllocateUnassignedDecision} from the given {@link Decision} and the assigned node, if any. */ public static AllocateUnassignedDecision fromDecision(Decision decision, @Nullable DiscoveryNode assignedNode, @Nullable List<NodeAllocationResult> nodeDecisions) { final Type decisionType = decision.type(); AllocationStatus allocationStatus = decisionType != Type.YES ? AllocationStatus.fromDecision(decisionType) : null; return new AllocateUnassignedDecision(allocationStatus, assignedNode, null, nodeDecisions, false, 0L, 0L); }
/** * Creates a {@link AllocateUnassignedDecision} from the given {@link Decision} and the assigned node, if any. */ public static AllocateUnassignedDecision fromDecision(Decision decision, @Nullable DiscoveryNode assignedNode, @Nullable List<NodeAllocationResult> nodeDecisions) { final Type decisionType = decision.type(); AllocationStatus allocationStatus = decisionType != Type.YES ? AllocationStatus.fromDecision(decisionType) : null; return new AllocateUnassignedDecision(allocationStatus, assignedNode, null, nodeDecisions, false, 0L, 0L); }
/** * Creates a {@link AllocateUnassignedDecision} from the given {@link Decision} and the assigned node, if any. */ public static AllocateUnassignedDecision fromDecision(Decision decision, @Nullable DiscoveryNode assignedNode, @Nullable List<NodeAllocationResult> nodeDecisions) { final Type decisionType = decision.type(); AllocationStatus allocationStatus = decisionType != Type.YES ? AllocationStatus.fromDecision(decisionType) : null; return new AllocateUnassignedDecision(allocationStatus, assignedNode, null, nodeDecisions, false, 0L, 0L); }