hadoop-hdfs-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jing Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HDFS-6328) Simplify code in FSDirectory
Date Mon, 05 May 2014 21:15:17 GMT

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

Jing Zhao commented on HDFS-6328:
---------------------------------

The patch looks pretty good to me. Thanks for the cleanup. Some minors:
# The changes on imports seem unnecessary
# The following change may need to be reverted:
{code}
-    Preconditions.checkArgument(
-        src.endsWith(HdfsConstants.SEPARATOR_DOT_SNAPSHOT_DIR), 
-        "%s does not end with %s", src, HdfsConstants.SEPARATOR_DOT_SNAPSHOT_DIR);
+    Preconditions.checkArgument(src.endsWith(HdfsConstants.SEPARATOR_DOT_SNAPSHOT_DIR), "%s
does not end with %s", src, HdfsConstants.SEPARATOR_DOT_SNAPSHOT_DIR);
{code}
# The following line exceeds 80 characters:
{code}
+      return srcs.startsWith("/") && !srcs.endsWith("/") && getINode4Write(srcs,
false) == null;
{code}
# Let's add "{}" for the while loop:
{code}
+    while(src[i] == dst[i])
+      i++;
{code}

+1 after addressing the comments.

> Simplify code in FSDirectory
> ----------------------------
>
>                 Key: HDFS-6328
>                 URL: https://issues.apache.org/jira/browse/HDFS-6328
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: namenode
>            Reporter: Haohui Mai
>            Assignee: Haohui Mai
>         Attachments: HDFS-6328.000.patch
>
>
> This jira proposes:
> # Cleaning up dead code in FSDirectory.
> # Simplify the control flows that IntelliJ flags as warnings.
> # Move functions related to resolving paths into one place.



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

Mime
View raw message