Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-1137

StatusHttpServer assumes that resources for /static are in files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.12.1
    • 0.13.0
    • None
    • None

    Description

      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).

      Attachments

        1. StatusHttpServer.patch
          1 kB
          Benjamin Reed

        Activity

          People

            Unassigned Unassigned
            breed Benjamin Reed
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: