Class OpenSearchAllocationWithConstraintsTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.opensearch.test.OpenSearchTestCase
org.opensearch.cluster.OpenSearchAllocationTestCase
org.opensearch.cluster.OpenSearchAllocationWithConstraintsTestCase

public abstract class OpenSearchAllocationWithConstraintsTestCase
extends OpenSearchAllocationTestCase
  • Field Details

  • Constructor Details

  • Method Details

    • clearState

      public void clearState()
    • shardIdentifierFromRouting

      public static java.lang.String shardIdentifierFromRouting​(org.opensearch.cluster.routing.ShardRouting shardRouting)
    • buildAllocationService

      public void buildAllocationService()
    • buildAllocationService

      public void buildAllocationService​(java.lang.String excludeNodes)
    • buildZoneAwareAllocationService

      public void buildZoneAwareAllocationService()
    • buildAllocationService

      public void buildAllocationService​(org.opensearch.common.settings.Settings.Builder sb)
    • buildMetadata

      public org.opensearch.cluster.metadata.Metadata buildMetadata​(org.opensearch.cluster.metadata.Metadata.Builder mb, java.lang.String indexPrefix, int numberOfIndices, int numberOfShards, int numberOfReplicas)
    • buildRoutingTable

      public org.opensearch.cluster.routing.RoutingTable buildRoutingTable​(org.opensearch.cluster.routing.RoutingTable.Builder rb, org.opensearch.cluster.metadata.Metadata metadata, java.lang.String indexPrefix, int numberOfIndices)
    • addNodes

      public org.opensearch.cluster.node.DiscoveryNodes addNodes​(org.opensearch.cluster.node.DiscoveryNodes.Builder nb, java.lang.String nodePrefix, int nodesAdded)
    • resetCluster

      public void resetCluster()
    • updateInitialCluster

      public void updateInitialCluster()
    • createEmptyZoneAwareCluster

      public void createEmptyZoneAwareCluster​(java.util.Map<java.lang.String,​java.lang.Integer> nodesPerZone)
    • setupInitialCluster

      public void setupInitialCluster​(int nodeCount, int indices, int shards, int replicas)
    • buildNodeShardsByIndex

      public void buildNodeShardsByIndex()
    • isIndexHotSpotPresent

      public boolean isIndexHotSpotPresent​(int nodes, java.util.List<java.lang.String> nodeList)
    • getNodeList

      public java.util.List<java.lang.String> getNodeList​(java.lang.String... nodesToValidate)
    • assertForIndexShardHotSpots

      public void assertForIndexShardHotSpots​(boolean expected, int nodes, java.lang.String... nodesToValidate)
    • allocateAndCheckIndexShardHotSpots

      public int allocateAndCheckIndexShardHotSpots​(boolean expected, int nodes, java.lang.String... nodesToValidate)
    • allocateShardsAndBalance

      public org.opensearch.cluster.ClusterState allocateShardsAndBalance​(org.opensearch.cluster.ClusterState clusterState)
    • addNodesWithoutIndexing

      public void addNodesWithoutIndexing​(int nodeCount, java.lang.String node_prefix)
    • terminateNodes

      public void terminateNodes​(java.lang.String... nodesToTerminate)
    • addNodesWithIndexing

      public void addNodesWithIndexing​(int nodeCount, java.lang.String node_prefix, int indices, int shards, int replicas)
    • addIndices

      public void addIndices​(java.lang.String index_prefix, int indices, int shards, int replicas)