Class StartRecoveryRequest

All Implemented Interfaces:
Writeable, RefCounted, TaskAwareRequest

public class StartRecoveryRequest extends TransportRequest
Represents a request for starting a peer recovery.
  • Constructor Details

    • StartRecoveryRequest

      public StartRecoveryRequest(StreamInput in) throws IOException
      Throws:
      IOException
    • StartRecoveryRequest

      public StartRecoveryRequest(ShardId shardId, String targetAllocationId, DiscoveryNode sourceNode, DiscoveryNode targetNode, long clusterStateVersion, Store.MetadataSnapshot metadataSnapshot, boolean primaryRelocation, long recoveryId, long startingSeqNo, boolean canDownloadSnapshotFiles)
      Construct a request for starting a peer recovery.
      Parameters:
      shardId - the shard ID to recover
      targetAllocationId - the allocation id of the target shard
      sourceNode - the source node to remover from
      targetNode - the target node to recover to
      clusterStateVersion - the cluster state version which initiated the recovery
      metadataSnapshot - the Lucene metadata
      primaryRelocation - whether or not the recovery is a primary relocation
      recoveryId - the recovery ID
      startingSeqNo - the starting sequence number
      canDownloadSnapshotFiles - flag that indicates if the snapshot files can be downloaded
  • Method Details

    • recoveryId

      public long recoveryId()
    • shardId

      public ShardId shardId()
    • targetAllocationId

      public String targetAllocationId()
    • sourceNode

      public DiscoveryNode sourceNode()
    • targetNode

      public DiscoveryNode targetNode()
    • clusterStateVersion

      public long clusterStateVersion()
    • isPrimaryRelocation

      public boolean isPrimaryRelocation()
    • metadataSnapshot

      public Store.MetadataSnapshot metadataSnapshot()
    • startingSeqNo

      public long startingSeqNo()
    • canDownloadSnapshotFiles

      public boolean canDownloadSnapshotFiles()
    • getDescription

      public String getDescription()
      Description copied from interface: TaskAwareRequest
      Returns optional description of the request to be displayed by the task manager
    • writeTo

      public void writeTo(StreamOutput out) throws IOException
      Description copied from interface: Writeable
      Write this into the StreamOutput.
      Specified by:
      writeTo in interface Writeable
      Overrides:
      writeTo in class TransportRequest
      Throws:
      IOException