From yarn-issues-return-17984-apmail-hadoop-yarn-issues-archive=hadoop.apache.org@hadoop.apache.org Mon Nov 11 03:29:19 2013 Return-Path: X-Original-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-yarn-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 42B3510631 for ; Mon, 11 Nov 2013 03:29:19 +0000 (UTC) Received: (qmail 34488 invoked by uid 500); 11 Nov 2013 03:29:19 -0000 Delivered-To: apmail-hadoop-yarn-issues-archive@hadoop.apache.org Received: (qmail 34437 invoked by uid 500); 11 Nov 2013 03:29:18 -0000 Mailing-List: contact yarn-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: yarn-issues@hadoop.apache.org Delivered-To: mailing list yarn-issues@hadoop.apache.org Received: (qmail 34427 invoked by uid 99); 11 Nov 2013 03:29:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Nov 2013 03:29:17 +0000 Date: Mon, 11 Nov 2013 03:29:17 +0000 (UTC) From: "haosdent (JIRA)" To: yarn-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (YARN-1329) yarn-config.sh overwrites YARN_CONF_DIR indiscriminately MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/YARN-1329?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13818674#comment-13818674 ] haosdent commented on YARN-1329: -------------------------------- Update yarn-config.sh according to the description of [~aagottlieb]. > yarn-config.sh overwrites YARN_CONF_DIR indiscriminately > --------------------------------------------------------- > > Key: YARN-1329 > URL: https://issues.apache.org/jira/browse/YARN-1329 > Project: Hadoop YARN > Issue Type: Bug > Components: nodemanager, resourcemanager > Reporter: Aaron Gottlieb > Assignee: haosdent > Labels: easyfix > Attachments: YARN-1329.patch > > > The script yarn-daemons.sh calls {code}${HADOOP_LIBEXEC_DIR}/yarn-config.sh{code} > yarn-config.sh overwrites any previously set value of environment variable YARN_CONF_DIR starting at line 40: > {code:title=yarn-config.sh|borderStyle=solid} > #check to see if the conf dir is given as an optional argument > if [ $# -gt 1 ] > then > if [ "--config" = "$1" ] > then > shift > confdir=$1 > shift > YARN_CONF_DIR=$confdir > fi > fi > > # Allow alternate conf dir location. > export YARN_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_YARN_HOME/conf}" > {code} > The last line should check for the existence of YARN_CONF_DIR first. > {code} > DEFAULT_CONF_DIR="${HADOOP_CONF_DIR:-$YARN_HOME/conf}" > export YARN_CONF_DIR="${YARN_CONF_DIR:-$DEFAULT_CONF_DIR}" > {code} -- This message was sent by Atlassian JIRA (v6.1#6144)