FAQ
bin/hadoop should allow callers to set jsvc pidfile even when not-detached
--------------------------------------------------------------------------

Key: HADOOP-8222
URL: https://issues.apache.org/jira/browse/HADOOP-8222
Project: Hadoop Common
Issue Type: Improvement
Components: scripts
Affects Versions: 0.23.1, 0.20.205.0
Reporter: Peter Linnell


it would be nice if the jsvc pid file were properly namespaced in /var/run to avoid collisions with other jsvc instances

jsvc uses /var/run/jsvc.pid for the datanode pid file. If that's configurable, it should be configured: /var/run/jsvc.pid is sorely not namespaced.

if [ "$_HADOOP_DAEMON_DETACHED" = "true" ]; then
_JSVC_FLAGS="-pidfile $_HADOOP_DAEMON_PIDFILE
-errfile &1
-outfile $_HADOOP_DAEMON_OUT"
else
# Even though we are trying to run a non-detached datanode,
# jsvc will not write to stdout/stderr, so we have to pipe
# it and tail the logfile.
log_path=/tmp/jsvc_${COMMAND}.$$
_JSVC_FLAGS="-nodetach
-errfile &1
-outfile $log_path"
echo Non-detached jsvc output piping to: $log_path
touch $log_path
tail -f $log_path &
fi

And the relevant argument is '-pidfile' (http://linux.die.net/man/1/jsvc).


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

Search Discussions

  • Eli Collins (Resolved) (JIRA) at Mar 30, 2012 at 1:03 am
    [ https://issues.apache.org/jira/browse/HADOOP-8222?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Eli Collins resolved HADOOP-8222.
    ---------------------------------

    Resolution: Not A Problem

    This doesn't apply to branch-1 or branch-2.
    bin/hadoop should allow callers to set jsvc pidfile even when not-detached
    --------------------------------------------------------------------------

    Key: HADOOP-8222
    URL: https://issues.apache.org/jira/browse/HADOOP-8222
    Project: Hadoop Common
    Issue Type: Improvement
    Components: scripts
    Affects Versions: 0.20.205.0, 0.23.1
    Reporter: Peter Linnell

    it would be nice if the jsvc pid file were properly namespaced in /var/run to avoid collisions with other jsvc instances
    jsvc uses /var/run/jsvc.pid for the datanode pid file. If that's configurable, it should be configured: /var/run/jsvc.pid is sorely not namespaced.
    if [ "$_HADOOP_DAEMON_DETACHED" = "true" ]; then
    _JSVC_FLAGS="-pidfile $_HADOOP_DAEMON_PIDFILE
    -errfile &1
    -outfile $_HADOOP_DAEMON_OUT"
    else
    # Even though we are trying to run a non-detached datanode,
    # jsvc will not write to stdout/stderr, so we have to pipe
    # it and tail the logfile.
    log_path=/tmp/jsvc_${COMMAND}.$$
    _JSVC_FLAGS="-nodetach
    -errfile &1
    -outfile $log_path"
    echo Non-detached jsvc output piping to: $log_path
    touch $log_path
    tail -f $log_path &
    fi
    And the relevant argument is '-pidfile' (http://linux.die.net/man/1/jsvc).
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedMar 29, '12 at 1:39a
activeMar 30, '12 at 1:03a
posts2
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Eli Collins (Resolved) (JIRA): 2 posts

People

Translate

site design / logo © 2022 Grokbase