HDFS-10567. Improve plan command help message. Contributed by Xiaobing Zhou.
This commit is contained in:
parent
9daa9979a1
commit
02abd131b8
@ -266,33 +266,40 @@ public class DiskBalancer extends Configured implements Tool {
|
|||||||
private void addPlanCommands(Options opt) {
|
private void addPlanCommands(Options opt) {
|
||||||
|
|
||||||
Option plan = OptionBuilder.withLongOpt(PLAN)
|
Option plan = OptionBuilder.withLongOpt(PLAN)
|
||||||
.withDescription("creates a plan for datanode.")
|
.withDescription("Hostname, IP address or UUID of datanode " +
|
||||||
|
"for which a plan is created.")
|
||||||
.hasArg()
|
.hasArg()
|
||||||
.create();
|
.create();
|
||||||
getPlanOptions().addOption(plan);
|
getPlanOptions().addOption(plan);
|
||||||
opt.addOption(plan);
|
opt.addOption(plan);
|
||||||
|
|
||||||
|
|
||||||
Option outFile = OptionBuilder.withLongOpt(OUTFILE)
|
Option outFile = OptionBuilder.withLongOpt(OUTFILE).hasArg()
|
||||||
.hasArg()
|
.withDescription(
|
||||||
.withDescription("File to write output to, if not specified " +
|
"Local path of file to write output to, if not specified "
|
||||||
"defaults will be used.")
|
+ "defaults will be used.")
|
||||||
.create();
|
.create();
|
||||||
getPlanOptions().addOption(outFile);
|
getPlanOptions().addOption(outFile);
|
||||||
opt.addOption(outFile);
|
opt.addOption(outFile);
|
||||||
|
|
||||||
Option bandwidth = OptionBuilder.withLongOpt(BANDWIDTH)
|
Option bandwidth = OptionBuilder.withLongOpt(BANDWIDTH).hasArg()
|
||||||
.hasArg()
|
.withDescription(
|
||||||
.withDescription("Maximum disk bandwidth to be consumed by " +
|
"Maximum disk bandwidth (MB/s) in integer to be consumed by "
|
||||||
"diskBalancer. e.g. 10")
|
+ "diskBalancer. e.g. 10 MB/s.")
|
||||||
.create();
|
.create();
|
||||||
getPlanOptions().addOption(bandwidth);
|
getPlanOptions().addOption(bandwidth);
|
||||||
opt.addOption(bandwidth);
|
opt.addOption(bandwidth);
|
||||||
|
|
||||||
Option threshold = OptionBuilder.withLongOpt(THRESHOLD)
|
Option threshold = OptionBuilder.withLongOpt(THRESHOLD)
|
||||||
.hasArg()
|
.hasArg()
|
||||||
.withDescription("Percentage skew that we" +
|
.withDescription("Percentage of data skew that is tolerated before"
|
||||||
"tolerate before diskbalancer starts working e.g. 10")
|
+ " disk balancer starts working. For example, if"
|
||||||
|
+ " total data on a 2 disk node is 100 GB then disk"
|
||||||
|
+ " balancer calculates the expected value on each disk,"
|
||||||
|
+ " which is 50 GB. If the tolerance is 10% then data"
|
||||||
|
+ " on a single disk needs to be more than 60 GB"
|
||||||
|
+ " (50 GB + 10% tolerance value) for Disk balancer to"
|
||||||
|
+ " balance the disks.")
|
||||||
.create();
|
.create();
|
||||||
getPlanOptions().addOption(threshold);
|
getPlanOptions().addOption(threshold);
|
||||||
opt.addOption(threshold);
|
opt.addOption(threshold);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user