Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.22.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      HADOOP-7093 will change the default content-type to text/plain. So TaskLogServlet, which outputs HTML, needs to change to specify this content type. I believe the other HTML servlets already correctly specify a content type. The MapOutputServlet appears to specify no content type and work fine without one, but to be "correct" we may as well specify application/octet-stream

      1. mapreduce-2253.txt
        1 kB
        Todd Lipcon
      2. mapreduce-2253.txt
        8 kB
        Todd Lipcon
      3. mapreduce-2253.txt
        9 kB
        Todd Lipcon

        Issue Links

          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-22-branch #33 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-22-branch/33/)

          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-22-branch #33 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-22-branch/33/ )
          Hide
          Hudson added a comment -

          Integrated in Hadoop-Mapreduce-trunk-Commit #586 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/586/)
          MAPREDUCE-2253. Servlets should specify content type. Contributed by Todd Lipcon

          Show
          Hudson added a comment - Integrated in Hadoop-Mapreduce-trunk-Commit #586 (See https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-trunk-Commit/586/ ) MAPREDUCE-2253 . Servlets should specify content type. Contributed by Todd Lipcon
          Hide
          Todd Lipcon added a comment -

          I thought * imports were OK for things like junit and Mockito in tests? Looking at the current tests, we actually use Assert.* in 37 files and Assert.individualStuff in only 14.

          Will commit momentarily, thanks for review

          Show
          Todd Lipcon added a comment - I thought * imports were OK for things like junit and Mockito in tests? Looking at the current tests, we actually use Assert.* in 37 files and Assert.individualStuff in only 14. Will commit momentarily, thanks for review
          Hide
          Tom White added a comment -

          +1 The tests are very nice.

          Very minor nit: don't use a star import in the test.

          Show
          Tom White added a comment - +1 The tests are very nice. Very minor nit: don't use a star import in the test.
          Hide
          Todd Lipcon added a comment -

          Fixed patch to include license header on new test, removed some unused imports.

          Show
          Todd Lipcon added a comment - Fixed patch to include license header on new test, removed some unused imports.
          Hide
          Todd Lipcon added a comment -

          Here's a new version that includes a unit test for TaskLogServlet (not just the content type but also some of the escaping behavior, etc). I pulled in Jetty's ServletTester libs into our test ivy conf.

          Hopefully this test will serve as an example for how to test servlets using this library and we can add some tests for other servlets as part of other jiras.

          Show
          Todd Lipcon added a comment - Here's a new version that includes a unit test for TaskLogServlet (not just the content type but also some of the escaping behavior, etc). I pulled in Jetty's ServletTester libs into our test ivy conf. Hopefully this test will serve as an example for how to test servlets using this library and we can add some tests for other servlets as part of other jiras.
          Hide
          Owen O'Malley added a comment -

          Would it work to just create a TaskTracker, poke at the data structures as if a task had run and create the task logs and map outputs, and use http client to get the content type? There would be a lot of value in adding that kind of test.

          Show
          Owen O'Malley added a comment - Would it work to just create a TaskTracker, poke at the data structures as if a task had run and create the task logs and map outputs, and use http client to get the content type? There would be a lot of value in adding that kind of test.
          Hide
          Todd Lipcon added a comment -

          No tests included because there is no test infrastructure for verifying this. I manually tested on a pseudo-distributed cluster.

          Show
          Todd Lipcon added a comment - No tests included because there is no test infrastructure for verifying this. I manually tested on a pseudo-distributed cluster.

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development