hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tsz Wo (Nicholas), SZE (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HDFS-618) Support for non-recursive mkdir in HDFS
Date Mon, 14 Sep 2009 23:32:57 GMT

    [ https://issues.apache.org/jira/browse/HDFS-618?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12755244#action_12755244
] 

Tsz Wo (Nicholas), SZE commented on HDFS-618:
---------------------------------------------

- new public methods needs javadoc, e.g.
{code}
+  public boolean mkdir(Path f, FsPermission permission) throws IOException {
+    return dfs.mkdirs(getPathName(f), permission, false);
+  }
{code}

- The following method in DFSClient is not used.  How about we deprecate it?
{code}
   public boolean mkdirs(String src) throws IOException {
-    return mkdirs(src, null);
+    return mkdirs(src, null, true);
   }
{code}

- This and HDFS-617 are going to conflict each other.  It looks like that this patch is simpler
and may go first.  BTW, could you create helper methods for the common codes like the following?
{code}
+    if (!createParent) {
+      Path parent = new Path(src).getParent();
+      if (parent != null && !dir.isDir(parent.toString())) {
+        throw new FileNotFoundException("Can't mkdir " + src
+            + "; parent directory " + parent.toString() + " doesn't exist.");
+      }
+    }
{code}

> Support for non-recursive mkdir in HDFS
> ---------------------------------------
>
>                 Key: HDFS-618
>                 URL: https://issues.apache.org/jira/browse/HDFS-618
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Kan Zhang
>            Assignee: Kan Zhang
>         Attachments: h618-03.patch
>
>
> Existing mkdirs call automatically creates missing parent directories. HADOOP-4952 call
for a mkdir call that doesn't.

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


Mime
View raw message