[ https://issues.apache.org/jira/browse/HADOOP-7089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12981098#action_12981098 ]
Eli Collins commented on HADOOP-7089: ------------------------------------- Some extra explanation of the rationale: the current code only resolves the final symlink in the path, ie only starts _if the file that sources hadoop-config.sh is a symlink_, where the patch here unconditionally resolves all the symlinks. So the current code sometimes does, and sometimes does not, fully resolve links in the path to HADOOP_HOME. Therefore the current code should be agnostic as to whether you fully resolve HADOOP_HOME (ie it should be OK to always resolve the symlinks). I think it makes sense to resolve links (and this probably was the intent of the original symlink resolution code) as that way the logic is uniform, ie the way HADOOP_HOME is determined is the same regardless of whether hadoop-config.sh is sourced from a symlink. > Fix link resolution logic in hadoop-config.sh > --------------------------------------------- > > Key: HADOOP-7089 > URL: https://issues.apache.org/jira/browse/HADOOP-7089 > Project: Hadoop Common > Issue Type: Bug > Components: scripts > Reporter: Eli Collins > Assignee: Eli Collins > Priority: Minor > Attachments: hadoop-7089-1.patch, hadoop-7089-1.patch, > hadoop-7089-2.patch > > > The link resolution logic in bin/hadoop-config.sh fails when when executed > via a symlink, from the root directory. We can replace this logic with cd -P > and pwd -P, which should be portable across Linux, Solaris, BSD, and OSX. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.