You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Benjamin Reed (JIRA)" <ji...@apache.org> on 2007/03/21 18:41:32 UTC

[jira] Created: (HADOOP-1137) StatusHttpServer assumes that resources for /static are in files

StatusHttpServer assumes that resources for /static are in files
----------------------------------------------------------------

                 Key: HADOOP-1137
                 URL: https://issues.apache.org/jira/browse/HADOOP-1137
             Project: Hadoop
          Issue Type: Bug
          Components: mapred
    Affects Versions: 0.12.1
            Reporter: Benjamin Reed
             Fix For: 0.13.0, 0.12.1, 0.12.0


StatusHttpServer uses ClassLoader.getResource() to find the webapps, but then assumes it is a file URL and extracts the filename. This requires the webapps resources to be in files even though they can be loaded from the classpath. If the webapps resources are not in files, but packaged in a jar file for example, things will not work.

The fix is extremely simple. The String returned from getWebAppsPath() is passed to Jetty which is then later converted back into a URL before it is used. We just need to return the URL as a string. (Since it is a URL we should not use the File.separator).

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


[jira] Updated: (HADOOP-1137) StatusHttpServer assumes that resources for /static are in files

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

Nigel Daley updated HADOOP-1137:
--------------------------------

    Fix Version/s:     (was: 0.12.1)
                       (was: 0.12.0)

> StatusHttpServer assumes that resources for /static are in files
> ----------------------------------------------------------------
>
>                 Key: HADOOP-1137
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1137
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.12.1
>            Reporter: Benjamin Reed
>             Fix For: 0.13.0
>
>         Attachments: StatusHttpServer.patch
>
>
> StatusHttpServer uses ClassLoader.getResource() to find the webapps, but then assumes it is a file URL and extracts the filename. This requires the webapps resources to be in files even though they can be loaded from the classpath. If the webapps resources are not in files, but packaged in a jar file for example, things will not work.
> The fix is extremely simple. The String returned from getWebAppsPath() is passed to Jetty which is then later converted back into a URL before it is used. We just need to return the URL as a string. (Since it is a URL we should not use the File.separator).

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


[jira] Updated: (HADOOP-1137) StatusHttpServer assumes that resources for /static are in files

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

Benjamin Reed updated HADOOP-1137:
----------------------------------

    Attachment: StatusHttpServer.patch

> StatusHttpServer assumes that resources for /static are in files
> ----------------------------------------------------------------
>
>                 Key: HADOOP-1137
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1137
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.12.1
>            Reporter: Benjamin Reed
>             Fix For: 0.12.0, 0.12.1, 0.13.0
>
>         Attachments: StatusHttpServer.patch
>
>
> StatusHttpServer uses ClassLoader.getResource() to find the webapps, but then assumes it is a file URL and extracts the filename. This requires the webapps resources to be in files even though they can be loaded from the classpath. If the webapps resources are not in files, but packaged in a jar file for example, things will not work.
> The fix is extremely simple. The String returned from getWebAppsPath() is passed to Jetty which is then later converted back into a URL before it is used. We just need to return the URL as a string. (Since it is a URL we should not use the File.separator).

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


[jira] Updated: (HADOOP-1137) StatusHttpServer assumes that resources for /static are in files

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

Doug Cutting updated HADOOP-1137:
---------------------------------

    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

I just committed this.  Thanks, Ben!

> StatusHttpServer assumes that resources for /static are in files
> ----------------------------------------------------------------
>
>                 Key: HADOOP-1137
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1137
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.12.1
>            Reporter: Benjamin Reed
>             Fix For: 0.13.0
>
>         Attachments: StatusHttpServer.patch
>
>
> StatusHttpServer uses ClassLoader.getResource() to find the webapps, but then assumes it is a file URL and extracts the filename. This requires the webapps resources to be in files even though they can be loaded from the classpath. If the webapps resources are not in files, but packaged in a jar file for example, things will not work.
> The fix is extremely simple. The String returned from getWebAppsPath() is passed to Jetty which is then later converted back into a URL before it is used. We just need to return the URL as a string. (Since it is a URL we should not use the File.separator).

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


[jira] Updated: (HADOOP-1137) StatusHttpServer assumes that resources for /static are in files

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

Benjamin Reed updated HADOOP-1137:
----------------------------------

    Status: Patch Available  (was: Open)

> StatusHttpServer assumes that resources for /static are in files
> ----------------------------------------------------------------
>
>                 Key: HADOOP-1137
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1137
>             Project: Hadoop
>          Issue Type: Bug
>          Components: mapred
>    Affects Versions: 0.12.1
>            Reporter: Benjamin Reed
>             Fix For: 0.13.0, 0.12.1, 0.12.0
>
>         Attachments: StatusHttpServer.patch
>
>
> StatusHttpServer uses ClassLoader.getResource() to find the webapps, but then assumes it is a file URL and extracts the filename. This requires the webapps resources to be in files even though they can be loaded from the classpath. If the webapps resources are not in files, but packaged in a jar file for example, things will not work.
> The fix is extremely simple. The String returned from getWebAppsPath() is passed to Jetty which is then later converted back into a URL before it is used. We just need to return the URL as a string. (Since it is a URL we should not use the File.separator).

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