/** * Cancel relocation of a shard. The shards state must be set * to <code>RELOCATING</code>. */ public ShardRouting cancelRelocation() { assert state == ShardRoutingState.RELOCATING : this; assert assignedToNode() : this; assert relocatingNodeId != null : this; return new ShardRouting(shardId, currentNodeId, null, primary, ShardRoutingState.STARTED, recoverySource, null, AllocationId.cancelRelocation(allocationId), UNAVAILABLE_EXPECTED_SHARD_SIZE); }
/** * Cancel relocation of a shard. The shards state must be set * to <code>RELOCATING</code>. */ public ShardRouting cancelRelocation() { assert state == ShardRoutingState.RELOCATING : this; assert assignedToNode() : this; assert relocatingNodeId != null : this; return new ShardRouting(shardId, currentNodeId, null, primary, ShardRoutingState.STARTED, recoverySource, null, AllocationId.cancelRelocation(allocationId), UNAVAILABLE_EXPECTED_SHARD_SIZE); }
/** * Cancel relocation of a shard. The shards state must be set * to <code>RELOCATING</code>. */ public ShardRouting cancelRelocation() { assert state == ShardRoutingState.RELOCATING : this; assert assignedToNode() : this; assert relocatingNodeId != null : this; return new ShardRouting(shardId, currentNodeId, null, primary, ShardRoutingState.STARTED, recoverySource, null, AllocationId.cancelRelocation(allocationId), UNAVAILABLE_EXPECTED_SHARD_SIZE); }
/** * Cancel relocation of a shard. The shards state must be set * to <code>RELOCATING</code>. */ public ShardRouting cancelRelocation() { assert state == ShardRoutingState.RELOCATING : this; assert assignedToNode() : this; assert relocatingNodeId != null : this; return new ShardRouting(shardId, currentNodeId, null, primary, ShardRoutingState.STARTED, recoverySource, null, AllocationId.cancelRelocation(allocationId), UNAVAILABLE_EXPECTED_SHARD_SIZE); }
/** * Cancel relocation of a shard. The shards state must be set * to <code>RELOCATING</code>. */ void cancelRelocation() { ensureNotFrozen(); version++; assert state == ShardRoutingState.RELOCATING : this; assert assignedToNode() : this; assert relocatingNodeId != null : this; expectedShardSize = UNAVAILABLE_EXPECTED_SHARD_SIZE; state = ShardRoutingState.STARTED; relocatingNodeId = null; allocationId = AllocationId.cancelRelocation(allocationId); }