Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-3107 HDFS truncate
  3. HDFS-7659

We should check the new length of truncate can't be a negative value.

    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
    • Target Version/s:
    • Hadoop Flags:
      Reviewed

      Description

      It's obvious that we should check the new length of truncate can't be a negative value.

      1. HDFS-7659.001.patch
        0.9 kB
        Yi Liu
      2. HDFS-7659.002.patch
        2 kB
        Yi Liu
      3. HDFS-7659.003.patch
        3 kB
        Yi Liu
      4. HDFS-7659-branch2.patch
        3 kB
        Konstantin Shvachko

        Activity

        Hide
        hitliuyi Yi Liu added a comment -

        The fix is obvious, no need for test.

        Show
        hitliuyi Yi Liu added a comment - The fix is obvious, no need for test.
        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/12693876/HDFS-7659.001.patch
        against trunk revision 786dbdf.

        +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.datanode.fsdataset.impl.TestLazyPersistFiles
        org.apache.hadoop.hdfs.server.datanode.TestBlockScanner

        The following test timeouts occurred in hadoop-hdfs-project/hadoop-hdfs:

        org.apache.hadoop.hdfs.TestFileCreation

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9302//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9302//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/12693876/HDFS-7659.001.patch against trunk revision 786dbdf. +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.datanode.fsdataset.impl.TestLazyPersistFiles org.apache.hadoop.hdfs.server.datanode.TestBlockScanner The following test timeouts occurred in hadoop-hdfs-project/hadoop-hdfs: org.apache.hadoop.hdfs.TestFileCreation Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9302//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9302//console This message is automatically generated.
        Hide
        cmccabe Colin P. McCabe added a comment -

        Thanks for the patch.

        A few comments: We should not use a Precondition check here. Those checks are for guarding against logic errors, not invalid input from the HDFS user. You should throw a HadoopIllegalArgumentException when an invalid truncate size is passed. Also, please add a unit test. It is trivial to add a unit test for this and it will prevent this from regressing in the future.

        Show
        cmccabe Colin P. McCabe added a comment - Thanks for the patch. A few comments: We should not use a Precondition check here. Those checks are for guarding against logic errors, not invalid input from the HDFS user. You should throw a HadoopIllegalArgumentException when an invalid truncate size is passed. Also, please add a unit test. It is trivial to add a unit test for this and it will prevent this from regressing in the future.
        Hide
        shv Konstantin Shvachko added a comment -

        Agreed about Preconditions.
        Why don't we just add the negative check to the condition: if(oldLength < newLength) {

        For the test an attempt to truncate to < 0 size could be added to testTruncateFailure().
        I guess these type of conditions to be implemented in TestCLI for truncate under HDFS-7058.

        Show
        shv Konstantin Shvachko added a comment - Agreed about Preconditions. Why don't we just add the negative check to the condition: if(oldLength < newLength) { For the test an attempt to truncate to < 0 size could be added to testTruncateFailure() . I guess these type of conditions to be implemented in TestCLI for truncate under HDFS-7058 .
        Hide
        hitliuyi Yi Liu added a comment -

        Thanks Colin and Konstantin, will update the patch later.

        Show
        hitliuyi Yi Liu added a comment - Thanks Colin and Konstantin, will update the patch later.
        Hide
        hitliuyi Yi Liu added a comment -

        Why don't we just add the negative check to the condition: if(oldLength < newLength) {

        For this my consideration is newLength >= 0 doesn't need the FSN write lock, it's a bit more efficient if the user passes a negative value.

        Show
        hitliuyi Yi Liu added a comment - Why don't we just add the negative check to the condition: if(oldLength < newLength) { For this my consideration is newLength >= 0 doesn't need the FSN write lock, it's a bit more efficient if the user passes a negative value.
        Hide
        shv Konstantin Shvachko added a comment -

        Makes sense, Yi. Then we can also add it all the way into DFSClient or even Filesystem? To fail fast.

        Show
        shv Konstantin Shvachko added a comment - Makes sense, Yi. Then we can also add it all the way into DFSClient or even Filesystem? To fail fast.
        Hide
        hitliuyi Yi Liu added a comment -

        Upload a new patch.

        Show
        hitliuyi Yi Liu added a comment - Upload a new patch.
        Hide
        hitliuyi Yi Liu added a comment -

        Sure, let me do it.

        Show
        hitliuyi Yi Liu added a comment - Sure, let me do it.
        Hide
        hitliuyi Yi Liu added a comment -

        Wait, I need to give a new patch to add it to DFSClient...

        Show
        hitliuyi Yi Liu added a comment - Wait, I need to give a new patch to add it to DFSClient...
        Hide
        hitliuyi Yi Liu added a comment -

        Update...

        Show
        hitliuyi Yi Liu added a comment - Update...
        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/12694062/HDFS-7659.003.patch
        against trunk revision 5f124ef.

        +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 1291 javac compiler warnings (more than the trunk's current 1207 warnings).

        -1 javadoc. The javadoc tool appears to have generated 23 warning messages.
        See https://builds.apache.org/job/PreCommit-HDFS-Build/9306//artifact/patchprocess/diffJavadocWarnings.txt for details.

        +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 passed unit tests in hadoop-common-project/hadoop-common.

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9306//testReport/
        Javac warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/9306//artifact/patchprocess/diffJavacWarnings.txt
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9306//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/12694062/HDFS-7659.003.patch against trunk revision 5f124ef. +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 1291 javac compiler warnings (more than the trunk's current 1207 warnings). -1 javadoc . The javadoc tool appears to have generated 23 warning messages. See https://builds.apache.org/job/PreCommit-HDFS-Build/9306//artifact/patchprocess/diffJavadocWarnings.txt for details. +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 passed unit tests in hadoop-common-project/hadoop-common. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9306//testReport/ Javac warnings: https://builds.apache.org/job/PreCommit-HDFS-Build/9306//artifact/patchprocess/diffJavacWarnings.txt Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9306//console This message is automatically generated.
        Hide
        hitliuyi Yi Liu added a comment -

        The Jenkins report is incorrect, upload the same patch again to re-trigger a new Jenkins.

        Show
        hitliuyi Yi Liu added a comment - The Jenkins report is incorrect, upload the same patch again to re-trigger a new Jenkins.
        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/12694104/HDFS-7659.003.patch
        against trunk revision 3aab354.

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

        +1 tests included. The patch appears to include 1 new or modified test files.

        +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.TestFileTruncate

        Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9310//testReport/
        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9310//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/12694104/HDFS-7659.003.patch against trunk revision 3aab354. +1 @author . The patch does not contain any @author tags. +1 tests included . The patch appears to include 1 new or modified test files. +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.TestFileTruncate Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/9310//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/9310//console This message is automatically generated.
        Hide
        shv Konstantin Shvachko added a comment -

        +1. Looks good.

        Can I ask you to add three lines to TestFileTruncate with this patch, even though it is not ditectly related to your change.
        This will fix TestFileTruncate failures as Tsz Wo Nicholas Sze requested in HDFS-7611. We do not risk to loose the bug since we know the problem now.
        Or we can of course fix it in another jira.
        The lines are as follows just in the very beginning of testTruncateEditLogLoad()

            // purge previously accumulated edits
            fs.setSafeMode(SafeModeAction.SAFEMODE_ENTER);
            fs.saveNamespace();
            fs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
        
        Show
        shv Konstantin Shvachko added a comment - +1. Looks good. Can I ask you to add three lines to TestFileTruncate with this patch, even though it is not ditectly related to your change. This will fix TestFileTruncate failures as Tsz Wo Nicholas Sze requested in HDFS-7611 . We do not risk to loose the bug since we know the problem now. Or we can of course fix it in another jira. The lines are as follows just in the very beginning of testTruncateEditLogLoad() // purge previously accumulated edits fs.setSafeMode(SafeModeAction.SAFEMODE_ENTER); fs.saveNamespace(); fs.setSafeMode(SafeModeAction.SAFEMODE_LEAVE);
        Hide
        shv Konstantin Shvachko added a comment -

        I just committed this. Thank you Yi.

        Show
        shv Konstantin Shvachko added a comment - I just committed this. Thank you Yi.
        Hide
        hudson Hudson added a comment -

        FAILURE: Integrated in Hadoop-trunk-Commit #6924 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6924/)
        HDFS-7659. truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
        • 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-trunk-Commit #6924 (See https://builds.apache.org/job/Hadoop-trunk-Commit/6924/ ) HDFS-7659 . truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Hide
        shv Konstantin Shvachko added a comment -

        Attaching patch for branch-2.

        Show
        shv Konstantin Shvachko added a comment - Attaching patch for branch-2.
        Hide
        shv Konstantin Shvachko added a comment -

        Merged to branch-2.

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

        FAILURE: Integrated in Hadoop-Yarn-trunk-Java8 #84 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/84/)
        HDFS-7659. truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18)

        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
        • 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-Yarn-trunk-Java8 #84 (See https://builds.apache.org/job/Hadoop-Yarn-trunk-Java8/84/ ) HDFS-7659 . truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18) hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java 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-Yarn-trunk #818 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/818/)
        HDFS-7659. truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Yarn-trunk #818 (See https://builds.apache.org/job/Hadoop-Yarn-trunk/818/ ) HDFS-7659 . truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Hdfs-trunk #2016 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2016/)
        HDFS-7659. truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
        • 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 #2016 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/2016/ ) HDFS-7659 . truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        Hide
        hudson Hudson added a comment -

        SUCCESS: Integrated in Hadoop-Hdfs-trunk-Java8 #81 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/81/)
        HDFS-7659. truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • 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-Java8 #81 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Java8/81/ ) HDFS-7659 . truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java 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 #85 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/85/)
        HDFS-7659. truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18)

        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
        • 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 #85 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/85/ ) HDFS-7659 . truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18) hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java 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 #2035 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2035/)
        HDFS-7659. truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18)

        • hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
        • hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java
        • hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Show
        hudson Hudson added a comment - FAILURE: Integrated in Hadoop-Mapreduce-trunk #2035 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/2035/ ) HDFS-7659 . truncate should check negative value of the new length. Contributed by Yi Liu. (shv: rev e9fd46ddbf46954cfda4bb9c33f1789775be9d18) hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestFileTruncate.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/DFSClient.java hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        Hide
        hitliuyi Yi Liu added a comment -

        Thanks Konstantin Shvachko for the review and commit.

        Can I ask you to add three lines to TestFileTruncate with this patch, even though it is not ditectly related to your change.

        Sure. But sorry I didn't get chance to look at the JIRA after you +1, so have not updated the patch before you commit. I see you fix it in HDFS-7676, that's great. Thanks.

        Show
        hitliuyi Yi Liu added a comment - Thanks Konstantin Shvachko for the review and commit. Can I ask you to add three lines to TestFileTruncate with this patch, even though it is not ditectly related to your change. Sure. But sorry I didn't get chance to look at the JIRA after you +1, so have not updated the patch before you commit. I see you fix it in HDFS-7676 , that's great. Thanks.
        Hide
        shv Konstantin Shvachko added a comment -

        No problem. I was just trying to find the most effective way to get it done.

        Show
        shv Konstantin Shvachko added a comment - No problem. I was just trying to find the most effective way to get it done.

          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