Class ESAllocationTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.cluster.ESAllocationTestCase

public abstract class ESAllocationTestCase extends ESTestCase
  • Field Details

    • SNAPSHOT_INFO_SERVICE_WITH_NO_SHARD_SIZES

      public static final org.elasticsearch.snapshots.SnapshotsInfoService SNAPSHOT_INFO_SERVICE_WITH_NO_SHARD_SIZES
    • MASTER_DATA_ROLES

      protected static Set<org.elasticsearch.cluster.node.DiscoveryNodeRole> MASTER_DATA_ROLES
  • Constructor Details

    • ESAllocationTestCase

      public ESAllocationTestCase()
  • Method Details

    • createAllocationService

      public static ESAllocationTestCase.MockAllocationService createAllocationService()
    • createAllocationService

      public static ESAllocationTestCase.MockAllocationService createAllocationService(org.elasticsearch.common.settings.Settings settings)
    • createAllocationService

      public static ESAllocationTestCase.MockAllocationService createAllocationService(org.elasticsearch.common.settings.Settings settings, Random random)
    • createAllocationService

      public static ESAllocationTestCase.MockAllocationService createAllocationService(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.common.settings.ClusterSettings clusterSettings, Random random)
    • createAllocationService

      public static ESAllocationTestCase.MockAllocationService createAllocationService(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.cluster.ClusterInfoService clusterInfoService)
    • createAllocationService

      public static ESAllocationTestCase.MockAllocationService createAllocationService(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.gateway.GatewayAllocator gatewayAllocator)
    • createAllocationService

      public static ESAllocationTestCase.MockAllocationService createAllocationService(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.snapshots.SnapshotsInfoService snapshotsInfoService)
    • createAllocationService

      public static ESAllocationTestCase.MockAllocationService createAllocationService(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.gateway.GatewayAllocator gatewayAllocator, org.elasticsearch.snapshots.SnapshotsInfoService snapshotsInfoService)
    • randomAllocationDeciders

      public static org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders randomAllocationDeciders(org.elasticsearch.common.settings.Settings settings, org.elasticsearch.common.settings.ClusterSettings clusterSettings, Random random)
    • newNode

      protected static org.elasticsearch.cluster.node.DiscoveryNode newNode(String nodeId)
    • newNode

      protected static org.elasticsearch.cluster.node.DiscoveryNode newNode(String nodeName, String nodeId, Map<String,String> attributes)
    • newNode

      protected static org.elasticsearch.cluster.node.DiscoveryNode newNode(String nodeId, Map<String,String> attributes)
    • newNode

      protected static org.elasticsearch.cluster.node.DiscoveryNode newNode(String nodeId, Set<org.elasticsearch.cluster.node.DiscoveryNodeRole> roles)
    • newNode

      protected static org.elasticsearch.cluster.node.DiscoveryNode newNode(String nodeName, String nodeId, Set<org.elasticsearch.cluster.node.DiscoveryNodeRole> roles)
    • newNode

      protected static org.elasticsearch.cluster.node.DiscoveryNode newNode(String nodeId, org.elasticsearch.Version version)
    • startRandomInitializingShard

      protected static org.elasticsearch.cluster.ClusterState startRandomInitializingShard(org.elasticsearch.cluster.ClusterState clusterState, org.elasticsearch.cluster.routing.allocation.AllocationService strategy)
    • yesAllocationDeciders

      protected static org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders yesAllocationDeciders()
    • noAllocationDeciders

      protected static org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders noAllocationDeciders()
    • throttleAllocationDeciders

      protected static org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders throttleAllocationDeciders()
    • applyStartedShardsUntilNoChange

      protected org.elasticsearch.cluster.ClusterState applyStartedShardsUntilNoChange(org.elasticsearch.cluster.ClusterState clusterState, org.elasticsearch.cluster.routing.allocation.AllocationService service)
    • startInitializingShardsAndReroute

      public static org.elasticsearch.cluster.ClusterState startInitializingShardsAndReroute(org.elasticsearch.cluster.routing.allocation.AllocationService allocationService, org.elasticsearch.cluster.ClusterState state)
      Mark all initializing shards as started, then perform a reroute (which may start some other shards initializing).
      Returns:
      the cluster state after completing the reroute.
    • startInitializingShardsAndReroute

      public static org.elasticsearch.cluster.ClusterState startInitializingShardsAndReroute(org.elasticsearch.cluster.routing.allocation.AllocationService allocationService, org.elasticsearch.cluster.ClusterState clusterState, org.elasticsearch.cluster.routing.RoutingNode routingNode)
      Mark all initializing shards on the given node as started, then perform a reroute (which may start some other shards initializing).
      Returns:
      the cluster state after completing the reroute.
    • startInitializingShardsAndReroute

      public static org.elasticsearch.cluster.ClusterState startInitializingShardsAndReroute(org.elasticsearch.cluster.routing.allocation.AllocationService allocationService, org.elasticsearch.cluster.ClusterState clusterState, String index)
      Mark all initializing shards for the given index as started, then perform a reroute (which may start some other shards initializing).
      Returns:
      the cluster state after completing the reroute.
    • startShardsAndReroute

      public static org.elasticsearch.cluster.ClusterState startShardsAndReroute(org.elasticsearch.cluster.routing.allocation.AllocationService allocationService, org.elasticsearch.cluster.ClusterState clusterState, org.elasticsearch.cluster.routing.ShardRouting... initializingShards)
      Mark the given shards as started, then perform a reroute (which may start some other shards initializing).
      Returns:
      the cluster state after completing the reroute.
    • startShardsAndReroute

      public static org.elasticsearch.cluster.ClusterState startShardsAndReroute(org.elasticsearch.cluster.routing.allocation.AllocationService allocationService, org.elasticsearch.cluster.ClusterState clusterState, List<org.elasticsearch.cluster.routing.ShardRouting> initializingShards)
      Mark the given shards as started, then perform a reroute (which may start some other shards initializing).
      Returns:
      the cluster state after completing the reroute.