From 46f77902368e5d8cc2d3e24de735b98a83ad46e1 Mon Sep 17 00:00:00 2001 From: Tsz-Wo Nicholas Sze Date: Thu, 18 Feb 2016 18:18:12 -0800 Subject: [PATCH] HDFS-8923. Add -source flag to balancer usage message. Contributed by Chris Trezzo --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/hdfs/server/balancer/Balancer.java | 2 ++ .../hadoop-hdfs/src/site/markdown/HDFSCommands.md | 2 ++ 3 files changed, 7 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index d54aa967c84..945c911b247 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -2817,6 +2817,9 @@ Release 2.7.3 - UNRELEASED HDFS-4946. Allow preferLocalNode in BlockPlacementPolicyDefault to be configurable (James Kinley and Nathan Roberts via kihwal) + HDFS-8923. Add -source flag to balancer usage message. (Chris Trezzo + via szetszwo) + OPTIMIZATIONS BUG FIXES 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 191e1c3d4f6..49980ff26dd 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 @@ -179,6 +179,8 @@ public class Balancer { + "\tExcludes the specified datanodes." + "\n\t[-include [-f | ]]" + "\tIncludes only the specified datanodes." + + "\n\t[-source [-f | ]]" + + "\tPick only the specified datanodes as source nodes." + "\n\t[-blockpools ]" + "\tThe balancer will only run on blockpools included in this list." + "\n\t[-idleiterations ]" 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 65846698f14..dc6e9355761 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md +++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/markdown/HDFSCommands.md @@ -267,6 +267,7 @@ Usage: [-policy ] [-exclude [-f | ]] [-include [-f | ]] + [-source [-f | ]] [-blockpools ] [-idleiterations ] @@ -276,6 +277,7 @@ Usage: | `-threshold` \ | Percentage of disk capacity. This overwrites the default threshold. | | `-exclude -f` \ \| \ | Excludes the specified datanodes from being balanced by the balancer. | | `-include -f` \ \| \ | Includes only the specified datanodes to be balanced by the balancer. | +| `-source -f` \ \| \ | Pick only the specified datanodes as source nodes. | | `-blockpools` \ | The balancer will only run on blockpools included in this list. | | `-idleiterations` \ | Maximum number of idle iterations before exit. This overwrites the default idleiterations(5). |