You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by vijoshi <gi...@git.apache.org> on 2016/11/02 23:44:57 UTC

[GitHub] spark pull request #15742: initial commit

GitHub user vijoshi opened a pull request:

    https://github.com/apache/spark/pull/15742

    initial commit

    ## What changes were proposed in this pull request?
    
    Application links generated on the history server UI no longer (regression from 1.6) contain the configured spark.ui.proxyBase in the links. To address this, made the uiRoot available globally to all javascripts for Web UI. Updated the mustache template (historypage-template.html) to include the uiroot for rendering links to the applications. 
    
    The existing test was not sufficient to verify the scenario where ajax call is used to populate the application listing template, so added a new selenium test case to cover this scenario.
    
    ## How was this patch tested?
    
    Existing tests and a new unit test. 
    No visual changes to the UI.
    
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vijoshi/spark SPARK-16808_master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/15742.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #15742
    
----
commit d00a7ff66a89069930077f84b5f77a3d23e74c14
Author: Vinayak <vi...@in.ibm.com>
Date:   2016-11-02T20:34:08Z

    initial commit

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68212 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68212/consoleFull)** for PR 15742 at commit [`4a443c5`](https://github.com/apache/spark/commit/4a443c5198cf65d506ee3c133a4373106025193d).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    @vanzin @ajbozarth besides your review comments, I noticed that the test case was getting blocked in the `after { }` where the history server is stopped. Tracked it to Jetty waiting for 30 secs for graceful killing of open connections. Not needed during testing, so added a change for that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15742#discussion_r86711698
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala ---
    @@ -143,6 +143,12 @@ class HistoryServer(
         appCache.stop()
       }
     
    +  // For testing - override stop timeout used by jetty
    +  private[history] def setStopTimeout(timeout: Long): Unit = {
    --- End diff --
    
    this was 30 secs additional for just the one test i added. if more such tests are added the time would add up - so i felt the option to bypass the wait was useful to have. assuming more of the UI could transition to ajax etc I could move this utility function up into the base `WebUI` class so it's available more generally for future UI tests - not just history server?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15742#discussion_r86662740
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala ---
    @@ -275,6 +277,79 @@ class HistoryServerSuite extends SparkFunSuite with BeforeAndAfter with Matchers
         all (siteRelativeLinks) should startWith (uiRoot)
       }
     
    +  test("ajax rendered relative links are prefixed with uiRoot (spark.ui.proxyBase)") {
    +
    +    val proxyBaseBeforeTest = System.getProperty("spark.ui.proxyBase")
    +    val uiRoot = "/testwebproxybase"
    +    System.setProperty("spark.ui.proxyBase", uiRoot)
    --- End diff --
    
    I do need to use system properties as that's how this particular property seems to work. The test suite `HistoryServerSuite` already uses `ResetSystemProperties`, so I have fixed the tests to not try to store/reset system properties on their own.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68354 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68354/consoleFull)** for PR 15742 at commit [`fcc779d`](https://github.com/apache/spark/commit/fcc779d111bed99d3701a2f47a448c3a199e214c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68146/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68366/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    @vanzin @mariobriggs Opened https://github.com/apache/spark/pull/15855 for merging to branch-2.0


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15742#discussion_r86662723
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala ---
    @@ -275,6 +277,79 @@ class HistoryServerSuite extends SparkFunSuite with BeforeAndAfter with Matchers
         all (siteRelativeLinks) should startWith (uiRoot)
       }
     
    +  test("ajax rendered relative links are prefixed with uiRoot (spark.ui.proxyBase)") {
    +
    +    val proxyBaseBeforeTest = System.getProperty("spark.ui.proxyBase")
    +    val uiRoot = "/testwebproxybase"
    +    System.setProperty("spark.ui.proxyBase", uiRoot)
    +
    +    server.stop()
    +
    +    val conf = new SparkConf()
    +      .set("spark.history.fs.logDirectory", logDir)
    +      .set("spark.history.fs.update.interval", "0")
    +      .set("spark.testing", "true")
    +
    +    provider = new FsHistoryProvider(conf)
    +    provider.checkForLogs()
    +    val securityManager = new SecurityManager(conf)
    +
    +    server = new HistoryServer(conf, provider, securityManager, 18080)
    +    server.initialize()
    +    server.bind()
    +    val port = server.boundPort
    +
    +    val servlet = new ProxyServlet {
    +      override def rewriteTarget(request: HttpServletRequest): String = {
    +        // servlet acts like a proxy that redirects calls made on
    +        // spark.ui.proxyBase context path to the normal servlet handlers operating off "/"
    +        val sb = request.getRequestURL()
    +
    +        if (request.getQueryString() != null) {
    +          sb.append (s"?${request.getQueryString()}")
    +        }
    +
    +        val proxyidx = sb.indexOf(uiRoot)
    +        sb.delete(proxyidx, proxyidx + uiRoot.length).toString
    +      }
    +    }
    +
    +    val contextHandler = new ServletContextHandler
    +    val holder = new ServletHolder(servlet)
    +    contextHandler.setContextPath(uiRoot)
    +    contextHandler.addServlet(holder, "/")
    +    server.attachHandler(contextHandler)
    +
    +    implicit val webDriver: WebDriver = new HtmlUnitDriver (true) {
    +      getWebClient.getOptions.setThrowExceptionOnScriptError(false)
    +    }
    +
    +    val url = s"http://localhost:$port"
    +
    +    go to s"$url$uiRoot"
    +
    +    // expect the ajax call to finish in 5 seconds
    +    implicitlyWait(org.scalatest.time.Span(5, org.scalatest.time.Seconds))
    +
    +    // once this findAll call returns, we know the ajax load of the table completed
    +    findAll (ClassNameQuery("odd"))
    --- End diff --
    
    fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68318/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68318 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68318/consoleFull)** for PR 15742 at commit [`a7e380d`](https://github.com/apache/spark/commit/a7e380d1a59ef31db2225dd37f21df49edd3a094).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68238 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68238/consoleFull)** for PR 15742 at commit [`4a443c5`](https://github.com/apache/spark/commit/4a443c5198cf65d506ee3c133a4373106025193d).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merging to master / 2.1.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    retest this please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68212 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68212/consoleFull)** for PR 15742 at commit [`4a443c5`](https://github.com/apache/spark/commit/4a443c5198cf65d506ee3c133a4373106025193d).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by ajbozarth <gi...@git.apache.org>.
Github user ajbozarth commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15742#discussion_r86672775
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala ---
    @@ -143,6 +143,12 @@ class HistoryServer(
         appCache.stop()
       }
     
    +  // For testing - override stop timeout used by jetty
    +  private[history] def setStopTimeout(timeout: Long): Unit = {
    --- End diff --
    
    I think that adding a function just to speed up tests by 30sec is unnecessary additional code in this case


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68052 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68052/consoleFull)** for PR 15742 at commit [`0584339`](https://github.com/apache/spark/commit/05843396d064f0f80107eb912449a0cbc8e734d9).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68204 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68204/consoleFull)** for PR 15742 at commit [`e314450`](https://github.com/apache/spark/commit/e314450a75c1c4113c945aeb4d0bb0ddd2dec62d).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    It doesn't merge cleanly into branch-2.0. You can file a separate PR if you want it fixed there.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68354 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68354/consoleFull)** for PR 15742 at commit [`fcc779d`](https://github.com/apache/spark/commit/fcc779d111bed99d3701a2f47a448c3a199e214c).
     * This patch **fails from timeout after a configured wait of \`250m\`**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    LGTM pending tests.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by ajbozarth <gi...@git.apache.org>.
Github user ajbozarth commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Nice catch, from a quick look this seems good. My issue is one of consistency, in previous changes I've made I've used a setter rather that declaring a var on the scala side. I think using a default val and a setter is safer than checking for undefined. An example can be seen at the top of `historyserver.js`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15742#discussion_r87055661
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala ---
    @@ -258,23 +260,92 @@ class HistoryServerSuite extends SparkFunSuite with BeforeAndAfter with Matchers
         getContentAndCode("foobar")._1 should be (HttpServletResponse.SC_NOT_FOUND)
       }
     
    -  test("relative links are prefixed with uiRoot (spark.ui.proxyBase)") {
    -    val proxyBaseBeforeTest = System.getProperty("spark.ui.proxyBase")
    +  test("static relative links are prefixed with uiRoot (spark.ui.proxyBase)") {
         val uiRoot = Option(System.getenv("APPLICATION_WEB_PROXY_BASE")).getOrElse("/testwebproxybase")
         val page = new HistoryPage(server)
         val request = mock[HttpServletRequest]
     
         // when
         System.setProperty("spark.ui.proxyBase", uiRoot)
         val response = page.render(request)
    -    System.setProperty("spark.ui.proxyBase", Option(proxyBaseBeforeTest).getOrElse(""))
     
         // then
         val urls = response \\ "@href" map (_.toString)
         val siteRelativeLinks = urls filter (_.startsWith("/"))
         all (siteRelativeLinks) should startWith (uiRoot)
       }
     
    +  test("ajax rendered relative links are prefixed with uiRoot (spark.ui.proxyBase)") {
    +    val uiRoot = "/testwebproxybase"
    +    System.setProperty("spark.ui.proxyBase", uiRoot)
    +
    +    server.stop()
    +
    +    val conf = new SparkConf()
    +      .set("spark.history.fs.logDirectory", logDir)
    +      .set("spark.history.fs.update.interval", "0")
    +      .set("spark.testing", "true")
    +
    +    provider = new FsHistoryProvider(conf)
    +    provider.checkForLogs()
    +    val securityManager = new SecurityManager(conf)
    +
    +    server = new HistoryServer(conf, provider, securityManager, 18080)
    +    server.initialize()
    +    server.bind()
    +
    +    val port = server.boundPort
    +
    +    val servlet = new ProxyServlet {
    +      override def rewriteTarget(request: HttpServletRequest): String = {
    +        // servlet acts like a proxy that redirects calls made on
    +        // spark.ui.proxyBase context path to the normal servlet handlers operating off "/"
    +        val sb = request.getRequestURL()
    +
    +        if (request.getQueryString() != null) {
    +          sb.append(s"?${request.getQueryString()}")
    +        }
    +
    +        val proxyidx = sb.indexOf(uiRoot)
    +        sb.delete(proxyidx, proxyidx + uiRoot.length).toString
    +      }
    +    }
    +
    +    val contextHandler = new ServletContextHandler
    +    val holder = new ServletHolder(servlet)
    +    contextHandler.setContextPath(uiRoot)
    +    contextHandler.addServlet(holder, "/")
    +    server.attachHandler(contextHandler)
    +
    +    implicit val webDriver: WebDriver = new HtmlUnitDriver(true) {
    +      getWebClient.getOptions.setThrowExceptionOnScriptError(false)
    +    }
    +
    +    val url = s"http://localhost:$port"
    +
    +    go to s"$url$uiRoot"
    +
    +    // expect the ajax call to finish in 5 seconds
    +    implicitlyWait(org.scalatest.time.Span(5, org.scalatest.time.Seconds))
    +
    +    // once this findAll call returns, we know the ajax load of the table completed
    +    findAll(ClassNameQuery("odd"))
    +
    +    val links = findAll(TagNameQuery("a"))
    +      .map(_.attribute("href"))
    +      .filter(_.isDefined)
    +      .map(_.get)
    +      .filter(_.startsWith(url)).toList
    +
    +    contextHandler.stop()
    --- End diff --
    
    Okay, moved it to a `finally` block. This should make both good and bad testcase runs consistent in their cleanup. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68354/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68036 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68036/consoleFull)** for PR 15742 at commit [`1b153bf`](https://github.com/apache/spark/commit/1b153bf3ef276803c2bec2bd3544d7626918e448).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68204 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68204/consoleFull)** for PR 15742 at commit [`e314450`](https://github.com/apache/spark/commit/e314450a75c1c4113c945aeb4d0bb0ddd2dec62d).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68035 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68035/consoleFull)** for PR 15742 at commit [`d00a7ff`](https://github.com/apache/spark/commit/d00a7ff66a89069930077f84b5f77a3d23e74c14).
     * This patch **fails Scala style tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/15742


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68035 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68035/consoleFull)** for PR 15742 at commit [`d00a7ff`](https://github.com/apache/spark/commit/d00a7ff66a89069930077f84b5f77a3d23e74c14).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by ajbozarth <gi...@git.apache.org>.
Github user ajbozarth commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    LGTM, putting the var and setter in `webui.js` is a good idea


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68052/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    @ajbozarth @srowen - for your review if possible. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68366 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68366/consoleFull)** for PR 15742 at commit [`fcc779d`](https://github.com/apache/spark/commit/fcc779d111bed99d3701a2f47a448c3a199e214c).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68318 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68318/consoleFull)** for PR 15742 at commit [`a7e380d`](https://github.com/apache/spark/commit/a7e380d1a59ef31db2225dd37f21df49edd3a094).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by ajbozarth <gi...@git.apache.org>.
Github user ajbozarth commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    LGTM


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68036 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68036/consoleFull)** for PR 15742 at commit [`1b153bf`](https://github.com/apache/spark/commit/1b153bf3ef276803c2bec2bd3544d7626918e448).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by mariobriggs <gi...@git.apache.org>.
Github user mariobriggs commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    ok. will look into that


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68204/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15742#discussion_r86646676
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala ---
    @@ -275,6 +277,79 @@ class HistoryServerSuite extends SparkFunSuite with BeforeAndAfter with Matchers
         all (siteRelativeLinks) should startWith (uiRoot)
       }
     
    +  test("ajax rendered relative links are prefixed with uiRoot (spark.ui.proxyBase)") {
    +
    +    val proxyBaseBeforeTest = System.getProperty("spark.ui.proxyBase")
    +    val uiRoot = "/testwebproxybase"
    +    System.setProperty("spark.ui.proxyBase", uiRoot)
    +
    +    server.stop()
    +
    +    val conf = new SparkConf()
    +      .set("spark.history.fs.logDirectory", logDir)
    +      .set("spark.history.fs.update.interval", "0")
    +      .set("spark.testing", "true")
    +
    +    provider = new FsHistoryProvider(conf)
    +    provider.checkForLogs()
    +    val securityManager = new SecurityManager(conf)
    +
    +    server = new HistoryServer(conf, provider, securityManager, 18080)
    +    server.initialize()
    +    server.bind()
    +    val port = server.boundPort
    +
    +    val servlet = new ProxyServlet {
    +      override def rewriteTarget(request: HttpServletRequest): String = {
    +        // servlet acts like a proxy that redirects calls made on
    +        // spark.ui.proxyBase context path to the normal servlet handlers operating off "/"
    +        val sb = request.getRequestURL()
    +
    +        if (request.getQueryString() != null) {
    +          sb.append (s"?${request.getQueryString()}")
    +        }
    +
    +        val proxyidx = sb.indexOf(uiRoot)
    +        sb.delete(proxyidx, proxyidx + uiRoot.length).toString
    +      }
    +    }
    +
    +    val contextHandler = new ServletContextHandler
    +    val holder = new ServletHolder(servlet)
    +    contextHandler.setContextPath(uiRoot)
    +    contextHandler.addServlet(holder, "/")
    +    server.attachHandler(contextHandler)
    +
    +    implicit val webDriver: WebDriver = new HtmlUnitDriver (true) {
    +      getWebClient.getOptions.setThrowExceptionOnScriptError(false)
    +    }
    +
    +    val url = s"http://localhost:$port"
    +
    +    go to s"$url$uiRoot"
    +
    +    // expect the ajax call to finish in 5 seconds
    +    implicitlyWait(org.scalatest.time.Span(5, org.scalatest.time.Seconds))
    +
    +    // once this findAll call returns, we know the ajax load of the table completed
    +    findAll (ClassNameQuery("odd"))
    --- End diff --
    
    nit: no space before `(` in method calls , also happens below.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68211 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68211/consoleFull)** for PR 15742 at commit [`e314450`](https://github.com/apache/spark/commit/e314450a75c1c4113c945aeb4d0bb0ddd2dec62d).
     * This patch **fails Spark unit tests**.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    @ajbozarth updated the code. Guess, there is agreement to keep `uiRoot` in `webui.js` to make it available to any more templates / javascript that need it. I removed the `undefined` check for `uiRoot` as that in a way makes the expectation that `uiRoot` is available explicit. In case it isn't, the testcases would fail which would be better than defaulting to a value that may not be correct.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68212/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68366 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68366/consoleFull)** for PR 15742 at commit [`fcc779d`](https://github.com/apache/spark/commit/fcc779d111bed99d3701a2f47a448c3a199e214c).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68036/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15742#discussion_r86646314
  
    --- Diff: core/src/test/scala/org/apache/spark/deploy/history/HistoryServerSuite.scala ---
    @@ -275,6 +277,79 @@ class HistoryServerSuite extends SparkFunSuite with BeforeAndAfter with Matchers
         all (siteRelativeLinks) should startWith (uiRoot)
       }
     
    +  test("ajax rendered relative links are prefixed with uiRoot (spark.ui.proxyBase)") {
    +
    +    val proxyBaseBeforeTest = System.getProperty("spark.ui.proxyBase")
    +    val uiRoot = "/testwebproxybase"
    +    System.setProperty("spark.ui.proxyBase", uiRoot)
    --- End diff --
    
    Do you need to use system properties for this? Isn't it enough to set it in `SparkConf`?
    
    If you need to use system properties, you should use `ResetSystemProperties` since if your test fails, it will leave the modified system properties behind.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68238 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68238/consoleFull)** for PR 15742 at commit [`4a443c5`](https://github.com/apache/spark/commit/4a443c5198cf65d506ee3c133a4373106025193d).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by mariobriggs <gi...@git.apache.org>.
Github user mariobriggs commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    @vanzin since this a regression bux in 2.0, any particular reason it is merged only to 2.1 . I believe this should be in 2.0.2/3 as well


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68052 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68052/consoleFull)** for PR 15742 at commit [`0584339`](https://github.com/apache/spark/commit/05843396d064f0f80107eb912449a0cbc8e734d9).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68146 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68146/consoleFull)** for PR 15742 at commit [`6071d5b`](https://github.com/apache/spark/commit/6071d5b128ed9b871a54bd186da099e5dd13935b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68146 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68146/consoleFull)** for PR 15742 at commit [`6071d5b`](https://github.com/apache/spark/commit/6071d5b128ed9b871a54bd186da099e5dd13935b).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    retest this please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #15742: [SPARK-16808][Core] History Server main page does...

Posted by vanzin <gi...@git.apache.org>.
Github user vanzin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/15742#discussion_r86839934
  
    --- Diff: core/src/main/scala/org/apache/spark/deploy/history/HistoryServer.scala ---
    @@ -143,6 +143,12 @@ class HistoryServer(
         appCache.stop()
       }
     
    +  // For testing - override stop timeout used by jetty
    +  private[history] def setStopTimeout(timeout: Long): Unit = {
    --- End diff --
    
    I think this is a little fishy, because other tests run Jetty and don't seem to suffer from this problem (or at least no one has complained).
    
    Maybe, if you explicitly close the selenium driver in the test, this will go away without the need for this method?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68211/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68238/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by vijoshi <gi...@git.apache.org>.
Github user vijoshi commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    retest this please


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/68035/
    Test FAILed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    **[Test build #68211 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/68211/consoleFull)** for PR 15742 at commit [`e314450`](https://github.com/apache/spark/commit/e314450a75c1c4113c945aeb4d0bb0ddd2dec62d).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #15742: [SPARK-16808][Core] History Server main page does not ho...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/15742
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org