Class RemoteStoreBaseIntegTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.opensearch.test.OpenSearchTestCase
org.opensearch.test.OpenSearchIntegTestCase
org.opensearch.remotestore.RemoteStoreBaseIntegTestCase
Direct Known Subclasses:
RemoteStoreCoreTestCase

public class RemoteStoreBaseIntegTestCase extends OpenSearchIntegTestCase
  • Field Details

    • REPOSITORY_NAME

      protected static final String REPOSITORY_NAME
      See Also:
    • REPOSITORY_2_NAME

      protected static final String REPOSITORY_2_NAME
      See Also:
    • REPOSITORY_3_NAME

      protected static final String REPOSITORY_3_NAME
      See Also:
    • REMOTE_ROUTING_TABLE_REPO

      protected static final String REMOTE_ROUTING_TABLE_REPO
      See Also:
    • SHARD_COUNT

      protected static final int SHARD_COUNT
      See Also:
    • REPLICA_COUNT

      protected static int REPLICA_COUNT
    • TOTAL_OPERATIONS

      protected static final String TOTAL_OPERATIONS
      See Also:
    • REFRESHED_OR_FLUSHED_OPERATIONS

      protected static final String REFRESHED_OR_FLUSHED_OPERATIONS
      See Also:
    • MAX_SEQ_NO_TOTAL

      protected static final String MAX_SEQ_NO_TOTAL
      See Also:
    • MAX_SEQ_NO_REFRESHED_OR_FLUSHED

      protected static final String MAX_SEQ_NO_REFRESHED_OR_FLUSHED
      See Also:
    • segmentRepoPath

      protected Path segmentRepoPath
    • translogRepoPath

      protected Path translogRepoPath
    • clusterSettingsSuppliedByTest

      protected boolean clusterSettingsSuppliedByTest
    • asyncUploadMockFsRepo

      protected boolean asyncUploadMockFsRepo
  • Constructor Details

    • RemoteStoreBaseIntegTestCase

      public RemoteStoreBaseIntegTestCase()
  • Method Details

    • indexData

      protected Map<String,Long> indexData(int numberOfIterations, boolean invokeFlush, String index)
    • indexData

      protected Map<String,Long> indexData(int numberOfIterations, boolean invokeFlush, boolean emptyTranslog, String index)
    • nodePlugins

      protected Collection<Class<? extends org.opensearch.plugins.Plugin>> nodePlugins()
      Description copied from class: OpenSearchIntegTestCase
      Returns a collection of plugins that should be loaded on each node.
      Overrides:
      nodePlugins in class OpenSearchIntegTestCase
    • nodeSettings

      protected org.opensearch.common.settings.Settings nodeSettings(int nodeOrdinal)
      Description copied from class: OpenSearchIntegTestCase
      This method is used to obtain settings for the Nth node in the cluster. Nodes in this cluster are associated with an ordinal number such that nodes can be started with specific configurations. This method might be called multiple times with the same ordinal and is expected to return the same value for each invocation. In other words subclasses must ensure this method is idempotent.
      Overrides:
      nodeSettings in class OpenSearchIntegTestCase
    • remoteStoreRepoSettings

      protected org.opensearch.common.settings.Settings remoteStoreRepoSettings()
    • setFailRate

      protected void setFailRate(String repoName, int value) throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • indexSettings

      public org.opensearch.common.settings.Settings indexSettings()
      Description copied from class: OpenSearchIntegTestCase
      Returns a settings object used in OpenSearchIntegTestCase.createIndex(String...) and OpenSearchIntegTestCase.prepareCreate(String) and friends. This method can be overwritten by subclasses to set defaults for the indices that are created by the test. By default it returns a settings object that sets a random number of shards. Number of shards and replicas can be controlled through specific methods.
      Overrides:
      indexSettings in class OpenSearchIntegTestCase
    • indexSingleDoc

      protected org.opensearch.action.index.IndexResponse indexSingleDoc(String indexName)
    • indexSingleDoc

      protected org.opensearch.action.index.IndexResponse indexSingleDoc(String indexName, boolean forceRefresh)
    • indexBulk

      protected org.opensearch.action.bulk.BulkResponse indexBulk(String indexName, int numDocs)
    • remoteStoreIndexSettings

      protected org.opensearch.common.settings.Settings remoteStoreIndexSettings(int numberOfReplicas, int numberOfShards)
    • remoteStoreIndexSettings

      protected org.opensearch.common.settings.Settings remoteStoreIndexSettings(int numberOfReplicas)
    • remoteStoreIndexSettings

      protected org.opensearch.common.settings.Settings remoteStoreIndexSettings(int numberOfReplicas, long totalFieldLimit, int refresh)
    • teardown

      public void teardown()
    • buildRepositoryMetadata

      public org.opensearch.cluster.metadata.RepositoryMetadata buildRepositoryMetadata(org.opensearch.cluster.node.DiscoveryNode node, String name)
    • assertRemoteStoreRepositoryOnAllNodes

      public void assertRemoteStoreRepositoryOnAllNodes(String repositoryName)
    • getFileCount

      public static int getFileCount(Path path) throws IOException
      Throws:
      IOException
    • getIndexShard

      protected org.opensearch.index.shard.IndexShard getIndexShard(String dataNode, String indexName) throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • getIndexShardFromShardId

      protected org.opensearch.index.shard.IndexShard getIndexShardFromShardId(String dataNode, String indexName, Integer shardId) throws ExecutionException, InterruptedException
      Throws:
      ExecutionException
      InterruptedException
    • restore

      protected void restore(boolean restoreAllShards, String... indices)
    • prepareCluster

      protected void prepareCluster(int numClusterManagerNodes, int numDataOnlyNodes, String indices, int replicaCount, int shardCount)
    • prepareCluster

      protected void prepareCluster(int numClusterManagerNodes, int numDataOnlyNodes, String indices, int replicaCount, int shardCount, org.opensearch.common.settings.Settings settings)
    • prepareCluster

      protected void prepareCluster(int numClusterManagerNodes, int numDataOnlyNodes, org.opensearch.common.settings.Settings settings)