You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Tanping Wang (JIRA)" <ji...@apache.org> on 2011/05/26 03:40:47 UTC
[jira] [Created] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
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
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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039515#comment-13039515 ]
Todd Lipcon commented on HADOOP-7331:
-------------------------------------
Yep, I think sleeping is a good idea.
Assuming this has been manually tested, +1 for this simple fix before doing something more complicated.
> 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.2.patch, 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043076#comment-13043076 ]
Todd Lipcon commented on HADOOP-7331:
-------------------------------------
(should have mentioned, I realized Steve is on vacation at the moment. Since Tanping had addressed his comment, I decided to commit - if there's any issue we can revert or follow up later with another patch)
> 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.2.patch, 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
[jira] [Updated] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HADOOP-7331:
---------------------------------
Attachment: (was: HADOOP-7331.patch)
> 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
[jira] [Updated] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HADOOP-7331:
---------------------------------
Attachment: HADOOP-7331.2.patch
> 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.2.patch, 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
[jira] [Updated] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HADOOP-7331:
---------------------------------
Attachment: HADOOP-7331.patch
> 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042324#comment-13042324 ]
Todd Lipcon commented on HADOOP-7331:
-------------------------------------
Steve, just to check: you're OK with committing this as is, right?
> 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.2.patch, 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039833#comment-13039833 ]
Hadoop QA commented on HADOOP-7331:
-----------------------------------
-1 overall. Here are the results of testing the latest attachment
http://issues.apache.org/jira/secure/attachment/12480505/HADOOP-7331.2.patch
against trunk revision 1127811.
+1 @author. The patch does not contain any @author tags.
-1 tests included. The patch doesn't appear to include any new or modified tests.
Please justify why no new tests are needed for this patch.
Also please list what manual steps were performed to verify this patch.
+1 javadoc. The javadoc tool did not generate any warning messages.
+1 javac. The applied patch does not increase the total number of javac compiler warnings.
+1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) warnings.
+1 release audit. The applied patch does not increase the total number of release audit warnings.
+1 core tests. The patch passed core unit tests.
+1 system test framework. The patch passed system test framework compile.
Test results: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/530//testReport/
Findbugs warnings: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/530//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/hudson/job/PreCommit-HADOOP-Build/530//console
This message is automatically generated.
> 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.2.patch, 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
[jira] [Updated] (HADOOP-7331) Make hadoop-daemon.sh to return 1 if
daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HADOOP-7331:
---------------------------------
Summary: Make hadoop-daemon.sh to return 1 if daemon processes did not get started (was: Makes hadoop-daemon.sh to return 1 if daemon processes did not get started)
> Make 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.2.patch, 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039801#comment-13039801 ]
Tanping Wang commented on HADOOP-7331:
--------------------------------------
This was manually tested. Three test cases were covered:
# make binding address troublesome -- by changing the config file to bind two name node service address to the same. After starting name node, hadoop-daemon returned 1. And error message were logged in log files.
# make config file invalid - by renaming hdfs-site.xml to something else. After starting name node, hadoop-daemon returned 1. And error message were logged in log, i.e. "NameNode: java.lang.IllegalArgumentException: Invalid URI for NameNode address.."
# make some user errors - by not providing the correct options to hadoop-daemon.sh e.g.
hadoop-daemon.sh --conf... --script hdfs
made hdfs script does not exist. hadoop-dameon.sh returned 1 and error was output through std out.
> 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.2.patch, 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
[jira] [Updated] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HADOOP-7331:
--------------------------------
Resolution: Fixed
Release Note: hadoop-daemon.sh now returns a non-zero exit code if it detects that the daemon was not still running after 3 seconds.
Hadoop Flags: [Incompatible change, Reviewed]
Status: Resolved (was: Patch Available)
Committed this to trunk. Thanks, Tanping!
I marked this as an incompatible change and added a release note just in case anyone was relying on the previously broken behavior.
> 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.2.patch, 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043087#comment-13043087 ]
Hudson commented on HADOOP-7331:
--------------------------------
Integrated in Hadoop-Common-trunk-Commit #636 (See [https://builds.apache.org/hudson/job/Hadoop-Common-trunk-Commit/636/])
HADOOP-7331. Make hadoop-daemon.sh return exit code 1 if daemon processes did not get started. Contributed by Tanping Wang.
todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1130833
Files :
* /hadoop/common/trunk/CHANGES.txt
* /hadoop/common/trunk/bin/hadoop-daemon.sh
> 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.2.patch, 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Steve Loughran (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040157#comment-13040157 ]
Steve Loughran commented on HADOOP-7331:
----------------------------------------
I understand why there aren't any tests for this, but worry about the sleep 3; statement: why choose three seconds? It seems one of those only-works-on-some-machines sttings.
> 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.2.patch, 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
[jira] [Updated] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HADOOP-7331:
---------------------------------
Attachment: HADOOP-7331.patch
> 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
[jira] [Updated] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HADOOP-7331:
---------------------------------
Attachment: HDFS-7331.2.patch
Thanks for the comment! I agree that we need a more complex mechanism in order for hadoop-daemon.sh process to really know that daemons are not able to start due to various problems that may happen. Suppose now we want to restrict our problem set to deal with the issues like invalid config or unable to bind address in which cases the daemon should die rather quickly after starting. What about having a simple solution for now: we put the process to sleep for a few seconds before checking pid? (Made changes based the feedback.)
> 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, HDFS-7331.2.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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Hudson (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13043299#comment-13043299 ]
Hudson commented on HADOOP-7331:
--------------------------------
Integrated in Hadoop-Common-trunk #708 (See [https://builds.apache.org/hudson/job/Hadoop-Common-trunk/708/])
HADOOP-7331. Make hadoop-daemon.sh return exit code 1 if daemon processes did not get started. Contributed by Tanping Wang.
todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1130833
Files :
* /hadoop/common/trunk/CHANGES.txt
* /hadoop/common/trunk/bin/hadoop-daemon.sh
> 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.2.patch, 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13040735#comment-13040735 ]
Tanping Wang commented on HADOOP-7331:
--------------------------------------
The idea is to simply check if the PID still exists shortly after the JVM of the daemon process is created. As discussed early, we are simplifying the solution to deal with common scenarios that may cause JVM to die shortly after the JVM is created, such as invalid configuration files. And yes, this is machine specific. We do not have data to show how much exact time the JVM may die on top of commodity hardware. This is to provide the operator a quick feedback if JVM may not have been started if some straight-forward mis-configuration has happened. And regarding to why choose 3 seconds?? If you notice that there is also
{code}
sleep 1; head "$log"
{code}
in the same question can be asked regarding to why choose 1 second. I simply want to give a few seconds before checking the existence of JVM after its starts. And I can certainly make this sleep time configurable for the operators to adjust.
(BTW, what are you referring to by "one of those"?)
> 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.2.patch, 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
[jira] [Updated] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HADOOP-7331:
--------------------------------
Status: Patch Available (was: Open)
> 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.2.patch, 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
[jira] [Updated] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tanping Wang updated HADOOP-7331:
---------------------------------
Attachment: (was: HDFS-7331.2.patch)
> 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.2.patch, 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13042323#comment-13042323 ]
Tanping Wang commented on HADOOP-7331:
--------------------------------------
If no furture comments, would this be committed?
> 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.2.patch, 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
[jira] [Commented] (HADOOP-7331) Makes hadoop-daemon.sh to return 1
if daemon processes did not get started
Posted by "Tanping Wang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HADOOP-7331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13039904#comment-13039904 ]
Tanping Wang commented on HADOOP-7331:
--------------------------------------
No unit tests included since this is scripts. Manually tested.
> 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.2.patch, 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