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 |
BANDWIDTH
Specifies the maximum disk bandwidth to use per second.
|
static String |
BEFORE_TEMPLATE
Template for the Before File.
|
static String |
CANCEL
Cancels a running plan.
|
static int |
DEFAULT_TOP
specify default top number of nodes to be processed.
|
static String |
EXECUTE
Executes a given plan file on the target datanode.
|
static String |
HELP
Help for the program.
|
static String |
MAXERROR
Specifies the maximum errors to tolerate.
|
static String |
NODE
Name or address of the node to execute against.
|
static String |
OUTFILE
Output file name, for commands like report, plan etc.
|
static String |
PLAN
Computes a plan for a given set of nodes.
|
static String |
PLAN_TEMPLATE
Template for the plan file.
|
static int |
PLAN_VERSION |
static String |
QUERY
Reports the status of disk balancer operation.
|
static String |
REPORT
The report command prints out a disk fragmentation report about the data
cluster.
|
static String |
SKIPDATECHECK
Skips date check(now by default the plan is valid for 24 hours), and force
execute the plan.
|
static String |
THRESHOLD
Percentage of data unevenness that we are willing to live with.
|
static String |
TOP
specify top number of nodes to be processed.
|
static String |
VERBOSE
Runs 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[]Exception
public int run(String[] args) throws Exception
run
in interface org.apache.hadoop.util.Tool
args
- command specific arguments.Exception
public 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–2021 Apache Software Foundation. All rights reserved.