You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Andras Bokor (JIRA)" <ji...@apache.org> on 2017/04/24 12:05:04 UTC

[jira] [Assigned] (HADOOP-6501) RawLocalFileSystem.mkdirs does not throw IOException when it should?

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

Andras Bokor reassigned HADOOP-6501:
------------------------------------

    Assignee: Andras Bokor

> RawLocalFileSystem.mkdirs does not throw IOException when it should?
> --------------------------------------------------------------------
>
>                 Key: HADOOP-6501
>                 URL: https://issues.apache.org/jira/browse/HADOOP-6501
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: fs
>    Affects Versions: 0.20.1
>         Environment: Fedora, Java 1.6.0_17, hadoop 20.1
>            Reporter: robert Cook
>            Assignee: Andras Bokor
>            Priority: Minor
>
> public boolean mkdirs(Path f) throws IOException {
>     Path parent = f.getParent();
>     File p2f = pathToFile(f);
>     return (parent == null || mkdirs(parent)) &&
>       (p2f.mkdir() || p2f.isDirectory());
>   }
> none of the methods called throw IOException
>          yet FileSystemContract BaseTest.testMkdirsFailsForSubdirectoryOfExistingFile fails
>     createFile(path("/test/hadoop/file"));   
>     Path testSubDir = path("/test/hadoop/file/subdir");
>     try {
>       fs.mkdirs(testSubDir);    //<---------returns false instead of throwing exception
>       fail("Should throw IOException.");
>     } catch (IOException e) {
>       // expected
>     }
> --------------------------------------
> further UNIX mkdir operates on a path argument.   why does hadoop mkdir create directories in the path one at a time???
> NOTE that a permission or other failure leaves a garbage partially-completed path in the current hadoop impl.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org