diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java index 0773651471..b79ab5b5bc 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/balancer/Balancer.java @@ -206,9 +206,9 @@ public class Balancer { + "on over-utilized machines." + "\n\t[-asService]\tRun as a long running service." + "\n\t[-sortTopNodes]" - + "\n\t[-hotBlockTimeInterval]\tprefer to move cold blocks." + "\tSort datanodes based on the utilization so " - + "that highly utilized datanodes get scheduled first."; + + "that highly utilized datanodes get scheduled first." + + "\n\t[-hotBlockTimeInterval]\tprefer to move cold blocks."; @VisibleForTesting private static volatile boolean serviceRunning = false; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md index 2903cf7fdf..435e615b30 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md +++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md @@ -292,6 +292,8 @@ Usage: [-idleiterations ] [-runDuringUpgrade] [-asService] + [-sortTopNodes] + [-hotBlockTimeInterval ] | COMMAND\_OPTION | Description | |:---- |:---- | @@ -304,6 +306,7 @@ Usage: | `-idleiterations` \ | Maximum number of idle iterations before exit. This overwrites the default idleiterations(5). | | `-runDuringUpgrade` | Whether to run the balancer during an ongoing HDFS upgrade. This is usually not desired since it will not affect used space on over-utilized machines. | | `-asService` | Run Balancer as a long running service. | +| `-sortTopNodes` | Sort datanodes based on the utilization so that highly utilized datanodes get scheduled first. | | `-hotBlockTimeInterval` | Prefer moving cold blocks i.e blocks associated with files accessed or modified before the specified time interval. | | `-h`\|`--help` | Display the tool usage and help information and exit. |