org.elasticsearch.cluster.routing.allocation
Class AllocationService

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.cluster.routing.allocation.AllocationService

public class AllocationService
extends AbstractComponent


Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
AllocationService()
           
AllocationService(Settings settings)
           
AllocationService(Settings settings, AllocationDeciders allocationDeciders, ShardsAllocators shardsAllocators)
           
 
Method Summary
 RoutingAllocation.Result applyFailedShard(ClusterState clusterState, ShardRouting failedShard)
          Applies the failed shards.
 RoutingAllocation.Result applyStartedShards(ClusterState clusterState, List<? extends ShardRouting> startedShards)
          Applies the started shards.
 RoutingAllocation.Result reroute(ClusterState clusterState)
          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.
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllocationService

public AllocationService()

AllocationService

public AllocationService(Settings settings)

AllocationService

@Inject
public AllocationService(Settings settings,
                                AllocationDeciders allocationDeciders,
                                ShardsAllocators shardsAllocators)
Method Detail

applyStartedShards

public RoutingAllocation.Result applyStartedShards(ClusterState clusterState,
                                                   List<? extends ShardRouting> startedShards)
Applies the started shards. Note, shards can be called several times within this method.

If the same instance of the routing table is returned, then no change has been made.


applyFailedShard

public RoutingAllocation.Result applyFailedShard(ClusterState clusterState,
                                                 ShardRouting failedShard)
Applies the failed shards. Note, shards can be called several times within this method.

If the same instance of the routing table is returned, then no change has been made.


reroute

public RoutingAllocation.Result reroute(ClusterState clusterState)
Reroutes the routing table based on the live nodes.

If the same instance of the routing table is returned, then no change has been made.


rerouteWithNoReassign

public RoutingAllocation.Result rerouteWithNoReassign(ClusterState clusterState)
Only handles reroute but *without* any reassignment of unassigned shards or rebalancing. Does make sure to handle removed nodes, but only moved the shards to UNASSIGNED, does not reassign them.



Copyright © 2009-2012. All Rights Reserved.