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

Hadoop in-JAR webapps could be served through Resources



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


      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.


        Issue Links



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