Repository: hadoop Updated Branches: refs/heads/trunk b85919fee -> 4baca311f
HDFS-7204. balancer doesn't run as a daemon (aw) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/4baca311 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/4baca311 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/4baca311 Branch: refs/heads/trunk Commit: 4baca311ffb5489fbbe08288502db68875834920 Parents: b85919f Author: Allen Wittenauer <[email protected]> Authored: Tue Oct 21 14:26:08 2014 -0700 Committer: Allen Wittenauer <[email protected]> Committed: Tue Oct 21 14:26:08 2014 -0700 ---------------------------------------------------------------------- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 2 ++ hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs | 1 + hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-balancer.sh | 4 ++-- hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-balancer.sh | 2 +- 4 files changed, 6 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/4baca311/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index eaf7cdc..6b7f831 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -253,6 +253,8 @@ Trunk (Unreleased) HDFS-6981. Fix DN upgrade with layout version change. (Arpit Agarwal) + HDFS-7204. balancer doesn't run as a daemon (aw) + Release 2.7.0 - UNRELEASED http://git-wip-us.apache.org/repos/asf/hadoop/blob/4baca311/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs index e88ae08..67e82f1 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs @@ -83,6 +83,7 @@ shift case ${COMMAND} in balancer) + daemon="true" CLASS=org.apache.hadoop.hdfs.server.balancer.Balancer hadoop_debug "Appending HADOOP_BALANCER_OPTS onto HADOOP_OPTS" HADOOP_OPTS="${HADOOP_OPTS} ${HADOOP_BALANCER_OPTS}" http://git-wip-us.apache.org/repos/asf/hadoop/blob/4baca311/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-balancer.sh ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-balancer.sh b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-balancer.sh index a116502..321f9c9 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-balancer.sh +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/start-balancer.sh @@ -15,7 +15,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -function usage +function hadoop_usage { echo "Usage: start-balancer.sh [--config confdir] [-policy <policy>] [-threshold <threshold>]" } @@ -42,4 +42,4 @@ fi # Start balancer daemon. -exec "${bin}/hadoop-daemon.sh" --config "${HADOOP_CONF_DIR}" start balancer "$@" +exec "${HADOOP_HDFS_HOME}/bin/hdfs" --config "${HADOOP_CONF_DIR}" --daemon start balancer "$@" http://git-wip-us.apache.org/repos/asf/hadoop/blob/4baca311/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-balancer.sh ---------------------------------------------------------------------- diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-balancer.sh b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-balancer.sh index 718f867..da25d46 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-balancer.sh +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/stop-balancer.sh @@ -43,4 +43,4 @@ fi # Stop balancer daemon. # Run this on the machine where the balancer is running -"${bin}/hadoop-daemon.sh" --config "${HADOOP_CONF_DIR}" stop balancer +exec "${HADOOP_HDFS_HOME}/bin/hdfs" --config "${HADOOP_CONF_DIR}" --daemon stop balancer
