J.Andreina created HADOOP-12105:
-----------------------------------
Summary: 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)