CheckpointCommand (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.server.protocol, class: CheckpointCommand

Package org.apache.hadoop.hdfs.server.protocol

# Class CheckpointCommand

java.lang.Object
org.apache.hadoop.hdfs.server.protocol.ServerCommand
org.apache.hadoop.hdfs.server.protocol.NamenodeCommand
org.apache.hadoop.hdfs.server.protocol.CheckpointCommand

@Private @Evolving public class CheckpointCommand extends NamenodeCommand
Checkpoint command.

Returned to the backup node by the name-node as a reply to the `NamenodeProtocol.startCheckpoint(NamenodeRegistration)` request.
Contains:

- `CheckpointSignature` identifying the particular checkpoint
- indicator whether the backup image should be discarded before starting the checkpoint
- indicator whether the image should be transfered back to the name-node upon completion of the checkpoint.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `CheckpointCommand()`
  `CheckpointCommand(CheckpointSignature sig, boolean needToReturnImg)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CheckpointSignature`
  `getSignature()`
  Checkpoint signature is used to ensure that nodes are talking about the same checkpoint.
  `boolean`
  `needToReturnImage()`
  Indicates whether the new checkpoint image needs to be transfered back to the name-node after the checkpoint is done.

  ### Methods inherited from class org.apache.hadoop.hdfs.server.protocol.ServerCommand

  `getAction, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### CheckpointCommand

    public CheckpointCommand()

  - ### CheckpointCommand

    public CheckpointCommand(CheckpointSignature sig, boolean needToReturnImg)

- ## Method Details

  - ### getSignature

    public CheckpointSignature getSignature()
    Checkpoint signature is used to ensure that nodes are talking about the same checkpoint.

  - ### needToReturnImage

    public boolean needToReturnImage()
    Indicates whether the new checkpoint image needs to be transfered back to the name-node after the checkpoint is done.
    Returns:
      true if the checkpoint should be returned back.