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

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

@InterfaceAudience.Private
@InterfaceStability.Evolving
public class UpgradeCommand
extends DatanodeCommand

This as a generic distributed upgrade command. During the upgrade cluster components send upgrade commands to each other in order to obtain or share information with them. It is supposed that each upgrade defines specific upgrade command by deriving them from this class. The upgrade command contains version of the upgrade, which is verified on the receiving side and current status of the upgrade.


Field Summary
static int UC_ACTION_REPORT_STATUS
           
static int UC_ACTION_START_UPGRADE
           
 
Fields inherited from class org.apache.hadoop.hdfs.server.protocol.DatanodeCommand
FINALIZE, REGISTER
 
Constructor Summary
UpgradeCommand()
           
UpgradeCommand(int action, int version, short status)
           
 
Method Summary
 short getCurrentStatus()
           
 int getVersion()
           
 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
 

Field Detail

UC_ACTION_REPORT_STATUS

public static final int UC_ACTION_REPORT_STATUS
See Also:
Constant Field Values

UC_ACTION_START_UPGRADE

public static final int UC_ACTION_START_UPGRADE
See Also:
Constant Field Values
Constructor Detail

UpgradeCommand

public UpgradeCommand()

UpgradeCommand

public UpgradeCommand(int action,
                      int version,
                      short status)
Method Detail

getVersion

public int getVersion()

getCurrentStatus

public short getCurrentStatus()

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