Class OpenSearchAllocationTestCase.DelayedShardsMockGatewayAllocator

java.lang.Object
org.opensearch.gateway.GatewayAllocator
org.opensearch.cluster.OpenSearchAllocationTestCase.DelayedShardsMockGatewayAllocator
All Implemented Interfaces:
org.opensearch.cluster.routing.allocation.ExistingShardsAllocator
Enclosing class:
OpenSearchAllocationTestCase

protected static class OpenSearchAllocationTestCase.DelayedShardsMockGatewayAllocator extends org.opensearch.gateway.GatewayAllocator
Mocks behavior in ReplicaShardAllocator to remove delayed shards from list of unassigned shards so they don't get reassigned yet.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.opensearch.cluster.routing.allocation.ExistingShardsAllocator

    org.opensearch.cluster.routing.allocation.ExistingShardsAllocator.UnassignedAllocationHandler
  • Field Summary

    Fields inherited from class org.opensearch.gateway.GatewayAllocator

    ALLOCATOR_NAME

    Fields inherited from interface org.opensearch.cluster.routing.allocation.ExistingShardsAllocator

    EXISTING_SHARDS_ALLOCATOR_BATCH_MODE, EXISTING_SHARDS_ALLOCATOR_SETTING
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    afterPrimariesBeforeReplicas(org.opensearch.cluster.routing.allocation.RoutingAllocation allocation)
     
    void
    allocateUnassigned(org.opensearch.cluster.routing.ShardRouting shardRouting, org.opensearch.cluster.routing.allocation.RoutingAllocation allocation, org.opensearch.cluster.routing.allocation.ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler)
     
    void
    applyFailedShards(List<org.opensearch.cluster.routing.allocation.FailedShard> failedShards, org.opensearch.cluster.routing.allocation.RoutingAllocation allocation)
     
    void
    applyStartedShards(List<org.opensearch.cluster.routing.ShardRouting> startedShards, org.opensearch.cluster.routing.allocation.RoutingAllocation allocation)
     
    void
    beforeAllocation(org.opensearch.cluster.routing.allocation.RoutingAllocation allocation)
     

    Methods inherited from class org.opensearch.gateway.GatewayAllocator

    cleanCaches, explainUnassignedShardAllocation, getNumberOfInFlightFetches, innerAllocatedUnassigned

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.opensearch.cluster.routing.allocation.ExistingShardsAllocator

    allocateAllUnassignedShards
  • Constructor Details

    • DelayedShardsMockGatewayAllocator

      public DelayedShardsMockGatewayAllocator()
  • Method Details

    • applyStartedShards

      public void applyStartedShards(List<org.opensearch.cluster.routing.ShardRouting> startedShards, org.opensearch.cluster.routing.allocation.RoutingAllocation allocation)
      Specified by:
      applyStartedShards in interface org.opensearch.cluster.routing.allocation.ExistingShardsAllocator
      Overrides:
      applyStartedShards in class org.opensearch.gateway.GatewayAllocator
    • applyFailedShards

      public void applyFailedShards(List<org.opensearch.cluster.routing.allocation.FailedShard> failedShards, org.opensearch.cluster.routing.allocation.RoutingAllocation allocation)
      Specified by:
      applyFailedShards in interface org.opensearch.cluster.routing.allocation.ExistingShardsAllocator
      Overrides:
      applyFailedShards in class org.opensearch.gateway.GatewayAllocator
    • beforeAllocation

      public void beforeAllocation(org.opensearch.cluster.routing.allocation.RoutingAllocation allocation)
      Specified by:
      beforeAllocation in interface org.opensearch.cluster.routing.allocation.ExistingShardsAllocator
      Overrides:
      beforeAllocation in class org.opensearch.gateway.GatewayAllocator
    • afterPrimariesBeforeReplicas

      public void afterPrimariesBeforeReplicas(org.opensearch.cluster.routing.allocation.RoutingAllocation allocation)
      Specified by:
      afterPrimariesBeforeReplicas in interface org.opensearch.cluster.routing.allocation.ExistingShardsAllocator
      Overrides:
      afterPrimariesBeforeReplicas in class org.opensearch.gateway.GatewayAllocator
    • allocateUnassigned

      public void allocateUnassigned(org.opensearch.cluster.routing.ShardRouting shardRouting, org.opensearch.cluster.routing.allocation.RoutingAllocation allocation, org.opensearch.cluster.routing.allocation.ExistingShardsAllocator.UnassignedAllocationHandler unassignedAllocationHandler)
      Specified by:
      allocateUnassigned in interface org.opensearch.cluster.routing.allocation.ExistingShardsAllocator
      Overrides:
      allocateUnassigned in class org.opensearch.gateway.GatewayAllocator