Class RecoverySourceHandler
- java.lang.Object
-
- org.elasticsearch.indices.recovery.RecoverySourceHandler
-
public class RecoverySourceHandler extends java.lang.ObjectRecoverySourceHandler handles the three phases of shard recovery, which is everything relating to copying the segment files as well as sending translog operations across the wire once the segments have been copied. Note: There is always one source handler per recovery that handles all the file and translog transfer. This handler is completely isolated from other recoveries while theRateLimiterpassed viaRecoverySettingsis shared across recoveries originating from this nodes to throttle the number bytes send during file transfer. The transaction log phase bypasses the rate limiter entirely.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.logging.log4j.Loggerlogger
-
Constructor Summary
Constructors Constructor Description RecoverySourceHandler(IndexShard shard, RecoveryTargetHandler recoveryTarget, StartRecoveryRequest request, int fileChunkSizeInBytes, int maxConcurrentFileChunks)
-
Method Summary
Modifier and Type Method Description voidcancel(java.lang.String reason)Cancels the recovery and interrupts all eligible threads.protected voidfailEngine(java.io.IOException cause)StartRecoveryRequestgetRequest()voidrecoverToTarget(ActionListener<RecoveryResponse> listener)performs the recovery from the local engine to the targetjava.lang.StringtoString()
-
-
-
Constructor Detail
-
RecoverySourceHandler
public RecoverySourceHandler(IndexShard shard, RecoveryTargetHandler recoveryTarget, StartRecoveryRequest request, int fileChunkSizeInBytes, int maxConcurrentFileChunks)
-
-
Method Detail
-
getRequest
public StartRecoveryRequest getRequest()
-
recoverToTarget
public void recoverToTarget(ActionListener<RecoveryResponse> listener)
performs the recovery from the local engine to the target
-
cancel
public void cancel(java.lang.String reason)
Cancels the recovery and interrupts all eligible threads.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
failEngine
protected void failEngine(java.io.IOException cause)
-
-