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

stage web URI will redirect to the wrong location if it is the first URI from the application to be requested from the history server

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.5.1
    • Fix Version/s: 1.6.0, 2.0.0
    • Component/s: Web UI
    • Labels:
      None

      Description

      In the history server when we open an application link for the first time, it loads the app and registers the app UI and sends a redirect to the URI that was requested.

      The code to send the redirect is:
      res.sendRedirect(res.encodeRedirectURL(req.getRequestURI()))

      However req.getRequestURI() is not the complete URI that was requested, it doesn't contain the query string.

      Stage URIs are of the following form:
      http://localhost:18080/history/application_1449188824095_0001/stages/stage/?id=0&attempt=0

      When such a URI is the first URI from the application to be requested, it redirects to a URI like:
      http://localhost:18080/history/application_1449188824095_0001/stages/stage/

      which errors with

      HTTP ERROR 400
      
      Problem accessing /history/application_1449188824095_0001/stages/stage/. Reason:
      
          requirement failed: Missing id parameter
      
      Powered by Jetty://
      

      This is not a frequent occurrence because you usually navigate to the stage URI after you have navigated to some other URI belonging to the application and then this will not happen, only when the stage URI is the first URI from the application to be requested from the history server will you see this issue.

        Attachments

          Activity

            People

            • Assignee:
              ragarwal Rohit Agarwal
              Reporter:
              ragarwal Rohit Agarwal
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: