Class TestShardRouting
java.lang.Object
org.elasticsearch.cluster.routing.TestShardRouting
A helper that allows to create shard routing instances within tests, while not requiring to expose
different simplified constructors on the ShardRouting itself.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(String index, int shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
static org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
static org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.AllocationId allocationId)
static org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.UnassignedInfo unassignedInfo)
static org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
static org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.RecoverySource recoverySource)
static org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
static org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.AllocationId allocationId)
static org.elasticsearch.cluster.routing.ShardRouting
newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.UnassignedInfo unassignedInfo)
static org.elasticsearch.cluster.routing.RecoverySource
static org.elasticsearch.cluster.routing.ShardRouting
relocate(org.elasticsearch.cluster.routing.ShardRouting shardRouting, String relocatingNodeId, long expectedShardSize)
-
Constructor Details
-
TestShardRouting
public TestShardRouting()
-
-
Method Details
-
newShardRouting
-
newShardRouting
public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state) -
newShardRouting
public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.RecoverySource recoverySource) -
newShardRouting
-
newShardRouting
-
newShardRouting
-
newShardRouting
public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.AllocationId allocationId) -
newShardRouting
-
newShardRouting
public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.UnassignedInfo unassignedInfo) -
relocate
public static org.elasticsearch.cluster.routing.ShardRouting relocate(org.elasticsearch.cluster.routing.ShardRouting shardRouting, String relocatingNodeId, long expectedShardSize) -
randomRecoverySource
public static org.elasticsearch.cluster.routing.RecoverySource randomRecoverySource()
-