public class SharedFSRecoverySourceHandler extends RecoverySourceHandler
logger| Constructor and Description |
|---|
SharedFSRecoverySourceHandler(IndexShard shard,
StartRecoveryRequest request,
RecoverySettings recoverySettings,
TransportService transportService,
ClusterService clusterService,
IndicesService indicesService,
MappingUpdatedAction mappingUpdatedAction,
ESLogger logger) |
| Modifier and Type | Method and Description |
|---|---|
void |
onRecoveryFailure(Throwable t) |
void |
phase1(SnapshotIndexCommit snapshot)
Perform phase1 of the recovery operations.
|
void |
phase2(Translog.Snapshot snapshot)
Perform phase2 of the recovery process
Phase2 takes a snapshot of the current translog *without* acquiring the
write lock (however, the translog snapshot is a point-in-time view of
the translog).
|
void |
phase3(Translog.Snapshot snapshot)
Perform phase 3 of the recovery process
Phase3 again takes a snapshot of the translog, however this time the
snapshot is acquired under a write lock.
|
protected int |
sendSnapshot(Translog.Snapshot snapshot)
Send the given snapshot's operations to this handler's target node.
|
cancel, getResponse, toStringpublic SharedFSRecoverySourceHandler(IndexShard shard, StartRecoveryRequest request, RecoverySettings recoverySettings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, MappingUpdatedAction mappingUpdatedAction, ESLogger logger)
public void phase1(SnapshotIndexCommit snapshot) throws ElasticsearchException
RecoverySourceHandlerSnapshotIndexCommit
snapshot has been performed no commit operations (files being fsync'd)
are effectively allowed on this index until all recovery phases are done
Phase1 examines the segment files on the target node and copies over the
segments that are missing. Only segments that have the same size and
checksum can be reused
InternalEngine#recover is responsible for snapshotting the index
and releasing the snapshot once all 3 phases of recovery are completephase1 in interface Engine.RecoveryHandlerphase1 in class RecoverySourceHandlerElasticsearchExceptionpublic void phase2(Translog.Snapshot snapshot) throws ElasticsearchException
RecoverySourceHandlerInternalEngine#recover is responsible for taking the snapshot
of the translog and releasing it once all 3 phases of recovery are completephase2 in interface Engine.RecoveryHandlerphase2 in class RecoverySourceHandlerElasticsearchExceptionpublic void phase3(Translog.Snapshot snapshot) throws ElasticsearchException
RecoverySourceHandlerInternalEngine#recover is responsible for taking the snapshot
of the translog, and after phase 3 completes the snapshots from all
three phases are released.phase3 in interface Engine.RecoveryHandlerphase3 in class RecoverySourceHandlerElasticsearchExceptionprotected int sendSnapshot(Translog.Snapshot snapshot) throws ElasticsearchException
RecoverySourceHandlersendSnapshot in class RecoverySourceHandlerElasticsearchExceptionpublic void onRecoveryFailure(Throwable t)
Copyright © 2009–2016. All rights reserved.