Class ESIndexLevelReplicationTestCase.ReplicationGroup

  • All Implemented Interfaces:
    java.lang.AutoCloseable, java.lang.Iterable<IndexShard>
    Enclosing class:
    ESIndexLevelReplicationTestCase

    protected class ESIndexLevelReplicationTestCase.ReplicationGroup
    extends java.lang.Object
    implements java.lang.AutoCloseable, java.lang.Iterable<IndexShard>
    • Method Detail

      • indexDocs

        public int indexDocs​(int numOfDoc)
                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • appendDocs

        public int appendDocs​(int numOfDoc)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • startAll

        public void startAll()
                      throws java.io.IOException
        Throws:
        java.io.IOException
      • startReplicas

        public int startReplicas​(int numOfReplicasToStart)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • startPrimary

        public void startPrimary()
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • addReplica

        public IndexShard addReplica()
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • addReplica

        public void addReplica​(IndexShard replica)
                        throws java.io.IOException
        Throws:
        java.io.IOException
      • addReplicaWithExistingPath

        public IndexShard addReplicaWithExistingPath​(ShardPath shardPath,
                                                     java.lang.String nodeId)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getReplicas

        public java.util.List<IndexShard> getReplicas()
      • promoteReplicaToPrimary

        public java.util.concurrent.Future<PrimaryReplicaSyncer.ResyncTask> promoteReplicaToPrimary​(IndexShard replica)
                                                                                             throws java.io.IOException
        promotes the specific replica as the new primary
        Throws:
        java.io.IOException
      • removeReplica

        public boolean removeReplica​(IndexShard replica)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • recoverReplica

        public void recoverReplica​(IndexShard replica)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • recoverReplica

        public void recoverReplica​(IndexShard replica,
                                   java.util.function.BiFunction<IndexShard,DiscoveryNode,RecoveryTarget> targetSupplier,
                                   boolean markAsRecovering)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • asyncRecoverReplica

        public java.util.concurrent.Future<java.lang.Void> asyncRecoverReplica​(IndexShard replica,
                                                                               java.util.function.BiFunction<IndexShard,DiscoveryNode,RecoveryTarget> targetSupplier)
                                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • assertAllEqual

        public void assertAllEqual​(int expectedCount)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • refresh

        public void refresh​(java.lang.String source)
      • flush

        public void flush()
      • shardRoutings

        public java.util.List<ShardRouting> shardRoutings()
      • close

        public void close()
                   throws java.lang.Exception
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.lang.Exception
      • iterator

        public java.util.Iterator<IndexShard> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<IndexShard>
      • syncGlobalCheckpoint

        public void syncGlobalCheckpoint()