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-2150: Provide direct link to finished application UI in yarn resou... #1094

Closed
wants to merge 1 commit into from

Conversation

rahulsinghaliitd
Copy link

...rce manager UI

Use the event logger directory to provide a direct link to finished
application UI in yarn resourcemanager UI.

@AmplabJenkins
Copy link

Can one of the admins verify this patch?

@vanzin
Copy link
Contributor

vanzin commented Jun 16, 2014

Hi @rahulsinghaliitd,

Thanks for filing this; this is something I had on my radar but hadn't gotten down to it yet.

While I also want the feature, I think we need a better approach here. For one, I'm not a big fan of using the log directory name as the application's URL in the history server; it's not very discoverable, since it's generated internally by the event logger. Also, slightly unrelated, but I have upcoming changes that make those names even more ugly, so they're not a very user-friendly thing to use as a public-facing URL.

I've actually been playing with this and have some changes that use the actual application ID, when it's available (such as in the case of Yarn), to serve the application from the history server. I think that's a better approach. But if some committer wants to check this in while I work on that, it would not cause (many) conflicts with my change.

While we're here, you'd need to make a similar change in the yarn/alpha project, and also in yarn-client mode (ExecutorLauncher.scala in both projects).

@rahulsinghaliitd
Copy link
Author

Hi @vanzin,

I don't have any preference as to how the URL is formatted and I think that changing the URL can be a separate activity. I am hoping this can be committed so that we atleast have the functionality.

Thanks for pointing out the changes, I had also realized the same and I am currently in the process of testing them. They should be available soon.

@sryza
Copy link
Contributor

sryza commented Jun 20, 2014

This change looks good to me.

@rahulsinghaliitd
Copy link
Author

@sryza thanks for the thumbs up.

Although I wonder if the approach in #1112 is better for passing the UI address (certainly is much cleaner).

@vanzin
Copy link
Contributor

vanzin commented Jun 23, 2014

@rahulsinghaliitd that bug is about linking to the running web ui of the driver in yarn-client mode. Slightly different than this one, which is about setting the link after the application is finished.

@rahulsinghaliitd
Copy link
Author

@vanzin I was only referring to how the UI URL is passed around. I have used the longer way of passing it around using command line arguments whereas the other change uses spark conf by simply setting it as another property.

@vanzin
Copy link
Contributor

vanzin commented Jun 25, 2014

@rahulsinghaliitd ah, good point. Passing as a SparkConf property should work now that I fixed some things in the yarn-cluster backend.

@vanzin
Copy link
Contributor

vanzin commented Jun 25, 2014

Latest patch LGTM.

@vanzin
Copy link
Contributor

vanzin commented Jun 25, 2014

(Aside from rebasing to fix the merge conflicts.)

@rahulsinghaliitd
Copy link
Author

Am I supposed to resolve the conflicts or will they be resolved by the admin who merges this change?

@vanzin
Copy link
Contributor

vanzin commented Jun 26, 2014

Generally we ask for the PR submitter to resolve conflicts. You just have to rebase your branch on top of master, resolve conflicts, and force push it into your repo, the PR will be updated automatically.

@tsudukim
Copy link
Contributor

Is someone working on this? or facing some problem?

@@ -132,4 +135,17 @@ object YarnSparkHadoopUtil {
}
}

