Class ESIndexLevelReplicationTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.util.LuceneTestCase
org.elasticsearch.test.ESTestCase
org.elasticsearch.index.shard.IndexShardTestCase
org.elasticsearch.index.replication.ESIndexLevelReplicationTestCase

public abstract class ESIndexLevelReplicationTestCase
extends IndexShardTestCase
  • Field Details

    • index

      protected final org.elasticsearch.index.Index index
    • indexMapping

      protected final java.util.Map<java.lang.String,​java.lang.String> indexMapping
  • Constructor Details

    • ESIndexLevelReplicationTestCase

      public ESIndexLevelReplicationTestCase()
  • Method Details

    • createGroup

      protected ESIndexLevelReplicationTestCase.ReplicationGroup createGroup​(int replicas) throws java.io.IOException
      Throws:
      java.io.IOException
    • createGroup

      protected ESIndexLevelReplicationTestCase.ReplicationGroup createGroup​(int replicas, org.elasticsearch.common.settings.Settings settings) throws java.io.IOException
      Throws:
      java.io.IOException
    • buildIndexMetadata

      protected org.elasticsearch.cluster.metadata.IndexMetadata buildIndexMetadata​(int replicas) throws java.io.IOException
      Throws:
      java.io.IOException
    • buildIndexMetadata

      protected org.elasticsearch.cluster.metadata.IndexMetadata buildIndexMetadata​(int replicas, java.util.Map<java.lang.String,​java.lang.String> mappings) throws java.io.IOException
      Throws:
      java.io.IOException
    • buildIndexMetadata

      protected org.elasticsearch.cluster.metadata.IndexMetadata buildIndexMetadata​(int replicas, org.elasticsearch.common.settings.Settings indexSettings, java.util.Map<java.lang.String,​java.lang.String> mappings) throws java.io.IOException
      Throws:
      java.io.IOException
    • getDiscoveryNode

      protected org.elasticsearch.cluster.node.DiscoveryNode getDiscoveryNode​(java.lang.String id)
    • indexOnPrimary

      public org.elasticsearch.action.bulk.BulkShardRequest indexOnPrimary​(org.elasticsearch.action.index.IndexRequest request, org.elasticsearch.index.shard.IndexShard primary) throws java.lang.Exception
      indexes the given requests on the supplied primary, modifying it for replicas
      Throws:
      java.lang.Exception
    • indexOnReplica

      public void indexOnReplica​(org.elasticsearch.action.bulk.BulkShardRequest request, ESIndexLevelReplicationTestCase.ReplicationGroup group, org.elasticsearch.index.shard.IndexShard replica) throws java.lang.Exception
      indexes the given requests on the supplied replica shard
      Throws:
      java.lang.Exception