Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 0.23.1
    • Fix Version/s: 0.24.0, 0.23.1
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Target Version/s:

      Description

      DFSTestUtil creates files with random sizes, but there is no minimum size. So, sometimes, it can make a file with length 0. This will cause tests that use this functionality to fail - for example, TestListCorruptFileBlocks assumes that each of the created files has at least one block. We should add a minSize parameter to prevent this.

      1. hdfs-2575.txt
        0.9 kB
        Todd Lipcon

        Activity

        Todd Lipcon created issue -
        Hide
        Todd Lipcon added a comment -

        trivial change to make the minSize be 1 byte. I think this should be fine for all of the cases I could find where we use this function. If we need to specify a different minSize later, we can add a setMinSize function.

        Show
        Todd Lipcon added a comment - trivial change to make the minSize be 1 byte. I think this should be fine for all of the cases I could find where we use this function. If we need to specify a different minSize later, we can add a setMinSize function.
        Todd Lipcon made changes -
        Field Original Value New Value
        Attachment hdfs-2575.txt [ 12504474 ]
        Todd Lipcon made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Hide
        Eli Collins added a comment -

        +1 lgtm

        Show
        Eli Collins added a comment - +1 lgtm
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12504474/hdfs-2575.txt
        against trunk revision .

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

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

        +1 javadoc. The javadoc tool did not generate any warning messages.

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

        +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) 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 .

        +1 contrib tests. The patch passed contrib unit tests.

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

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12504474/hdfs-2575.txt against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.9) 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 . +1 contrib tests. The patch passed contrib unit tests. Test results: https://builds.apache.org/job/PreCommit-HDFS-Build/1592//testReport/ Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1592//console This message is automatically generated.
        Todd Lipcon made changes -
        Hadoop Flags Reviewed [ 10343 ]
        Fix Version/s 0.24.0 [ 12317653 ]
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Fix Version/s 0.23.1 [ 12318885 ]
        Resolution Fixed [ 1 ]
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk-Commit #1376 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1376/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk-Commit #1376 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk-Commit/1376/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-0.23-Commit #198 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/198/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-0.23-Commit #198 (See https://builds.apache.org/job/Hadoop-Common-0.23-Commit/198/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #1303 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1303/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #1303 (See https://builds.apache.org/job/Hadoop-Common-trunk-Commit/1303/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Commit #209 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/209/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Commit #209 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Commit/209/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Commit #195 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/195/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Commit #195 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Commit/195/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #1326 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1326/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #1326 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Commit/1326/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #84 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/84/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #84 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/84/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-trunk #871 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/871/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-trunk #871 (See https://builds.apache.org/job/Hadoop-Hdfs-trunk/871/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-0.23-Build #101 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/101/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651
        Files :

        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-0.23-Build #101 (See https://builds.apache.org/job/Hadoop-Mapreduce-0.23-Build/101/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204651 Files : /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #905 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/905/)
        HDFS-2575. DFSTestUtil may create empty files. Contributed by Todd Lipcon.

        todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652
        Files :

        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
        • /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #905 (See https://builds.apache.org/job/Hadoop-Mapreduce-trunk/905/ ) HDFS-2575 . DFSTestUtil may create empty files. Contributed by Todd Lipcon. todd : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1204652 Files : /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt /hadoop/common/trunk/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/DFSTestUtil.java
        Arun C Murthy made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Todd Lipcon
            Reporter:
            Todd Lipcon
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development