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.deprecationLogger, 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<FailedRerouteAllocation.FailedShard> 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) |
protected long |
currentNanoTime()
ovrride this to control time based decisions during allocation
|
RoutingAllocation.Result |
reroute(ClusterState clusterState,
AllocationCommands commands) |
RoutingAllocation.Result |
reroute(ClusterState clusterState,
AllocationCommands commands,
boolean explain) |
RoutingAllocation.Result |
reroute(ClusterState clusterState,
String reason)
Reroutes the routing table based on the live nodes.
|
protected RoutingAllocation.Result |
reroute(ClusterState clusterState,
String reason,
boolean debug)
Reroutes the routing table based on the live nodes.
|
static void |
updateLeftDelayOfUnassignedShards(RoutingAllocation allocation,
Settings settings) |
logDeprecatedSetting, logRemovedSetting, 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<FailedRerouteAllocation.FailedShard> 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)
public RoutingAllocation.Result reroute(ClusterState clusterState, String reason)
If the same instance of the routing table is returned, then no change has been made.
protected RoutingAllocation.Result reroute(ClusterState clusterState, String reason, boolean debug)
If the same instance of the routing table is returned, then no change has been made.
public static void updateLeftDelayOfUnassignedShards(RoutingAllocation allocation, Settings settings)
protected long currentNanoTime()
Copyright © 2009–2017. All rights reserved.