Class ServerCommand

java.lang.Object
org.apache.hadoop.hdfs.server.protocol.ServerCommand
Direct Known Subclasses:
DatanodeCommand, NamenodeCommand

@Private @Evolving public abstract class ServerCommand extends Object
Base class for a server command. Issued by the name-node to notify other servers what should be done. Commands are defined by actions defined in respective protocols.
See Also:
  • Constructor Details

    • ServerCommand

      public ServerCommand(int action)
      Create a command for the specified action. Actions are protocol specific.
      Parameters:
      action - protocol specific action
      See Also:
  • Method Details

    • getAction

      public int getAction()
      Get server command action.
      Returns:
      action code.
    • toString

      public String toString()
      Overrides:
      toString in class Object