Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-11338

HistoryPage not multi-tenancy enabled (app links not prefixed with APPLICATION_WEB_PROXY_BASE)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • Web UI
    • None

    Description

      Links on HistoryPage are not prepended with uiRoot (export APPLICATION_WEB_PROXY_BASE=<uiRoot path>). This makes it impossible/unpractical to expose the History Server in a multi-tenancy environment where each Spark service instance has one history server behind a multi-tenant enabled proxy server. All other Spark web UI pages are correctly prefixed when the APPLICATION_WEB_PROXY_BASE environment variable is set.

      Repro steps:

      1. Configure history log collection:
        conf/spark-defaults.conf
        spark.eventLog.enabled         true
        spark.eventLog.dir             logs/history
        spark.history.fs.logDirectory  logs/history
        

        ...create the logs folders:

        $ mkdir -p logs/history
        
      2. Start the Spark shell and run the word count example:
        $ bin/spark-shell
        ...
        scala> sc.textFile("README.md").flatMap(_.split(" ")).map(w => (w, 1)).reduceByKey(_ + _).collect
        scala> sc.stop
        
      3. Set the web proxy root path path (i.e. /testwebuiproxy/..):
        $ export APPLICATION_WEB_PROXY_BASE=/testwebuiproxy/..
        
      4. Start the history server:
        $  sbin/start-history-server.sh
        
      5. Bring up the History Server web UI at localhost:18080 and view the application link in the HTML source text:
            ...
            <thead><th width="" class="">App ID</th><th width="" class="">App Name</th>...</thead>
              <tbody>
                <tr>
                  <td><a href="/history/local-1445896187531">local-1445896187531</a></td><td>Spark shell</td>
              ...
        

        Notice, application link "/history/local-1445896187531" does not have the prefix /testwebuiproxy/..

        All site-relative links (URL starting with "/") should have been prepended with the uiRoot prefix /testwebuiproxy/.. like this ...

            ...
            <thead><th width="" class="">App ID</th><th width="" class="">App Name</th>...</thead>
              <tbody>
                <tr>
                  <td><a href="/testwebuiproxy/../history/local-1445896187531">local-1445896187531</a></td><td>Spark shell</td>
              ...
        

      Attachments

        Activity

          People

            ckadner Christian Kadner
            ckadner Christian Kadner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified