You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Akira Ajisaka (JIRA)" <ji...@apache.org> on 2016/10/24 07:25:59 UTC

[jira] [Commented] (HDFS-11046) Duplicate '-' in the daemon log name

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

Akira Ajisaka commented on HDFS-11046:
--------------------------------------

First {{HADOOP_SUBCMD_SECURESERVICE}} is set to "false" by hadoop-functions.sh. When the variable is false, the else branch is not used in the following code.
{code:title=hdfs}
  HADOOP_ROOT_LOGGER="${HADOOP_DAEMON_ROOT_LOGGER}"
  if [[ -n "${HADOOP_SUBCMD_SECURESERVICE}" ]]; then
    # shellcheck disable=SC2034
    HADOOP_LOGFILE="hadoop-${HADOOP_SECURE_USER}-${HADOOP_IDENT_STRING}-${HADOOP_SUBCMD}-${HOSTNAME}.log"
  else
    # shellcheck disable=SC2034
    HADOOP_LOGFILE="hadoop-${HADOOP_IDENT_STRING}-${HADOOP_SUBCMD}-${HOSTNAME}.log"
  fi
{code}
I wrote a patch to use {{\[\[ "$\{HADOOP_SUBCMD_SECURESERVICE\}" = true \]\]}} instead.

> Duplicate '-' in the daemon log name
> ------------------------------------
>
>                 Key: HDFS-11046
>                 URL: https://issues.apache.org/jira/browse/HDFS-11046
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: logging
>    Affects Versions: 3.0.0-alpha1
>            Reporter: Akira Ajisaka
>            Assignee: Akira Ajisaka
>         Attachments: HDFS-11046.01.patch
>
>
> When {{HADOOP_SECURE_DN_USER}} and {{HADOOP_PRIVILEGED_NFS_USER}} are not set, there are duplicate '-' in the log name.
> {noformat}
> [centos@ip-172-31-21-203 logs]$ ls *.log
> hadoop--centos-datanode-ip-172-31-21-203.ap-northeast-1.compute.internal.log
> hadoop--centos-namenode-ip-172-31-21-203.ap-northeast-1.compute.internal.log
> hadoop-centos-nodemanager-ip-172-31-21-203.ap-northeast-1.compute.internal.log
> hadoop-centos-resourcemanager-ip-172-31-21-203.ap-northeast-1.compute.internal.log
> {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org