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 "Lee Faris (JIRA)" <ji...@apache.org> on 2007/04/25 19:50:15 UTC

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

hadoop-config.sh resolving symlinks leads to errors 
----------------------------------------------------

                 Key: HADOOP-1295
                 URL: https://issues.apache.org/jira/browse/HADOOP-1295
             Project: Hadoop
          Issue Type: Improvement
          Components: scripts
         Environment: RHEL3
            Reporter: Lee Faris


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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491810 ] 

Doug Cutting commented on HADOOP-1295:
--------------------------------------

bq. Can it only run this code if HADOOP_HOME is not already set?

That should work.  It looks like all of the stuff there to get an absolute path, etc. is only needed to determine HADOOP_HOME, so if that's already defined it could be skipped.

> hadoop-config.sh resolving symlinks leads to errors 
> ----------------------------------------------------
>
>                 Key: HADOOP-1295
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1295
>             Project: Hadoop
>          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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Lee Faris (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HADOOP-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Lee Faris updated HADOOP-1295:
------------------------------

    Priority: Minor  (was: Major)

> hadoop-config.sh resolving symlinks leads to errors 
> ----------------------------------------------------
>
>                 Key: HADOOP-1295
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1295
>             Project: Hadoop
>          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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Lee Faris (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491804 ] 

Lee Faris commented on HADOOP-1295:
-----------------------------------

Yes I get it.  We need to find the hadoop root.  Is there a way to just pass in the hadoop root?  Can it only run this code if HADOOP_HOME is not already set?  

Btw, it was nice to meet you yesterday at Amazon.  Thanks for stopping by!

> hadoop-config.sh resolving symlinks leads to errors 
> ----------------------------------------------------
>
>                 Key: HADOOP-1295
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1295
>             Project: Hadoop
>          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.
-
You can reply to this email to add a comment to the issue online.


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

Posted by "Doug Cutting (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HADOOP-1295?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12491769 ] 

Doug Cutting commented on HADOOP-1295:
--------------------------------------

I think this is for when someone makes a link to bin/hadoop in, e.g., ~/bin.  When this is done, $this/.. is not the hadoop root but rather ~/bin, and the symlink must thus be resolved.  Does that make sense?

> hadoop-config.sh resolving symlinks leads to errors 
> ----------------------------------------------------
>
>                 Key: HADOOP-1295
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1295
>             Project: Hadoop
>          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.
-
You can reply to this email to add a comment to the issue online.