Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-1334

contrib/index - test - TestIndexUpdater fails due to an additional presence of file _SUCCESS in hdfs

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.23.0
    • Component/s: contrib/index
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      $ cd src/contrib/index
      $ ant clean test

      This fails the test TestIndexUpdater due to a mismatch in the - doneFileNames - data structure, when it is being run with different parameters.

      (ArrayIndexOutOfBoundsException raised when inserting elements in doneFileNames, array ).

      Debugging further - there seems to be an additional file called as - hdfs://localhost:36021/myoutput/_SUCCESS , taken into consideration in addition to those that begins with done* . The presence of the extra file causes the error.

      Attaching a patch that would circumvent this by increasing the array length of shards by 1 .

      But longer term the test fixtures need to be probably revisited to see if the presence of _SUCCESS as a file is a good thing to begin with before we even get to this test case.

      Any comments / suggestions on the same welcome.

      1. MAPREDUCE-1334.patch
        0.8 kB
        Hemanth Yamijala
      2. MAPREDUCE-1334.patch
        1 kB
        Karthik K

        Activity

        Hide
        Karthik K added a comment -

        TestIndexUpdater changed to make the test case pass ( Array Index Error due to the presence of a file called as _SUCCESS ).

        (hdfs://localhost:36021/myoutput/_SUCCESS) .

        Longer term - need to revisit test fixtures before we get here.

        Show
        Karthik K added a comment - TestIndexUpdater changed to make the test case pass ( Array Index Error due to the presence of a file called as _SUCCESS ). (hdfs://localhost:36021/myoutput/_SUCCESS) . Longer term - need to revisit test fixtures before we get here.
        Hide
        Karthik K added a comment -

        This depends on MAPREDUCE-1328 (build/ivy.xml patch ) to run successfully .

        Show
        Karthik K added a comment - This depends on MAPREDUCE-1328 (build/ivy.xml patch ) to run successfully .
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12428949/MAPREDUCE-1334.patch
        against trunk revision 893828.

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

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

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/343/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/343/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/343/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/343/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/12428949/MAPREDUCE-1334.patch against trunk revision 893828. +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 warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. -1 core tests. The patch failed core unit tests. -1 contrib tests. The patch failed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/343/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/343/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/343/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/343/console This message is automatically generated.
        Hide
        Karthik K added a comment -

        This bug ( due to the presence of an extra file , _SUCCESS ) seems to be an artifact of MAPREDUCE-947 .

        May be - trying with FileOutputCommitter.SUCCESSFUL_JOB_OUTPUT_DIR_MARKER to false in Configuration might help.

        Show
        Karthik K added a comment - This bug ( due to the presence of an extra file , _SUCCESS ) seems to be an artifact of MAPREDUCE-947 . May be - trying with FileOutputCommitter.SUCCESSFUL_JOB_OUTPUT_DIR_MARKER to false in Configuration might help.
        Hide
        Karthik K added a comment -

        Set the configuration parameter to not create _SUCCESS on the completion of the job.

        Show
        Karthik K added a comment - Set the configuration parameter to not create _SUCCESS on the completion of the job.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12429081/MAPREDUCE-1334.patch
        against trunk revision 908321.

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

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

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

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

        Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/444/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/444/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/444/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/444/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/12429081/MAPREDUCE-1334.patch against trunk revision 908321. +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 warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/444/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/444/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/444/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Mapreduce-Patch-h6.grid.sp2.yahoo.net/444/console This message is automatically generated.
        Hide
        Hemanth Yamijala added a comment -

        Going over the patch queue. This patch is still fine and fixes the test. There was one unnecessary import of FileOutputCommitter in the patch which I removed. I shall upload a patch with this change.

        Show
        Hemanth Yamijala added a comment - Going over the patch queue. This patch is still fine and fixes the test. There was one unnecessary import of FileOutputCommitter in the patch which I removed. I shall upload a patch with this change.
        Hide
        Hemanth Yamijala added a comment -

        Removed an unnecessary import.

        Show
        Hemanth Yamijala added a comment - Removed an unnecessary import.
        Hide
        Hemanth Yamijala added a comment -

        Twice now, Hudson didn't seem to have picked this patch up.

        Here's the output of test-patch:

        [exec] +1 overall.
        [exec]
        [exec] +1 @author. The patch does not contain any @author tags.
        [exec]
        [exec] +1 tests included. The patch appears to include 3 new or modified tests.
        [exec]
        [exec] +1 javadoc. The javadoc tool did not generate any warning messages.
        [exec]
        [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings.
        [exec]
        [exec] +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.8) warnings.
        [exec]
        [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings.
        [exec]
        [exec] +1 system test framework. The patch passed system test framework compile.

        Since this change only affects the Index contrib project, I ran ant test with the patch on, and it passed

        test:
        [echo] contrib: index
        [delete] Deleting directory /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/logs
        [mkdir] Created dir: /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/logs
        [delete] Deleting directory /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/sample
        [mkdir] Created dir: /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/sample
        [copy] Copying 2 files to /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/sample
        [junit] WARNING: multiple versions of ant detected in path for junit
        [junit] jar:file:/home/yhemanth/software/apache-ant-1.7.1/lib/ant.jar!/org/apache/tools/ant/Project.class
        [junit] and jar:file:/home/yhemanth/commit-workspace/mapreduce/trunk/build/ivy/lib/Hadoop/common/ant-1.6.5.jar!/org/apache/tools/ant/Project.class
        [junit] Running org.apache.hadoop.contrib.index.lucene.TestMixedDirectory
        [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.28 sec
        [junit] Running org.apache.hadoop.contrib.index.mapred.TestDistributionPolicy
        [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 58.314 sec
        [junit] Running org.apache.hadoop.contrib.index.mapred.TestIndexUpdater
        [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 68.195 sec

        Based on this, I will commit the patch.

        Show
        Hemanth Yamijala added a comment - Twice now, Hudson didn't seem to have picked this patch up. Here's the output of test-patch: [exec] +1 overall. [exec] [exec] +1 @author. The patch does not contain any @author tags. [exec] [exec] +1 tests included. The patch appears to include 3 new or modified tests. [exec] [exec] +1 javadoc. The javadoc tool did not generate any warning messages. [exec] [exec] +1 javac. The applied patch does not increase the total number of javac compiler warnings. [exec] [exec] +1 findbugs. The patch does not introduce any new Findbugs (version 1.3.8) warnings. [exec] [exec] +1 release audit. The applied patch does not increase the total number of release audit warnings. [exec] [exec] +1 system test framework. The patch passed system test framework compile. Since this change only affects the Index contrib project, I ran ant test with the patch on, and it passed test: [echo] contrib: index [delete] Deleting directory /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/logs [mkdir] Created dir: /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/logs [delete] Deleting directory /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/sample [mkdir] Created dir: /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/sample [copy] Copying 2 files to /home/yhemanth/commit-workspace/mapreduce/trunk/build/contrib/index/test/sample [junit] WARNING: multiple versions of ant detected in path for junit [junit] jar: file:/home/yhemanth/software/apache-ant-1.7.1/lib/ant.jar!/org/apache/tools/ant/Project.class [junit] and jar: file:/home/yhemanth/commit-workspace/mapreduce/trunk/build/ivy/lib/Hadoop/common/ant-1.6.5.jar!/org/apache/tools/ant/Project.class [junit] Running org.apache.hadoop.contrib.index.lucene.TestMixedDirectory [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.28 sec [junit] Running org.apache.hadoop.contrib.index.mapred.TestDistributionPolicy [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 58.314 sec [junit] Running org.apache.hadoop.contrib.index.mapred.TestIndexUpdater [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 68.195 sec Based on this, I will commit the patch.
        Hide
        Hemanth Yamijala added a comment -

        I just committed this. Thanks, Kay Kay.

        Show
        Hemanth Yamijala added a comment - I just committed this. Thanks, Kay Kay.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk #643 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk/643/)

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk #643 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk/643/ )

          People

          • Assignee:
            Karthik K
            Reporter:
            Karthik K
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development