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-18204][WEBUI] Remove SparkUI.appUIAddress #15603
Conversation
Test build #67420 has finished for PR 15603 at commit
|
The build has just proved that my thinking was correct. I think I'll propose few other (more agressive) changes to clean the code up a little bit more. I'd appreciate any comments (or acceptance). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of this, I wouldn't change randomly for its own sake. Removing the bit of dead code is reasonable if you take it a step further.
} | ||
|
||
/** | ||
* Return the application UI host:port. This does not include the scheme (http://). | ||
*/ | ||
private[spark] def appUIHostPort = publicHostName + ":" + boundPort | ||
|
||
private[spark] def appUIAddress = s"http://$appUIHostPort" | ||
private[spark] def appUIAddress = webUrl |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these two methods can just be eliminated, because appUIAddress does seem to return exactly the same thing, and appUIHostPort is only referenced from tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Sean for confirming my thoughts! That's exactly the feedback I expected to get from you (or other Spark committers).
@@ -135,7 +133,7 @@ private[spark] class SparkUI private ( | |||
private[spark] abstract class SparkUITab(parent: SparkUI, prefix: String) | |||
extends WebUITab(parent, prefix) { | |||
|
|||
def appName: String = parent.getAppName | |||
def appName: String = parent.appName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can just be removed then, because this becomes a no-op. And then getAppName in the superclass can be removed. It's a pointless getter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes! That's how I imagined the conversation would go. Thanks Sean!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might have missed why we could remove it. Mind refreshing my memory @srowen (sorry getting too old :))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, leave this one. It does serve a purpose.
6fcd247
to
8976018
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise looks good yes.
@@ -135,7 +133,7 @@ private[spark] class SparkUI private ( | |||
private[spark] abstract class SparkUITab(parent: SparkUI, prefix: String) | |||
extends WebUITab(parent, prefix) { | |||
|
|||
def appName: String = parent.getAppName | |||
def appName: String = parent.appName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, leave this one. It does serve a purpose.
@@ -179,16 +179,15 @@ class UISuite extends SparkFunSuite { | |||
test("verify appUIAddress contains the scheme") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might also change occurrences of "appUIAddress" in places like this test name. Have a look with a search and replace.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Sean! How do you manage to find so much time to help people like me?!?! You're certainly not a robot -- I do know it since I met you few times and can confirm ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about renaming spark.driver.appUIAddress
to spark.driver.webUrl
? Not necessarily important, but merely for the sake of consistency...
Test build #67705 has finished for PR 15603 at commit
|
88da49f
to
7d65d49
Compare
Test build #67754 has finished for PR 15603 at commit
|
val boundPort = ui.boundPort | ||
assert(splitUIAddress(2).toInt == boundPort) | ||
assert(splitUIAddress(3).toInt == boundPort) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this actually should not change. The test fails and the behavior should be identical anyway.
Test build #67757 has finished for PR 15603 at commit
|
The test failure doesn't seem to be due to my change. |
Test build #3379 has finished for PR 15603 at commit
|
Anything else you'd change/remove/add, Mr @srowen? |
Since this turned into a bit more of a change than where it started, and because it removes a method (internal, defunct as it may be), and since this isn't a hurry, would you open a JIRA just to track it for the record? |
## What changes were proposed in this pull request? Removing `appUIAddress` attribute since it is no longer in use. ## How was this patch tested? Local build Author: Jacek Laskowski <jacek@japila.pl> Closes apache#15603 from jaceklaskowski/sparkui-fixes.
What changes were proposed in this pull request?
Removing
appUIAddress
attribute since it is no longer in use.How was this patch tested?
Local build