You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bigtop.apache.org by "Masatake Iwasaki (JIRA)" <ji...@apache.org> on 2013/08/05 11:25:47 UTC

[jira] [Updated] (BIGTOP-1038) PIDFILE in service scripts of Hadoop is inconsistent with the path in hadoop-daemon.sh

     [ https://issues.apache.org/jira/browse/BIGTOP-1038?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Masatake Iwasaki updated BIGTOP-1038:
-------------------------------------

    Description: 
PIDFILE in service scripts is fixed value because of variable expansion during packaging.
{noformat}
$ grep 'PIDFILE=' /etc/init.d/hadoop-*
/etc/init.d/hadoop-hdfs-datanode:PIDFILE="/var/run/hadoop-hdfs/hadoop-hdfs-datanode.pid"
/etc/init.d/hadoop-hdfs-namenode:PIDFILE="/var/run/hadoop-hdfs/hadoop-hdfs-namenode.pid"
/etc/init.d/hadoop-mapreduce-historyserver:PIDFILE="/var/run/hadoop-mapreduce/mapred-mapred-historyserver.pid"
/etc/init.d/hadoop-yarn-nodemanager:PIDFILE="/var/run/hadoop-yarn/yarn-yarn-nodemanager.pid"
/etc/init.d/hadoop-yarn-resourcemanager:PIDFILE="/var/run/hadoop-yarn/yarn-yarn-resourcemanager.pid"
{noformat}

However, HADOOP_IDENT_STRING composing pidfile path is configurable in hadoop-env.sh.
{noformat}
$ grep HADOOP_IDENT_STRING /usr/lib/hadoop/sbin/hadoop-daemon.sh
#   HADOOP_IDENT_STRING   A string representing this instance of hadoop. $USER by default
  export HADOOP_IDENT_STRING=$HADOOP_SECURE_DN_USER
if [ "$HADOOP_IDENT_STRING" = "" ]; then
  export HADOOP_IDENT_STRING="$USER"
  chown $HADOOP_IDENT_STRING $HADOOP_LOG_DIR
export HADOOP_LOGFILE=hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.log
log=$HADOOP_LOG_DIR/hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.out
pid=$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-$command.pid
{noformat}

As a result, the path of pidfile matches only when HADOOP_IDENT_STRING is service user name which is the default.


  was:
PIDFILE in service scripts is fixed value because of variable expansion during packaging.
{noformat}
$ grep 'PIDFILE=' /etc/init.d/hadoop-*
/etc/init.d/hadoop-hdfs-datanode:PIDFILE="/var/run/hadoop-hdfs/hadoop-hdfs-datanode.pid"
/etc/init.d/hadoop-hdfs-namenode:PIDFILE="/var/run/hadoop-hdfs/hadoop-hdfs-namenode.pid"
/etc/init.d/hadoop-mapreduce-historyserver:PIDFILE="/var/run/hadoop-mapreduce/mapred-mapred-historyserver.pid"
/etc/init.d/hadoop-yarn-nodemanager:PIDFILE="/var/run/hadoop-yarn/yarn-yarn-nodemanager.pid"
/etc/init.d/hadoop-yarn-resourcemanager:PIDFILE="/var/run/hadoop-yarn/yarn-yarn-resourcemanager.pid"
{noformat}

However, HADOOP_IDENT_STRING composing pidfile path is configurable in hadoop-env.sh or default scripts.
{noformat}
$ grep HADOOP_IDENT_STRING /usr/lib/hadoop/sbin/hadoop-daemon.sh
#   HADOOP_IDENT_STRING   A string representing this instance of hadoop. $USER by default
  export HADOOP_IDENT_STRING=$HADOOP_SECURE_DN_USER
if [ "$HADOOP_IDENT_STRING" = "" ]; then
  export HADOOP_IDENT_STRING="$USER"
  chown $HADOOP_IDENT_STRING $HADOOP_LOG_DIR
export HADOOP_LOGFILE=hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.log
log=$HADOOP_LOG_DIR/hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.out
pid=$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-$command.pid
{noformat}

As a result, the path of pidfile matches only when HADOOP_IDENT_STRING is service user name which is the default.


    
> PIDFILE in service scripts of Hadoop is inconsistent with the path in hadoop-daemon.sh
> --------------------------------------------------------------------------------------
>
>                 Key: BIGTOP-1038
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-1038
>             Project: Bigtop
>          Issue Type: Bug
>          Components: Init scripts
>    Affects Versions: 0.6.0
>            Reporter: Masatake Iwasaki
>            Assignee: Masatake Iwasaki
>
> PIDFILE in service scripts is fixed value because of variable expansion during packaging.
> {noformat}
> $ grep 'PIDFILE=' /etc/init.d/hadoop-*
> /etc/init.d/hadoop-hdfs-datanode:PIDFILE="/var/run/hadoop-hdfs/hadoop-hdfs-datanode.pid"
> /etc/init.d/hadoop-hdfs-namenode:PIDFILE="/var/run/hadoop-hdfs/hadoop-hdfs-namenode.pid"
> /etc/init.d/hadoop-mapreduce-historyserver:PIDFILE="/var/run/hadoop-mapreduce/mapred-mapred-historyserver.pid"
> /etc/init.d/hadoop-yarn-nodemanager:PIDFILE="/var/run/hadoop-yarn/yarn-yarn-nodemanager.pid"
> /etc/init.d/hadoop-yarn-resourcemanager:PIDFILE="/var/run/hadoop-yarn/yarn-yarn-resourcemanager.pid"
> {noformat}
> However, HADOOP_IDENT_STRING composing pidfile path is configurable in hadoop-env.sh.
> {noformat}
> $ grep HADOOP_IDENT_STRING /usr/lib/hadoop/sbin/hadoop-daemon.sh
> #   HADOOP_IDENT_STRING   A string representing this instance of hadoop. $USER by default
>   export HADOOP_IDENT_STRING=$HADOOP_SECURE_DN_USER
> if [ "$HADOOP_IDENT_STRING" = "" ]; then
>   export HADOOP_IDENT_STRING="$USER"
>   chown $HADOOP_IDENT_STRING $HADOOP_LOG_DIR
> export HADOOP_LOGFILE=hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.log
> log=$HADOOP_LOG_DIR/hadoop-$HADOOP_IDENT_STRING-$command-$HOSTNAME.out
> pid=$HADOOP_PID_DIR/hadoop-$HADOOP_IDENT_STRING-$command.pid
> {noformat}
> As a result, the path of pidfile matches only when HADOOP_IDENT_STRING is service user name which is the default.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira