hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nigel Daley (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-1020) Path class on Windows seems broken
Date Wed, 14 Feb 2007 22:23:05 GMT

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

Nigel Daley updated HADOOP-1020:

    Attachment: TestPath.java.patch

The TestPath.java.patch attachment adds the suggested test case to TestPath.  The last 2 assertions
in TestPath.testGetFileSystem fail on both Windows and Linux:
    assertEquals(new Path("file:///","C:/foo/bar").getFileSystem(conf), FileSystem.getLocal(conf));
    assertEquals(new Path("file:///","/foo/bar").getFileSystem(conf), FileSystem.getLocal(conf));
where the conf object has an "fs.default.name" set to a dfs filesytem. 

The second assertion on Linux and both on Windows fails with:
  expected:<DFS[org.apache.hadoop.dfs.DFSClient@1cd66ea]> but was:<LocalFS>
  junit.framework.AssertionFailedError: expected:<DFS[org.apache.hadoop.dfs.DFSClient@1cd66ea]>
but was:<LocalFS>
        at org.apache.hadoop.fs.TestPath.testGetFileSystem(TestPath.java:145)

The first assertion on Linux fails with:
    No FileSystem for scheme: C
    java.io.IOException: No FileSystem for scheme: C
        at org.apache.hadoop.fs.FileSystem.get(FileSystem.java:157)
        at org.apache.hadoop.fs.Path.getFileSystem(Path.java:163)
        at org.apache.hadoop.fs.TestPath.testGetFileSystem(TestPath.java:145)

Given the lack of specification in Path, the expected behaviour is not clear.

> Path class on Windows seems broken
> ----------------------------------
>                 Key: HADOOP-1020
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1020
>             Project: Hadoop
>          Issue Type: Bug
>          Components: dfs
>    Affects Versions: 0.11.1
>            Reporter: Nigel Daley
>         Attachments: TestPath.java.patch
> Executing this code:
> Path file = new Path("file:///", "C:/trunk/build/test/data");   or   Path file = new
> FileSystem fs = file.getFileSystem(conf);
> fs.mkdirs(file))
> produces this exception.  It looks like it's defaulting to the DistributedFileSystem.
> 2007-02-14 11:36:31,700 INFO  mapred.TaskInProgress (TaskInProgress.java:updateStatus(296))
- Error from task_0001_m_000000_0: java.lang.IllegalArgumentException: Pathname /C:/trunk/build/test/data
from C:/trunk/build/test/data is not a valid DFS filename.
>         at org.apache.hadoop.dfs.DistributedFileSystem.getPath(DistributedFileSystem.java:111)
>         at org.apache.hadoop.dfs.DistributedFileSystem.mkdirs(DistributedFileSystem.java:211)
>         at org.apache.hadoop.mapred.MRCaching$MapClass.configure(MRCaching.java:68)
>         at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:50)
>         at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:70)
>         at org.apache.hadoop.mapred.MapRunner.configure(MapRunner.java:34)
>         at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:50)
>         at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:70)
>         at org.apache.hadoop.mapred.MapTask.run(MapTask.java:178)
>         at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:1396)

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message