hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun C Murthy (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-281) dfs.FSDirectory.mkdirs can create sub-directories of a file!
Date Mon, 17 Jul 2006 17:12:14 GMT
    [ http://issues.apache.org/jira/browse/HADOOP-281?page=comments#action_12421668 ] 
Arun C Murthy commented on HADOOP-281:

Hi Wendy,

  Your approach looks fine too... I'll just let Doug/Konstantin or someone else with more
experience with dfs codebase decide.

  However, a subtle issue: there are some places in the code base (e.g. FileUtil.java) which
makes a call to 'mkdirs' and then fail to check the return-value to ensure that it completed
successfully, which lead to other bugs. At the very least we will need to patch FileUtil.java
(it's a part of my mkdirs.patch). Could you further test your patch using the dfs shell? 

  $ hadoop dfs -mkdir /tmp/test-mkdir
  $ hadoop dfs -copyFromLocal ./foo.txt /tmp/test-mkdir/foo.txt
  $ hadoop dfs -mkdir /tmp/test-mkdir/foo.txt/d1/d2
  $ hadoop dfs -mkdir /tmp/test-mkdir/foo.txt/d1
  $ hadoop dfs -put ./some_directory /tmp/test-mkdir/foo.txt/some_directory

  Your patch fails only in the last test-case above (due to non-existent return-value check
in FileUtil.java). 
  Could you please take a look and maybe include my patch for FileUtil.java too?


> dfs.FSDirectory.mkdirs can create sub-directories of a file!
> ------------------------------------------------------------
>                 Key: HADOOP-281
>                 URL: http://issues.apache.org/jira/browse/HADOOP-281
>             Project: Hadoop
>          Issue Type: Bug
>    Affects Versions: 0.3.1
>            Reporter: Sameer Paranjpye
>             Fix For: 0.5.0
>         Attachments: addNode.patch, mkdirs.patch, TestDFSMkdirs.java
> dfs.FSDirectory.mkdirs will merrily adds children to a directory tree node without checking
whether it represents a directory. So it is possible to create a subdirectories of a file.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message