Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-24490][WebUI] Use WebUI.addStaticHandler in web UIs #21510

Conversation

jaceklaskowski
Copy link
Contributor

WebUI defines addStaticHandler that web UIs don't use (and simply introduce duplication). Let's clean them up and remove duplications.

Local build and waiting for Jenkins

@SparkQA
Copy link

SparkQA commented Jun 8, 2018

Test build #91536 has finished for PR 21510 at commit 58a9ec4.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgaido91
Copy link
Contributor

mgaido91 commented Jun 8, 2018

LGTM

@jaceklaskowski
Copy link
Contributor Author

May I ask for some help merging it? /cc @srowen @holdenk @kiszk

@@ -101,12 +101,12 @@ private[spark] abstract class WebUI(
}

/**
* Add a handler for static content.
* Adds a handler for static content.
Copy link
Member

@kiszk kiszk Jun 10, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this file, s is not added.
It would be good to add s to comments in all of the methods if we add s.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaceklaskowski please address this super tiny issue.

@kiszk
Copy link
Member

kiszk commented Jun 10, 2018

LGTM with one minor comment.

Copy link
Contributor

@jerryshao jerryshao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@jaceklaskowski
Copy link
Contributor Author

@kiszk @jerryshao @srowen Added s (and even more scaladoc). Thanks for reviewing (and hopefully merging right after :))!

attachHandler(JettyUtils.createStaticHandler(resourceBase, path))
}

/**
* Remove a static content handler.
* Removes a static content handler.
*
* @param path Path in UI to unmount.
*/
def removeStaticHandler(path: String): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method name is misleading. It will remove any handler, not just "static" handlers... and since you're touching this code...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK...since @vanzin requested I'm gonna make all the other changes while at it :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could still be addressed? I think it's fine to rename the method as it's all private to Spark.

@SparkQA
Copy link

SparkQA commented Jun 11, 2018

Test build #91662 has finished for PR 21510 at commit 3ab14a1.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gengliangwang
Copy link
Member

retest this please.

@SparkQA
Copy link

SparkQA commented Jun 13, 2018

Test build #91736 has finished for PR 21510 at commit 3ab14a1.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 15, 2018

Test build #91899 has finished for PR 21510 at commit 1a29c65.

  • This patch fails Scala style tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Jun 15, 2018

Test build #91902 has finished for PR 21510 at commit 47c86bd.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@vanzin
Copy link
Contributor

vanzin commented Jun 15, 2018

Merging to master.

@asfgit asfgit closed this in 495d8cf Jun 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants