You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mapreduce-issues@hadoop.apache.org by "Todd Lipcon (JIRA)" <ji...@apache.org> on 2011/01/11 01:42:45 UTC

[jira] Created: (MAPREDUCE-2253) Servlets should specify content type

Servlets should specify content type
------------------------------------

                 Key: MAPREDUCE-2253
                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
             Project: Hadoop Map/Reduce
          Issue Type: Bug
    Affects Versions: 0.22.0
            Reporter: Todd Lipcon
            Assignee: Todd Lipcon
            Priority: Critical
             Fix For: 0.22.0
         Attachments: mapreduce-2253.txt

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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated MAPREDUCE-2253:
-----------------------------------

    Status: Patch Available  (was: Open)

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Owen O'Malley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12980197#action_12980197 ] 

Owen O'Malley commented on MAPREDUCE-2253:
------------------------------------------

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.

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987177#action_12987177 ] 

Todd Lipcon commented on MAPREDUCE-2253:
----------------------------------------

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

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12993913#comment-12993913 ] 

Hudson commented on MAPREDUCE-2253:
-----------------------------------

Integrated in Hadoop-Mapreduce-22-branch #33 (See [https://hudson.apache.org/hudson/job/Hadoop-Mapreduce-22-branch/33/])
    

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MAPREDUCE-2253) Servlets should specify content type

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13016956#comment-13016956 ] 

Hudson commented on MAPREDUCE-2253:
-----------------------------------

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

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] Updated: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated MAPREDUCE-2253:
-----------------------------------

    Attachment: mapreduce-2253.txt

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.

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated MAPREDUCE-2253:
-----------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated MAPREDUCE-2253:
-----------------------------------

    Attachment: mapreduce-2253.txt

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

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Tom White (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987112#action_12987112 ] 

Tom White commented on MAPREDUCE-2253:
--------------------------------------

+1 The tests are very nice.

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

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Todd Lipcon (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Todd Lipcon updated MAPREDUCE-2253:
-----------------------------------

    Attachment: mapreduce-2253.txt

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

> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (MAPREDUCE-2253) Servlets should specify content type

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/MAPREDUCE-2253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12987191#action_12987191 ] 

Hudson commented on MAPREDUCE-2253:
-----------------------------------

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


> Servlets should specify content type
> ------------------------------------
>
>                 Key: MAPREDUCE-2253
>                 URL: https://issues.apache.org/jira/browse/MAPREDUCE-2253
>             Project: Hadoop Map/Reduce
>          Issue Type: Bug
>    Affects Versions: 0.22.0
>            Reporter: Todd Lipcon
>            Assignee: Todd Lipcon
>            Priority: Critical
>             Fix For: 0.22.0
>
>         Attachments: mapreduce-2253.txt, mapreduce-2253.txt, mapreduce-2253.txt
>
>
> 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

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.