You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Harsh J (JIRA)" <ji...@apache.org> on 2011/07/16 20:34:00 UTC

[jira] [Resolved] (HADOOP-1295) hadoop-config.sh resolving symlinks leads to errors

     [ https://issues.apache.org/jira/browse/HADOOP-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Harsh J resolved HADOOP-1295.
-----------------------------

    Resolution: Not A Problem

As described by Doug in the last comment here, this can be avoided if HADOOP_HOME is explicitly set, which ought to be easy to do when you are managing your versions.

Feel free to reopen if there was something else, of course.

> hadoop-config.sh resolving symlinks leads to errors 
> ----------------------------------------------------
>
>                 Key: HADOOP-1295
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1295
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: scripts
>         Environment: RHEL3
>            Reporter: Lee Faris
>            Priority: Minor
>
> My company uses a versioned deployment system where the final results are symlinked. 
> For example:The hadoop package would be located at this location on all boxes
> /apollo/env/Hadoop/
> This is a symlink generated by the system.  The hardlink can look like this:
> box1: /apollo/env/Hadoop -> /apollo/version/Hadoop-11114456
> box2: /apollo/env/Hadoop -> /apollo/version/Hadoop-10039445
> This piece of script from hadoop-config.sh resolves symlinks into hard links:
> while [ -h "$this" ]; do
>   ls=`ls -ld "$this"`
>   link=`expr "$ls" : '.*-> \(.*\)$'`
>   if expr "$link" : '.*/.*' > /dev/null; then
>     this="$link"
>   else
>     this=`dirname "$this"`/"$link"
>   fi
> done
> I am not sure why this is done.  Commenting out the code makes things work for our system.  
> I assume that was put in for a reason.  Is there a solution for the original need for this code to that can work with our use case?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira