org.apache.hadoop.hdfs.server.protocol
Class CheckpointCommand

java.lang.Object
  extended by org.apache.hadoop.hdfs.server.protocol.ServerCommand
      extended by org.apache.hadoop.hdfs.server.protocol.NamenodeCommand
          extended by org.apache.hadoop.hdfs.server.protocol.CheckpointCommand
All Implemented Interfaces:
org.apache.hadoop.io.Writable

@InterfaceAudience.Private
@InterfaceStability.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:


Constructor Summary
CheckpointCommand()
           
CheckpointCommand(CheckpointSignature sig, boolean isImgObsolete, boolean needToReturnImg)
           
 
Method Summary
 CheckpointSignature getSignature()
          Checkpoint signature is used to ensure that nodes are talking about the same checkpoint.
 boolean isImageObsolete()
          Indicates whether current backup image is obsolete, and therefore need to be discarded?
 boolean needToReturnImage()
          Indicates whether the new checkpoint image needs to be transfered back to the name-node after the checkpoint is done.
 void readFields(DataInput in)
           
 void write(DataOutput out)
           
 
Methods inherited from class org.apache.hadoop.hdfs.server.protocol.ServerCommand
getAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckpointCommand

public CheckpointCommand()

CheckpointCommand

public CheckpointCommand(CheckpointSignature sig,
                         boolean isImgObsolete,
                         boolean needToReturnImg)
Method Detail

getSignature

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


isImageObsolete

public boolean isImageObsolete()
Indicates whether current backup image is obsolete, and therefore need to be discarded?

Returns:
true if current image should be discarded.

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.

write

public void write(DataOutput out)
           throws IOException
Specified by:
write in interface org.apache.hadoop.io.Writable
Overrides:
write in class ServerCommand
Throws:
IOException

readFields

public void readFields(DataInput in)
                throws IOException
Specified by:
readFields in interface org.apache.hadoop.io.Writable
Overrides:
readFields in class ServerCommand
Throws:
IOException


Copyright © 2009 The Apache Software Foundation