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

Hadoop in-JAR webapps could be served through Resources

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 0.22.0
    • None
    • None
    • None

    Description

      I'm going to mention this as the root cause for HADOOP-6461 and HDFS-155, but not (yet) supply any patch.

      Hadoop sets up Jetty to serve in-JAR content as a web application context, for which it needs a path on the local FS. This leads to problems

      • HDFS-155: locating the JAR can be tricky
      • HADOOP-6461 resources shared across JARs don't get picked up. Only one JAR will get located and used, possibly the wrong one.

      The solution is relatively straightforward, use Jetty's Resource code to serve up resources, and ResourceHandler to handle it. I say relatively as the only way I've used it is to bypass Jetty's WebAppContext, go straight to Context, add my own handlers for everything and then invest time working out that you need to get the order just right or servlets don't work. It does eliminate web.xml for webapp setup, makes it all programmatic, which is actually quite convenient.

      I propose that such a change awaits having a thorough set of tests for the Html and JSP pages of every service. This will catch regression.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              stevel@apache.org Steve Loughran
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: