You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Chris Nauroth (JIRA)" <ji...@apache.org> on 2013/02/07 05:57:12 UTC

[jira] [Commented] (MAPREDUCE-4987) TestMRJobs#testDistributedCache fails on Windows due to unexpected behavior of symlinks

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

Chris Nauroth commented on MAPREDUCE-4987:
------------------------------------------

In {{TestMRJobs}}, the last assertion in this code fragment fails:

{code}
      // Check lengths of the files
      Map<String, Path> filesMap = pathsToMap(files);
      Assert.assertTrue(filesMap.containsKey("distributed.first.symlink"));
      Assert.assertEquals(1, localFs.getFileStatus(
        filesMap.get("distributed.first.symlink")).getLen());
{code}

This is a known issue with Java 6 on Windows.  It always reports a symlink as having length zero instead of the length of the target file.  This problem was fixed on branch-1-win in HADOOP-9061 by detecting if the runtime environment is Windows + Java 6, and if so, copying files into the symlink location instead of actually creating a symlink.  Applying the same logic to branch-trunk-win will require different code changes.  In YARN, the symlinks for the distributed cache get generated by the container launch scripts.  See {{ContainerLaunch#WindowsShellScriptBuilder#link}}.

                
> TestMRJobs#testDistributedCache fails on Windows due to unexpected behavior of symlinks
> ---------------------------------------------------------------------------------------
>
>                 Key: MAPREDUCE-4987
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-4987
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>          Components: distributed-cache, nodemanager
>    Affects Versions: trunk-win
>            Reporter: Chris Nauroth
>
> On Windows, {{TestMRJobs#testDistributedCache}} fails on an assertion while checking the length of a symlink.  It expects to see the length of the target of the symlink, but Java 6 on Windows always reports that a symlink has length 0.

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