Uploaded image for project: 'Apache Knox'
  1. Apache Knox
  2. KNOX-414

WebHDFS HA enablement in web.xml is sensitive to order of context listeners

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.5.0
    • 0.5.0
    • Server
    • None

    Description

      Depending on how the web.xml gets generated, the HaServletContextListener may come after the UrlRewriteServletContextListener, in which case the provider is not available to the rewrite framework on initialization and HA functionality does not work.

      The web.xml config that works is:

      <listener>
      <listener-class>org.apache.hadoop.gateway.services.GatewayServicesContextListener</listener-class>
      </listener>
      <listener>
      <listener-class>org.apache.hadoop.gateway.ha.provider.HaServletContextListener</listener-class>
      </listener>
      <context-param>
      <param-name>haDescriptorLocation</param-name>
      <param-value>/WEB-INF/ha.xml</param-value>
      </context-param>
      <listener>
      <listener-class>org.apache.hadoop.gateway.filter.rewrite.api.UrlRewriteServletContextListener</listener-class>
      </listener>
      <context-param>
      <param-name>rewriteDescriptorLocation</param-name>
      <param-value>/WEB-INF/rewrite.xml</param-value>
      </context-param>

      but there is no guarantee in place that the web.xml will be generated as such.

      Attachments

        1. KNOX-414.patch
          7 kB
          Sumit Gupta

        Activity

          People

            sumit.gupta Sumit Gupta
            sumit.gupta Sumit Gupta
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: