java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.hdfs.server.diskbalancer.command.Command
org.apache.hadoop.hdfs.server.diskbalancer.command.PlanCommand
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.hadoop.conf.Configurable

public class PlanCommand extends Command
Class that implements Plan Command.

Plan command reads the Cluster Info and creates a plan for specified data node or a set of Data nodes.

It writes the output to a default location unless changed by the user.

  • Constructor Details

    • PlanCommand

      public PlanCommand(org.apache.hadoop.conf.Configuration conf)
      Constructs a plan command.
    • PlanCommand

      public PlanCommand(org.apache.hadoop.conf.Configuration conf, PrintStream ps)
      Constructs a plan command.
  • Method Details

    • execute

      public void execute(org.apache.commons.cli.CommandLine cmd) throws Exception
      Runs the plan command. This command can be run with various options like

      -plan -node IP -plan -node hostName -plan -node DatanodeUUID

      Specified by:
      execute in class Command
      Parameters:
      cmd - - CommandLine
      Throws:
      Exception
    • printHelp

      public void printHelp()
      Gets extended help for this command.
      Specified by:
      printHelp in class Command