Hadoop HDFS
  1. Hadoop HDFS
  2. HDFS-2344

Fix the TestOfflineEditsViewer test failure in 0.23 branch

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.23.0
    • Fix Version/s: 0.23.0
    • Component/s: test
    • Labels:
      None

      Description

      TestOfflineEditsViewer test fails in 0.23 branch

      1. HDFS-2344.patch
        2 kB
        Uma Maheswara Rao G

        Activity

        Hide
        Uma Maheswara Rao G added a comment -

        some info:

        Error Message

        Reference XML edits and parsed to XML should be same

        Stacktrace

        java.lang.AssertionError: Reference XML edits and parsed to XML should be same
        at org.junit.Assert.fail(Assert.java:91)
        at org.junit.Assert.assertTrue(Assert.java:43)
        at org.apache.hadoop.hdfs.tools.offlineEditsViewer.TestOfflineEditsViewer.__CLR3_0_2yzsf441i38(TestOfflineEditsViewer.java:140)
        at org.apache.hadoop.hdfs.tools.offlineEditsViewer.TestOfflineEditsViewer.testStored(TestOfflineEditsViewer.java:120)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
        at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
        at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
        at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
        at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
        at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
        at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
        at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
        at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
        at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
        at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
        at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
        at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
        at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:145)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:104)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017)

        This is already addressed in trunk.

        Show
        Uma Maheswara Rao G added a comment - some info: Error Message Reference XML edits and parsed to XML should be same Stacktrace java.lang.AssertionError: Reference XML edits and parsed to XML should be same at org.junit.Assert.fail(Assert.java:91) at org.junit.Assert.assertTrue(Assert.java:43) at org.apache.hadoop.hdfs.tools.offlineEditsViewer.TestOfflineEditsViewer.__CLR3_0_2yzsf441i38(TestOfflineEditsViewer.java:140) at org.apache.hadoop.hdfs.tools.offlineEditsViewer.TestOfflineEditsViewer.testStored(TestOfflineEditsViewer.java:120) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:145) at org.apache.maven.surefire.Surefire.run(Surefire.java:104) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1017) This is already addressed in 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/12494938/HDFS-2344.patch
        against trunk revision .

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

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

        -1 patch. The patch command could not apply the patch.

        Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1264//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/12494938/HDFS-2344.patch against trunk revision . +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 9 new or modified tests. -1 patch. The patch command could not apply the patch. Console output: https://builds.apache.org/job/PreCommit-HDFS-Build/1264//console This message is automatically generated.
        Hide
        Matt Foley added a comment -

        Hi Uma,
        +1 on the filename fix in the pom.
        1 on removing the Apache License header from editsStored.xml, unless I'm misunderstanding something. Why did you think it had to be removed? It is in an XML comment ( <!- ... --> notation) and correctly placed AFTER the xml version line, so it should be conforming and not cause any problem.

        Remove that part of the patch (or tell me why I'm wrong) and I'll commit.
        Thanks.

        Show
        Matt Foley added a comment - Hi Uma, +1 on the filename fix in the pom. 1 on removing the Apache License header from editsStored.xml, unless I'm misunderstanding something. Why did you think it had to be removed? It is in an XML comment ( <! - ... --> notation) and correctly placed AFTER the xml version line, so it should be conforming and not cause any problem. Remove that part of the patch (or tell me why I'm wrong) and I'll commit. Thanks.
        Hide
        Uma Maheswara Rao G added a comment -

        Hi Matt,

        Thanks alot for taking a look.
        That is the test case fix. This testcase will generate the editLogs parsed result and will compare with this existing editsStored.xml content. Because of this header, the number of bytes and contents will differ. So, the testcase is failing.

        pom.xml change is some typo mistake. If we dont have apache header it will raise release audit warning. To exclude that release audit warnings, we can add the entries in pom.xml.

        Regards,
        Uma

        Show
        Uma Maheswara Rao G added a comment - Hi Matt, Thanks alot for taking a look. That is the test case fix. This testcase will generate the editLogs parsed result and will compare with this existing editsStored.xml content. Because of this header, the number of bytes and contents will differ. So, the testcase is failing. pom.xml change is some typo mistake. If we dont have apache header it will raise release audit warning. To exclude that release audit warnings, we can add the entries in pom.xml. Regards, Uma
        Hide
        Matt Foley added a comment -

        Agreed. Since a better solution would take significant effort, and this test failure is false and therefore needs immediate solution, I accept your patch. However, I have opened for future improvement:
        HDFS-2352 "improve TestOfflineEditsViewer to accomodate comment in editsStored.xml, for Apache license header".

        Show
        Matt Foley added a comment - Agreed. Since a better solution would take significant effort, and this test failure is false and therefore needs immediate solution, I accept your patch. However, I have opened for future improvement: HDFS-2352 "improve TestOfflineEditsViewer to accomodate comment in editsStored.xml, for Apache license header".
        Hide
        Matt Foley added a comment -

        committed to v0.23. Already in trunk.
        Thanks, Uma!

        Show
        Matt Foley added a comment - committed to v0.23. Already in trunk. Thanks, Uma!
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Hdfs-0.23-Build #15 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/15/)
        HDFS-2344. Fix the TestOfflineEditsViewer test failure in 0.23 branch. Contributed by Uma Maheswara Rao G.

        mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1173285
        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/pom.xml
        • /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored.xml
        Show
        Hudson added a comment - Integrated in Hadoop-Hdfs-0.23-Build #15 (See https://builds.apache.org/job/Hadoop-Hdfs-0.23-Build/15/ ) HDFS-2344 . Fix the TestOfflineEditsViewer test failure in 0.23 branch. Contributed by Uma Maheswara Rao G. mattf : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1173285 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/pom.xml /hadoop/common/branches/branch-0.23/hadoop-hdfs-project/hadoop-hdfs/src/test/resources/editsStored.xml

          People

          • Assignee:
            Uma Maheswara Rao G
            Reporter:
            Uma Maheswara Rao G
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development