hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vinayakumar B (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12105) Avoid returning 0 , while fetching the status of a process ,which is not running.
Date Fri, 03 Jul 2015 05:21:04 GMT

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

Vinayakumar B commented on HADOOP-12105:
----------------------------------------

We have seen this kind of issue earlier.
checking for expected process is good idea.
Anyway, since the processes is started using the same script, 'proc_$command' is expected
to present in the valid hadoop process.

Correction. should be "proc_$command" not 'process_classname'


> Avoid returning 0 , while fetching the status of a process ,which is not running.
> ---------------------------------------------------------------------------------
>
>                 Key: HADOOP-12105
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12105
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: J.Andreina
>            Assignee: J.Andreina
>
> If the process(Namenode) is crashed there will be stale pid file . 
> Any other JVM process might get allocated with the same pid as that of the content of
stale pid file. 
> As per current implementation for fetching the status : 
>          we check if any process is running with pid (fetched from corresponding process
pid file) then returns 0.
> {code}
>     if ps -p "${pid}" > /dev/null 2>&1; then
>       return 0
>     fi
> {code}
> *So while fetching the status of namenode return code will be 0 , even if the namenode
process is not running (because some other process is assigned with same pid  ).*
> 	Can we check status of process as below 
> {code}
>     if  ps -fp pid | grep process_classname > /dev/null 2>&1; then
>       return 0
>     fi
> {code}
> Please provide your feedback.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message