hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bikas Saha (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-8874) HADOOP_HOME and -Dhadoop.home (from hadoop wrapper script) are not uniformly handled
Date Thu, 18 Oct 2012 12:58:04 GMT

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

Bikas Saha commented on HADOOP-8874:
------------------------------------

Looks good. +1. Some minor comments.

This looks like its needed for the case when TT hadoop home is defined with -D instead of
using an env var. Right? If so, a comment would help.
{code}
+    try {
+      env.put(HADOOP_HOME_DIR, Shell.getHadoopHome());
+    } catch (IOException ioe) {
+      LOG.warn("Failed to propagate HADOOP_HOME_DIR to child ENV " + ioe);
+    }
{code}

The name getQualifiedBinPath() does not show its related to qualifying wrt hadoop home, IMO.

                
> HADOOP_HOME and -Dhadoop.home (from hadoop wrapper script) are not uniformly handled
> ------------------------------------------------------------------------------------
>
>                 Key: HADOOP-8874
>                 URL: https://issues.apache.org/jira/browse/HADOOP-8874
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: scripts, security
>    Affects Versions: 1-win
>         Environment: Called from external process with -D flag vs HADOOP_HOME set.
>            Reporter: John Gordon
>              Labels: security
>             Fix For: 1-win
>
>         Attachments: fix_home_np.patch
>
>
> There is a -D flag to set hadoop.home, which is specified in the hadoop wrapper scripts.
 This is particularly useful if you want SxS execution of two or more versions of hadoop (e.g.
rolling upgrade).  However, it isn't honored at all.  HADOOP_HOME is used in 3-4 places to
find non-java hadoop components such as schedulers, scripts, shared libraries, or with the
Windows changes -- binaries.
> Ideally, these should all resolve the path in a consistent manner, and callers shuold
have a similar onus applied when trying to resolve an invalid path to their components.  This
is particularly relevant to scripts or binaries that may have security impact, as absolute
path resolution is generally safer and more stable than relative path resolution.

--
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

Mime
View raw message