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

Jing Zhao commented on HDFS-6330:
---------------------------------

The patch looks good to me. Some minors:
# Let's use this chance to remove the empty javadoc of FSDirectory#normalizePath
# The following change may be unnecessary?
{code}
-      blockManager.getDatanodeManager().clearPendingCachingCommands();
-      blockManager.getDatanodeManager().setShouldSendCachingCommands(false);
-      // Don't want to keep replication queues when not in Active.
-      blockManager.clearQueues();
+      if (blockManager != null) {
+        blockManager.getDatanodeManager().clearPendingCachingCommands();
+        blockManager.getDatanodeManager().setShouldSendCachingCommands(false);
+        // Don't want to keep replication queues when not in Active.
+        blockManager.clearQueues();
+      }
{code}
# Nit: Some lines exceed the 80 character limit (e.g., mkdirsRecursively and 
addSymlink).
# We may need to update the log information in mkdirsRecursively since it's no 
longer a FSDirectory call.


> Move mkdirs() to FSNamesystem
> -----------------------------
>
>                 Key: HDFS-6330
>                 URL: https://issues.apache.org/jira/browse/HDFS-6330
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-6330.000.patch, HDFS-6330.001.patch
>
>
> Currently mkdir() automatically creates all ancestors for a directory. This 
> is implemented in FSDirectory, by calling unprotectedMkdir() along the path. 
> This jira proposes to move the function to FSNamesystem to simplify the 
> primitive that FSDirectory needs to provide.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to