def getUIHistoryAddress(sc: SparkContext, conf: SparkConf) : String = {
val eventLogDir = sc.eventLogger match {
case Some(logger) => logger.logDir.split("/").last
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it would be better to add a routine to the eventLogger to just give us the name of the directory rather then us splitting it and it possibly breaking in the future.

@tgravescs
Copy link
Contributor

This PR conflicts with pr1112. I would like to put that one in first and then upmerge this.

@@ -172,6 +172,8 @@ class HistoryServer(
object HistoryServer {
private val conf = new SparkConf

val UI_PATH_PREFIX = "/history/"
Copy link
Contributor

Choose a reason for hiding this comment

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

If we are adding this we should also use it in this file to set the path.

@tsudukim
Copy link
Contributor

OK, thank you for your reply.

@tgravescs
Copy link
Contributor

@rahulsinghaliitd can you please upmerge

@rahulsinghaliitd
Copy link
Author

@tgravescs updated according to your comments and rebased to current HEAD of master branch. Thanks for following up on this PR.

@@ -114,7 +114,7 @@ class HistoryServer(
attachHandler(createStaticHandler(SparkUI.STATIC_RESOURCE_DIR, "/static"))

val contextHandler = new ServletContextHandler
contextHandler.setContextPath("/history")
contextHandler.setContextPath(HistoryServer.UI_PATH_PREFIX.stripSuffix("/"))
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it makes more sense to do this the other way. have the UI_PATH_PREFIX /history and add in the "/" wherever its needed.

@rahulsinghaliitd
Copy link
Author

@tgravescs updated according to your comments and rebased to current HEAD of master branch.

@@ -289,7 +289,7 @@ class ExecutorLauncher(args: ApplicationMasterArguments, conf: Configuration, sp
.asInstanceOf[FinishApplicationMasterRequest]
finishReq.setAppAttemptId(appAttemptId)
finishReq.setFinishApplicationStatus(status)
finishReq.setTrackingUrl(sparkConf.get("spark.yarn.historyServer.address", ""))
finishReq.setTrackingUrl(sparkConf.get("spark.driver.appUIHistoryAddress", "))
Copy link
Contributor

Choose a reason for hiding this comment

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

typo, need the other " in the default case.

Copy link
Author

Choose a reason for hiding this comment

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

woah, thanks for catching that!

@tgravescs
Copy link
Contributor

Jenkins, test this please

@SparkQA
Copy link

SparkQA commented Jul 22, 2014

QA tests have started for PR 1094. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16962/consoleFull

@SparkQA
Copy link

SparkQA commented Jul 22, 2014

QA results for PR 1094:
- This patch FAILED unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16962/consoleFull

@tgravescs
Copy link
Contributor

@rahulsinghaliitd sorry for this dragging on I forgot to kick jenkins. Looks like its complaining about scalastyle. Can you please update.

/home/jenkins/workspace/SparkPullRequestBuilder@2/core/src/main/scala/org/apache/spark/deploy/history/FsHistoryProvider.scala message=File line length exceeds 100 characters line=172

@tgravescs
Copy link
Contributor

Jenkins, this is okay to test

…source manager UI

Use the event logger directory to provide a direct link to finished
application UI in yarn resourcemanager UI.
@rahulsinghaliitd
Copy link
Author

@tgravescs No problem at all. Updated patch.

@rahulsinghaliitd
Copy link
Author

@tgravescs There does not seem to be a maven goal to check scalastyle, isn't this something we want?

@tgravescs
Copy link
Contributor

I've only used the sbt/sbt scalastyle target. I'm not sure if there is a reason it wasn't implemented in maven. you could file a jira for it and get comments from the folks who did it.

@tgravescs
Copy link
Contributor

Jenkins, test this please

@SparkQA
Copy link

SparkQA commented Jul 23, 2014

QA tests have started for PR 1094. This patch merges cleanly.
View progress: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17034/consoleFull

@SparkQA
Copy link

SparkQA commented Jul 23, 2014

QA results for PR 1094:
- This patch PASSES unit tests.
- This patch merges cleanly
- This patch adds no public classes

For more information see test ouptut:
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/17034/consoleFull

@tgravescs
Copy link
Contributor

+1 thanks @rahulsinghaliitd !

@asfgit asfgit closed this in 46e224a Jul 24, 2014
@rahulsinghaliitd rahulsinghaliitd deleted the SPARK-2150 branch July 24, 2014 15:15
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
…sou...

...rce manager UI

Use the event logger directory to provide a direct link to finished
application UI in yarn resourcemanager UI.

Author: Rahul Singhal <rahul.singhal@guavus.com>

Closes apache#1094 from rahulsinghaliitd/SPARK-2150 and squashes the following commits:

95f230c [Rahul Singhal] SPARK-2150: Provide direct link to finished application UI in yarn resource manager UI
wangyum pushed a commit that referenced this pull request May 26, 2023
* [CARMEL-6305] Support to show partitions for Delta table

* Fix unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
7 participants