hadoop-hdfs-issues mailing list archives

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

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

Daryn Sharp commented on HDFS-6328:
-----------------------------------

As a general statement, I'm not sure there's a lot of value add in the changes like altering
whitespace and moving methods.  Mixing functional changes and cosmetic changes make it a bit
harder to see what actually changed.  Please understand it does makes life harder for those
of us also working in the code that will encounter merge conflicts...

Is there a reason why this loop needed to become more complicated?  At this point I believe
it's guaranteed that the src & dest are not identical, nor is the src a subdir of the
dest?
{code}
-    for(; src[i] == dst[i]; i++);
     // src[i - 1] is the last common ancestor.
+    while(src[i] == dst[i] && i < src.length && i < dst.length) {
+      i++;
+    }
{code}

> 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, HDFS-6328.001.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