public class AllocationService extends AbstractComponent
AllocationService
keeps AllocationDeciders
to choose nodes
for shard allocation. This class also manages new nodes joining the cluster
and rerouting of shards.componentSettings, logger, settings
Constructor and Description |
---|
AllocationService(Settings settings,
AllocationDeciders allocationDeciders,
ShardsAllocators shardsAllocators,
ClusterInfoService clusterInfoService) |
Modifier and Type | Method and Description |
---|---|
RoutingAllocation.Result |
applyFailedShard(ClusterState clusterState,
ShardRouting failedShard) |
RoutingAllocation.Result |
applyFailedShards(ClusterState clusterState,
List<ShardRouting> failedShards)
Applies the failed shards.
|
RoutingAllocation.Result |
applyStartedShards(ClusterState clusterState,
List<? extends ShardRouting> startedShards)
Applies the started shards.
|
RoutingAllocation.Result |
applyStartedShards(ClusterState clusterState,
List<? extends ShardRouting> startedShards,
boolean withReroute) |
RoutingAllocation.Result |
reroute(ClusterState clusterState)
Reroutes the routing table based on the live nodes.
|
RoutingAllocation.Result |
reroute(ClusterState clusterState,
AllocationCommands commands) |
RoutingAllocation.Result |
reroute(ClusterState clusterState,
AllocationCommands commands,
boolean explain) |
RoutingAllocation.Result |
reroute(ClusterState clusterState,
boolean debug)
Reroutes the routing table based on the live nodes.
|
RoutingAllocation.Result |
rerouteWithNoReassign(ClusterState clusterState)
Only handles reroute but *without* any reassignment of unassigned shards or rebalancing.
|
RoutingAllocation.Result |
rerouteWithNoReassign(ClusterState clusterState,
boolean debug)
Only handles reroute but *without* any reassignment of unassigned shards or rebalancing.
|
nodeName
@Inject public AllocationService(Settings settings, AllocationDeciders allocationDeciders, ShardsAllocators shardsAllocators, ClusterInfoService clusterInfoService)
public RoutingAllocation.Result applyStartedShards(ClusterState clusterState, List<? extends ShardRouting> startedShards)
If the same instance of the routing table is returned, then no change has been made.
public RoutingAllocation.Result applyStartedShards(ClusterState clusterState, List<? extends ShardRouting> startedShards, boolean withReroute)
public RoutingAllocation.Result applyFailedShard(ClusterState clusterState, ShardRouting failedShard)
public RoutingAllocation.Result applyFailedShards(ClusterState clusterState, List<ShardRouting> failedShards)
If the same instance of the routing table is returned, then no change has been made.
public RoutingAllocation.Result reroute(ClusterState clusterState, AllocationCommands commands)
public RoutingAllocation.Result reroute(ClusterState clusterState, AllocationCommands commands, boolean explain) throws ElasticsearchException
ElasticsearchException
public RoutingAllocation.Result reroute(ClusterState clusterState)
If the same instance of the routing table is returned, then no change has been made.
public RoutingAllocation.Result reroute(ClusterState clusterState, boolean debug)
If the same instance of the routing table is returned, then no change has been made.
public RoutingAllocation.Result rerouteWithNoReassign(ClusterState clusterState)
public RoutingAllocation.Result rerouteWithNoReassign(ClusterState clusterState, boolean debug)
Copyright © 2009–2015. All rights reserved.