Author: acmurthy Date: Thu Jun 6 01:19:52 2013 New Revision: 1490102 URL: http://svn.apache.org/r1490102 Log: Merge -c 1485842 from trunk to branch-2 to fix HADOOP-9593 stack trace printed at ERROR for all yarn clients without hadoop.home set. Contributed by Steve Lougran.
Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt?rev=1490102&r1=1490101&r2=1490102&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/CHANGES.txt Thu Jun 6 01:19:52 2013 @@ -236,6 +236,9 @@ Release 2.1.0-beta - UNRELEASED HADOOP-9481. Broken conditional logic with HADOOP_SNAPPY_LIBRARY. (Vadim Bondarev via atm) + HADOOP-9593. stack trace printed at ERROR for all yarn clients without + hadoop.home set (stevel) + BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS HADOOP-8924. Hadoop Common creating package-info.java must not depend on Modified: hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java URL: http://svn.apache.org/viewvc/hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java?rev=1490102&r1=1490101&r2=1490102&view=diff ============================================================================== --- hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java (original) +++ hadoop/common/branches/branch-2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/Shell.java Thu Jun 6 01:19:52 2013 @@ -227,8 +227,10 @@ abstract public class Shell { home = homedir.getCanonicalPath(); } catch (IOException ioe) { - LOG.error("Failed to detect a valid hadoop home directory", ioe); - home = null; + if (LOG.isDebugEnabled()) { + LOG.debug("Failed to detect a valid hadoop home directory", ioe); + } + home = null; } return home; @@ -305,10 +307,13 @@ abstract public class Shell { shexec = new ShellCommandExecutor(args); shexec.execute(); } catch (IOException ioe) { - LOG.warn("setsid is not available on this machine. So not using it."); + LOG.debug("setsid is not available on this machine. So not using it."); setsidSupported = false; } finally { // handle the exit code - LOG.info("setsid exited with exit code " + shexec.getExitCode()); + if (LOG.isDebugEnabled()) { + LOG.debug("setsid exited with exit code " + + (shexec != null ? shexec.getExitCode() : "(null executor)")); + } } return setsidSupported; }