You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Jianfei Jiang (JIRA)" <ji...@apache.org> on 2018/02/22 09:30:00 UTC
[jira] [Commented] (HDFS-13124) hadoop-daemon.sh exits with 1 when
running HDFS balancer on balanced cluster
[ https://issues.apache.org/jira/browse/HDFS-13124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16372593#comment-16372593 ]
Jianfei Jiang commented on HDFS-13124:
--------------------------------------
Also meet this problem in 3.0. In the code of trunk, the sleep time seems to have been changed to 1s, but the balancer is still too quick to get a ps result. The related code is in {{haddop-functions.sh#hadoop_start_daemon_wrapper}}.
{code:java}
sleep 1
# capture the ulimit output
ulimit -a >> "${outfile}" 2>&1
# shellcheck disable=SC2086
if ! ps -p $! >/dev/null 2>&1; then
return 1
fi
return 0
{code}
> hadoop-daemon.sh exits with 1 when running HDFS balancer on balanced cluster
> ----------------------------------------------------------------------------
>
> Key: HDFS-13124
> URL: https://issues.apache.org/jira/browse/HDFS-13124
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: balancer & mover, scripts
> Affects Versions: 2.7.3
> Reporter: Zbigniew Kostrzewa
> Priority: Minor
>
> When running HDFS balancer via {{sbin/start-balancer.sh}} script on a balanced cluster the script exits with 1 though the CLI behind it (i.e. {{hdfs balancer}}) exits with 0. This is probably caused by following piece of code found in {{hadoop-daemon.sh}}:
> {code:java}
> sleep 3;
> if ! ps -p $! > /dev/null ; then
> exit 1
> fi
> {code}
> It seems the CLI command finishes so quickly in case of a balanced cluster that the above {{ps}} does not find it.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org