org.apache.hadoop.hdfs.server.diskbalancer.command

## Class PlanCommand

- 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 Summary

    Constructors
    Constructor and Description
    `PlanCommand(org.apache.hadoop.conf.Configuration conf)` Constructs a plan command.
    `PlanCommand(org.apache.hadoop.conf.Configuration conf, PrintStream ps)` Constructs a plan command.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `execute(org.apache.commons.cli.CommandLine cmd)` Runs the plan command.
    `void` | `printHelp()` Gets extended help for this command.

    - ### Methods inherited from class org.apache.hadoop.hdfs.server.diskbalancer.command.Command

      `addValidCommandParameters, close, create, getClusterURI, getDataNodeProxy, getDefaultTop, getNodeList, getNodes, getOutputPath, getTopNodes, open, parseTopNodes, populatePathNames, readClusterInfo, recordOutput, setCluster, setClusterURI, setNodesToProcess, setNodesToProcess, setOutputPath, setTopNodes, verifyCommandOptions`

    - ### Methods inherited from class org.apache.hadoop.conf.Configured

      `getConf, setConf`

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

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

- - ### Constructor Detail

    - #### 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 Detail

    - #### 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`

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.