Class ESIndexLevelReplicationTestCase.ReplicationGroup
java.lang.Object
org.elasticsearch.index.replication.ESIndexLevelReplicationTestCase.ReplicationGroup
- All Implemented Interfaces:
AutoCloseable,Iterable<IndexShard>
- Enclosing class:
ESIndexLevelReplicationTestCase
protected class ESIndexLevelReplicationTestCase.ReplicationGroup
extends Object
implements AutoCloseable, Iterable<IndexShard>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddReplica(IndexShard replica) addReplicaWithExistingPath(ShardPath shardPath, String nodeId) addRetentionLease(String id, long retainingSequenceNumber, String source, ActionListener<ReplicationResponse> listener) intappendDocs(int numOfDoc) voidassertAllEqual(int expectedCount) asyncRecoverReplica(IndexShard replica, BiFunction<IndexShard, DiscoveryNode, RecoveryTarget> targetSupplier) voidclose()delete(DeleteRequest deleteRequest) voidexecuteRetentionLeasesSyncRequestOnReplica(RetentionLeaseSyncAction.Request request, IndexShard replica) voidflush()protected EngineFactorygetEngineFactory(ShardRouting routing) index(IndexRequest indexRequest) intindexDocs(int numOfDoc) iterator()promoteReplicaToPrimary(IndexShard replica) promotes the specific replica as the new primaryvoidpromoteReplicaToPrimary(IndexShard replica, BiConsumer<IndexShard, ActionListener<PrimaryReplicaSyncer.ResyncTask>> primaryReplicaSyncerArg) protected voidrecoverPrimary(IndexShard primaryShard) voidrecoverReplica(IndexShard replica) voidrecoverReplica(IndexShard replica, BiFunction<IndexShard, DiscoveryNode, RecoveryTarget> targetSupplier) voidrecoverReplica(IndexShard replica, BiFunction<IndexShard, DiscoveryNode, RecoveryTarget> targetSupplier, boolean markAsRecovering) voidvoidbooleanremoveReplica(IndexShard replica) voidremoveRetentionLease(String id, ActionListener<ReplicationResponse> listener) renewRetentionLease(String id, long retainingSequenceNumber, String source) voidstartAll()voidintstartReplicas(int numOfReplicasToStart) voidprotected voidsyncRetentionLeases(ShardId id, RetentionLeases leases, ActionListener<ReplicationResponse> listener) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
ReplicationGroup
- Throws:
IOException
-
-
Method Details
-
getEngineFactory
-
indexDocs
- Throws:
Exception
-
appendDocs
- Throws:
Exception
-
index
- Throws:
Exception
-
delete
- Throws:
Exception
-
startAll
- Throws:
IOException
-
startReplicas
- Throws:
IOException
-
startPrimary
- Throws:
IOException
-
addReplica
- Throws:
IOException
-
addReplica
- Throws:
IOException
-
recoverPrimary
-
addReplicaWithExistingPath
- Throws:
IOException
-
getReplicas
-
promoteReplicaToPrimary
public Future<PrimaryReplicaSyncer.ResyncTask> promoteReplicaToPrimary(IndexShard replica) throws IOException promotes the specific replica as the new primary- Throws:
IOException
-
promoteReplicaToPrimary
public void promoteReplicaToPrimary(IndexShard replica, BiConsumer<IndexShard, ActionListener<PrimaryReplicaSyncer.ResyncTask>> primaryReplicaSyncerArg) throws IOException- Throws:
IOException
-
removeReplica
- Throws:
IOException
-
recoverReplica
- Throws:
IOException
-
recoverReplica
public void recoverReplica(IndexShard replica, BiFunction<IndexShard, DiscoveryNode, throws IOExceptionRecoveryTarget> targetSupplier) - Throws:
IOException
-
recoverReplica
public void recoverReplica(IndexShard replica, BiFunction<IndexShard, DiscoveryNode, throws IOExceptionRecoveryTarget> targetSupplier, boolean markAsRecovering) - Throws:
IOException
-
getPrimaryNode
-
asyncRecoverReplica
public Future<Void> asyncRecoverReplica(IndexShard replica, BiFunction<IndexShard, DiscoveryNode, RecoveryTarget> targetSupplier) -
assertAllEqual
- Throws:
IOException
-
refresh
-
flush
public void flush() -
shardRoutings
-
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
iterator
- Specified by:
iteratorin interfaceIterable<IndexShard>
-
getPrimary
-
reinitPrimaryShard
- Throws:
IOException
-
syncGlobalCheckpoint
public void syncGlobalCheckpoint() -
syncRetentionLeases
protected void syncRetentionLeases(ShardId id, RetentionLeases leases, ActionListener<ReplicationResponse> listener) -
addRetentionLease
public RetentionLease addRetentionLease(String id, long retainingSequenceNumber, String source, ActionListener<ReplicationResponse> listener) -
renewRetentionLease
-
removeRetentionLease
-
executeRetentionLeasesSyncRequestOnReplica
public void executeRetentionLeasesSyncRequestOnReplica(RetentionLeaseSyncAction.Request request, IndexShard replica)
-