Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.7.0
    • Component/s: datanode, namenode
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      1.

      removeBlocks(collectedBlocks);
      

      should be after logSync, as we do in other FSN places (rename, delete, write with overwrite), the reason is discussed in HDFS-2815 and https://issues.apache.org/jira/browse/HDFS-6871?focusedCommentId=14110068&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14110068

      2.

      stat = FSDirStatAndListingOp.getFileInfo(dir, src, false,
          FSDirectory.isReservedRawName(src), true);
      

      We'd better to use dir.getAuditFileInfo, since it's only for audit log. If audit log is not on, we don't need to get the file info.

      3.
      In truncateInternal,

      INodeFile file = iip.getLastINode().asFile();
      

      is not necessary.

        Activity

        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12693037/HDFS-7638.001.patch
        against trunk revision 19cbce3.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        -1 javac. The applied patch generated 1244 javac compiler warnings (more than the trunk's current 1221 warnings).

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.server.namenode.TestFileTruncate

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9265//testReport/
        Javac warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/9265//artifact/patchprocess/diffJavacWarnings.txt
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9265//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12693037/HDFS-7638.001.patch against trunk revision 19cbce3. +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. -1 javac . The applied patch generated 1244 javac compiler warnings (more than the trunk's current 1221 warnings). +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.namenode.TestFileTruncate Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9265//testReport/ Javac warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/9265//artifact/patchprocess/diffJavacWarnings.txt Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9265//console This message is automatically generated.
        Hide
        jingzhao Jing Zhao added a comment -

        Thanks for working on this, Yi Liu! The patch looks good to me. +1.

        The javac warning looks unrelated. I just re-triggered the Jenkins to confirm.

        Show
        jingzhao Jing Zhao added a comment - Thanks for working on this, Yi Liu ! The patch looks good to me. +1. The javac warning looks unrelated. I just re-triggered the Jenkins to confirm.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12693037/HDFS-7638.001.patch
        against trunk revision e843a0a.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 javadoc. There were no new javadoc warning messages.

        +1 eclipse:eclipse. The patch built with eclipse:eclipse.

        +1 findbugs. The patch does not introduce any new Findbugs (version 2.0.3) warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        -1 core tests. The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.server.namenode.ha.TestRetryCacheWithHA
        org.apache.hadoop.hdfs.server.namenode.TestFileTruncate

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9268//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9268//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12693037/HDFS-7638.001.patch against trunk revision e843a0a. +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 javadoc . There were no new javadoc warning messages. +1 eclipse:eclipse . The patch built with eclipse:eclipse. +1 findbugs . The patch does not introduce any new Findbugs (version 2.0.3) warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. -1 core tests . The patch failed these unit tests in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.server.namenode.ha.TestRetryCacheWithHA org.apache.hadoop.hdfs.server.namenode.TestFileTruncate Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9268//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9268//console This message is automatically generated.
        Hide
        hitliuyi Yi Liu added a comment -

        Thanks Jing Zhao for the review, the test failure is not related, it runs successfully in my local env, will commit shortly.

        Show
        hitliuyi Yi Liu added a comment - Thanks Jing Zhao for the review, the test failure is not related, it runs successfully in my local env, will commit shortly.
        Hide
        hitliuyi Yi Liu added a comment -

        Committed to trunk.

        Show
        hitliuyi Yi Liu added a comment - Committed to trunk.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #6892 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6892/)
        HDFS-7638: Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-trunk-Commit #6892 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6892/ ) HDFS-7638 : Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #79 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/79/)
        HDFS-7638: Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #79 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/79/ ) HDFS-7638 : Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Yarn-trunk #813 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/813/)
        HDFS-7638: Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #813 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/813/ ) HDFS-7638 : Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #76 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/76/)
        HDFS-7638: Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Hdfs-trunk-Java8 #76 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/76/ ) HDFS-7638 : Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Hdfs-trunk #2011 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2011/)
        HDFS-7638: Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Show
        hudson Hudson added a comment - SUCCESS: Integrated in Hadoop-Hdfs-trunk #2011 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2011/ ) HDFS-7638 : Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #80 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/80/)
        HDFS-7638: Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk-Java8 #80 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/80/ ) HDFS-7638 : Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-Mapreduce-trunk #2030 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2030/)
        HDFS-7638: Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2030 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2030/ ) HDFS-7638 : Small fix and few refinements for FSN#truncate. (yliu) (yliu: rev 5a6c084f074990a1f412475b147fd4f040b57d57) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Hide
        shv Konstantin Shvachko added a comment -

        Merged to branch-2.

        Show
        shv Konstantin Shvachko added a comment - Merged to branch-2.

          People

          • Assignee:
            hitliuyi Yi Liu
            Reporter:
            hitliuyi Yi Liu
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development