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, toString
public SharedFSRecoverySourceHandler(IndexShard shard, StartRecoveryRequest request, RecoverySettings recoverySettings, TransportService transportService, ClusterService clusterService, IndicesService indicesService, MappingUpdatedAction mappingUpdatedAction, ESLogger logger)
public void phase1(SnapshotIndexCommit snapshot) throws ElasticsearchException
RecoverySourceHandler
SnapshotIndexCommit
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.RecoveryHandler
phase1
in class RecoverySourceHandler
ElasticsearchException
public void phase2(Translog.Snapshot snapshot) throws ElasticsearchException
RecoverySourceHandler
InternalEngine#recover
is responsible for taking the snapshot
of the translog and releasing it once all 3 phases of recovery are completephase2
in interface Engine.RecoveryHandler
phase2
in class RecoverySourceHandler
ElasticsearchException
public void phase3(Translog.Snapshot snapshot) throws ElasticsearchException
RecoverySourceHandler
InternalEngine#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.RecoveryHandler
phase3
in class RecoverySourceHandler
ElasticsearchException
protected int sendSnapshot(Translog.Snapshot snapshot) throws ElasticsearchException
RecoverySourceHandler
sendSnapshot
in class RecoverySourceHandler
ElasticsearchException
public void onRecoveryFailure(Throwable t)
Copyright © 2009–2015. All rights reserved.