Details

    • Type: Test Test
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.22.0
    • Fix Version/s: None
    • Component/s: datanode, test
    • Labels:
      None

      Description

      FSDataset doesn't currently have a unit-test that tests it in isolation of the DN or a cluster. A test specifically for this class will be helpful for developing HDFS-788

      1. hdfs-827.patch
        34 kB
        Konstantin Boudnik
      2. hdfs-827.txt
        34 kB
        Todd Lipcon

        Activity

        Hide
        Todd Lipcon added a comment -

        Found this patch from long ago. This adds a set of unit tests for FSDataset (runs in about a second).

        There are a number of things I found suspicious in this test, marked with XXX. It's worth looking into these to see if they represent bugs.

        Show
        Todd Lipcon added a comment - Found this patch from long ago. This adds a set of unit tests for FSDataset (runs in about a second). There are a number of things I found suspicious in this test, marked with XXX. It's worth looking into these to see if they represent bugs.
        Hide
        Konstantin Boudnik added a comment -

        If they so fast shall they be moved to src/test/unit instead?

        Show
        Konstantin Boudnik added a comment - If they so fast shall they be moved to src/test/unit instead?
        Hide
        Todd Lipcon added a comment -

        I suppose so - I never remember to look in src/test/unit, though. What's the purpose of the distinction there? We have some tests there that take much longer than a second (eg TestBlockRecovery), and many tests in src/test/hdfs that are near instant.

        To be clear, I understand the distinction between unit and functional test, but not how it actually makes a difference in our build

        Show
        Todd Lipcon added a comment - I suppose so - I never remember to look in src/test/unit, though. What's the purpose of the distinction there? We have some tests there that take much longer than a second (eg TestBlockRecovery), and many tests in src/test/hdfs that are near instant. To be clear, I understand the distinction between unit and functional test, but not how it actually makes a difference in our build
        Hide
        Konstantin Boudnik added a comment -

        The difference is timing mostly and a chance to finally organize test structure to be correct

        Show
        Konstantin Boudnik added a comment - The difference is timing mostly and a chance to finally organize test structure to be correct
        Hide
        Hadoop QA added a comment -

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

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

        +1 tests included. The patch appears to include 11 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 failed these core unit tests:
        org.apache.hadoop.hdfs.server.datanode.TestBlockRecovery
        org.apache.hadoop.hdfs.TestFileConcurrentReader

        -1 contrib tests. The patch failed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/202//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/202//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/202//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/12467234/hdfs-827.txt against trunk revision 1072023. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 11 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 failed these core unit tests: org.apache.hadoop.hdfs.server.datanode.TestBlockRecovery org.apache.hadoop.hdfs.TestFileConcurrentReader -1 contrib tests. The patch failed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/202//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/202//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/202//console This message is automatically generated.
        Hide
        Konstantin Boudnik added a comment -

        Todd, the change in src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInPipeline.java

        +    int bytesPerChunk = checksum.getBytesPerChecksum();
        +    int checksumSize = checksum.getChecksumSize();
        

        causes NPE if DataChecksum.newDataChecksum

        Show
        Konstantin Boudnik added a comment - Todd, the change in src/java/org/apache/hadoop/hdfs/server/datanode/ReplicaInPipeline.java + int bytesPerChunk = checksum.getBytesPerChecksum(); + int checksumSize = checksum.getChecksumSize(); causes NPE if DataChecksum.newDataChecksum
        Hide
        Konstantin Boudnik added a comment -

        I have rebased it against current trunk

        Show
        Konstantin Boudnik added a comment - I have rebased it against current trunk
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12475262/hdfs-827.patch
        against trunk revision 1094748.

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

        +1 tests included. The patch appears to include 11 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 failed these core unit tests:
        org.apache.hadoop.hdfs.server.datanode.TestBlockRecovery
        org.apache.hadoop.hdfs.TestFileConcurrentReader

        -1 contrib tests. The patch failed contrib unit tests.

        +1 system test framework. The patch passed system test framework compile.

        Test results: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/388//testReport/
        Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/388//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/388//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/12475262/hdfs-827.patch against trunk revision 1094748. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 11 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 failed these core unit tests: org.apache.hadoop.hdfs.server.datanode.TestBlockRecovery org.apache.hadoop.hdfs.TestFileConcurrentReader -1 contrib tests. The patch failed contrib unit tests. +1 system test framework. The patch passed system test framework compile. Test results: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/388//testReport/ Findbugs warnings: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/388//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: https://hudson.apache.org/hudson/job/PreCommit-HDFS-Build/388//console This message is automatically generated.
        Hide
        Uma Maheswara Rao G added a comment -

        I think, we need to re-base this patch against to latest trunk! As we have re-factored the FsDataSet impls to separate package.

        Show
        Uma Maheswara Rao G added a comment - I think, we need to re-base this patch against to latest trunk! As we have re-factored the FsDataSet impls to separate package.

          People

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

            Dates

            • Created:
              Updated:

              Development