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

TestSubmitJob triggers NPE instead of permissions error

    Details

    • Type: Test Test
    • Status: Resolved
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: test
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      TestSubmitJob.testSecureJobExecution catches any IOException and assumes a permissions error has been caught. In fact, it was passing an invalid path name to the NameNode and triggering an NPE, not a Permission denied error, in one case, but the test was not specific enough to detect this.

        Activity

        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/ )
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Mapreduce-trunk-Commit #534 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/534/)
        MAPREDUCE-2034. TestSubmitJob triggers NPE instead of permissions error. Contributed by Todd Lipcon.

        Show
        Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #534 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/534/ ) MAPREDUCE-2034 . TestSubmitJob triggers NPE instead of permissions error. Contributed by Todd Lipcon.
        Hide
        Tom White added a comment -

        I've just committed this. Thanks Todd!

        Show
        Tom White added a comment - I've just committed this. Thanks Todd!
        Hide
        Todd Lipcon added a comment -

        Test patch result:

        [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 appears to introduce 13 new Findbugs warnings.
        [exec]
        [exec] -1 release audit. The applied patch generated 2 release audit warnings (more than the trunk's current 1 warnings).
        [exec]
        [exec] +1 system test framework. The patch passed system test framework compile.

        I checked the release audit and findbugs, and it seems like an issue with the test-patch script – in both cases the "new" warnings were unrelated to the patch.

        Show
        Todd Lipcon added a comment - Test patch result: [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 appears to introduce 13 new Findbugs warnings. [exec] [exec] -1 release audit. The applied patch generated 2 release audit warnings (more than the trunk's current 1 warnings). [exec] [exec] +1 system test framework. The patch passed system test framework compile. I checked the release audit and findbugs, and it seems like an issue with the test-patch script – in both cases the "new" warnings were unrelated to the patch.
        Hide
        Tom White added a comment -

        +1 looks good. Can you run test-patch for it?

        Show
        Tom White added a comment - +1 looks good. Can you run test-patch for it?
        Hide
        Todd Lipcon added a comment -

        Patch fixes the test to actually look for a "Permission denied" IOE, and then fixes the getListing call itself to just pass a path instead of the whole URL - it was previously passing hdfs://... which generated an assertion failure on the NN side (or an NPE in 0.20).

        Show
        Todd Lipcon added a comment - Patch fixes the test to actually look for a "Permission denied" IOE, and then fixes the getListing call itself to just pass a path instead of the whole URL - it was previously passing hdfs://... which generated an assertion failure on the NN side (or an NPE in 0.20).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development