public class DiskBalancerCLI
extends org.apache.hadoop.conf.Configured
implements org.apache.hadoop.util.Tool
For example, if you have 3 disks, with 100 GB , 600 GB and 200 GB on each disk, this tool will ensure that each disk will have 300 GB.
This tool can be run while data nodes are fully functional.
At very high level diskbalancer computes a set of moves that will make disk utilization equal and then those moves are executed by the datanode.
| Modifier and Type | Field and Description | 
|---|---|
| static String | BANDWIDTHSpecifies the maximum disk bandwidth to use per second. | 
| static String | BEFORE_TEMPLATETemplate for the Before File. | 
| static String | CANCELCancels a running plan. | 
| static int | DEFAULT_TOPspecify default top number of nodes to be processed. | 
| static String | EXECUTEExecutes a given plan file on the target datanode. | 
| static String | HELPHelp for the program. | 
| static String | MAXERRORSpecifies the maximum errors to tolerate. | 
| static String | NODEName or address of the node to execute against. | 
| static String | OUTFILEOutput file name, for commands like report, plan etc. | 
| static String | PLANComputes a plan for a given set of nodes. | 
| static String | PLAN_TEMPLATETemplate for the plan file. | 
| static int | PLAN_VERSION | 
| static String | QUERYReports the status of disk balancer operation. | 
| static String | REPORTThe report command prints out a disk fragmentation report about the data
 cluster. | 
| static String | SKIPDATECHECKSkips date check(now by default the plan is valid for 24 hours), and force
 execute the plan. | 
| static String | THRESHOLDPercentage of data unevenness that we are willing to live with. | 
| static String | TOPspecify top number of nodes to be processed. | 
| static String | VERBOSERuns the command in verbose mode. | 
| Constructor and Description | 
|---|
| DiskBalancerCLI(org.apache.hadoop.conf.Configuration conf)Construct a DiskBalancer. | 
| DiskBalancerCLI(org.apache.hadoop.conf.Configuration conf,
               PrintStream printStream) | 
| Modifier and Type | Method and Description | 
|---|---|
| static org.apache.commons.cli.Options | getCancelOptions()Returns Cancel Options. | 
| Command | getCurrentCommand()Gets current command associated with this instance of DiskBalancer. | 
| static org.apache.commons.cli.Options | getExecuteOptions()Retuns execute options. | 
| static org.apache.commons.cli.Options | getHelpOptions()Returns help options. | 
| static org.apache.commons.cli.Options | getPlanOptions()Returns Plan options. | 
| static org.apache.commons.cli.Options | getQueryOptions()Returns Query Options. | 
| static org.apache.commons.cli.Options | getReportOptions()Returns Report Options. | 
| static void | main(String[] argv)Main for the  DiskBalancer Command handling. | 
| int | run(String[] args)Execute the command with the given arguments. | 
public static final String PLAN
public static final String OUTFILE
public static final String HELP
public static final String THRESHOLD
public static final String BANDWIDTH
public static final String MAXERROR
public static final String EXECUTE
public static final String SKIPDATECHECK
public static final String REPORT
public static final String TOP
public static final int DEFAULT_TOP
public static final String NODE
public static final String VERBOSE
public static final int PLAN_VERSION
public static final String QUERY
public static final String CANCEL
public static final String BEFORE_TEMPLATE
public static final String PLAN_TEMPLATE
public DiskBalancerCLI(org.apache.hadoop.conf.Configuration conf)
conf - public DiskBalancerCLI(org.apache.hadoop.conf.Configuration conf,
                       PrintStream printStream)
public static void main(String[] argv) throws Exception
argv - - System Args Strings[]Exceptionpublic int run(String[] args) throws Exception
run in interface org.apache.hadoop.util.Toolargs - command specific arguments.Exceptionpublic static org.apache.commons.cli.Options getPlanOptions()
public static org.apache.commons.cli.Options getHelpOptions()
public static org.apache.commons.cli.Options getExecuteOptions()
public static org.apache.commons.cli.Options getQueryOptions()
public static org.apache.commons.cli.Options getCancelOptions()
public static org.apache.commons.cli.Options getReportOptions()
public Command getCurrentCommand()
Copyright © 2008–2023 Apache Software Foundation. All rights reserved.