hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Todd Lipcon (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1 if daemon processes did not get started
Date Thu, 26 May 2011 02:06:48 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039479#comment-13039479
] 

Todd Lipcon commented on HADOOP-7331:
-------------------------------------

I think we need something a lot more involved to really do a useful job of this. The issue
is that most of our daemons start and then exit a few seconds after startup (eg once the JVM
has loaded and it has had a chance to do some basic initialization). For example, with an
invalid config or bind address, hadoop-daemon.sh will still return 0 in this case.

Regarding the patch itself: no need to use wc -l on the output of {{ps}}. Instead, something
like:
{code}
if ! ps -p $! > /dev/null ; then
  exit 1
fi
{code}
since ps has a non-zero exit code if the process is running.

> Makes hadoop-daemon.sh to return 1 if daemon processes did not get started
> --------------------------------------------------------------------------
>
>                 Key: HADOOP-7331
>                 URL: https://issues.apache.org/jira/browse/HADOOP-7331
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: scripts
>    Affects Versions: 0.23.0
>            Reporter: Tanping Wang
>            Assignee: Tanping Wang
>            Priority: Trivial
>             Fix For: 0.23.0
>
>         Attachments: HADOOP-7331.patch
>
>
> Makes hadoop-daemon.sh to return 1 if daemon processes did not get started.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message