That is totally true indeed. ...but you couldn't you use a little "hack" to the "hadoop" script and the "org.apache.hadoop.fs.Path" class?
(Sorry, this is just sketchy but gives the idea...)

...in "hadoop" you would add:
 cygwin=false
 case "`uname`" in
 CYGWIN*) cygwin=true;;
 esac
 ...
 if $cygwin; then
   CYGWIN_HOME=`cygpath -w /`
 fi
 ...
 HADOOP_OPTS="$HADOOP_OPTS -Dcygwin.home=$CYGWIN_HOME"

and in the "Path" class do the following (simplified pseudo code):

 static final String CYGWIN_HOME = System.getProperty("cygwin.home");
 ...
 public Path(String pathString) {
   ...
if(isAsbolutePath(pathString) && CYGWIN_HOME != null && !CYGWIN_HOME.isEmtpy() ) {
         pathString = normalizePath(CYGWIN_HOME) + pathString;
    }
   ...
 }

Cheers,
Holger

Doug Cutting wrote:
Holger Stenzhorn wrote:
I am using Hadoop under Cygwin with the default settings.
So hence the "hadoop.tmp.dir" is set to "/tmp/hadoop-${user.name}" via the "hadoop-default.xml". Now when I start using Hadoop it creates a directory "c:\tmp\hadoop-holste" (as "holste" is my user name obviously). But shouldn't Hadoop rather create the directory "hadoop-holste" in the Cygwin "tmp" directory?

The Cygwin /tmp directory, as with the cygwin /usr, and /etc, are only visible to Cygwin applications, like the shell and other C applications compiled against the Cygwin library. Java is not a Cygwin application, so paths in Java are always relative to the Windows filesystem, not to the synthetic paths that Cygwin uses.

Doug

Reply via email to