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-2411] Add a history-not-found page to standalone Master #1336

Closed
wants to merge 7 commits into from

Conversation

andrewor14
Copy link
Contributor

Problem. Right now, if you click on an application after it has finished, it simply refreshes the page if there are no event logs for the application. This is not super intuitive especially because event logging is not enabled by default. We should direct the user to enable this if they attempt to view a SparkUI after the fact without event logs.

Fix. The new page conveys different messages in each of the following scenarios:
(1) Application did not enable event logging,
(2) Event logs are not found in the specified directory, and
(3) Exception is thrown while replaying the logs

Here are screenshots of what the page looks like in each of the above scenarios:

(1)

(2)

(3)

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished.

@AmplabJenkins
Copy link

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16429/

@andrewor14
Copy link
Contributor Author

Jenkins test this please

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished.

@AmplabJenkins
Copy link

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16433/

@andrewor14
Copy link
Contributor Author

Jenkins test this please

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished.

@AmplabJenkins
Copy link

Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16466/

@andrewor14
Copy link
Contributor Author

Jenkins test this please

@AmplabJenkins
Copy link

Merged build triggered.

@AmplabJenkins
Copy link

Merged build started.

@AmplabJenkins
Copy link

Merged build finished. All automated tests passed.

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16476/

@andrewor14
Copy link
Contributor Author

Please don't merge this yet. @aarondav made a comment about the wording offline that I want to address.

@andrewor14
Copy link
Contributor Author

Provided the tests pass (they should) this is ready from my side.

@SparkQA
Copy link

SparkQA commented Jul 10, 2014

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

@SparkQA
Copy link

SparkQA commented Jul 10, 2014

QA results for PR 1336:
- 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/16524/consoleFull

@AmplabJenkins
Copy link

All automated tests passed.
Refer to this link for build results: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/16524/

val content =
<div class="row-fluid">
<div class="span12" style="font-size:14px;font-weight:bold">
No event logs were found for this application. To enable event logging, please set
Copy link
Contributor

Choose a reason for hiding this comment

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

Should you also mention the setting for the event log directory? Otherwise they might think they can just set enabled and it will auto-magically work.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Well, it kind of does auto-magically work, but sure I'll add it

Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure what you mean, but in most environments users will have to add an HDFS directory there that is shared... right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right now the code actually creates the directory for you, so the user doesn't need to add it herself

Copy link
Contributor

Choose a reason for hiding this comment

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

I mean that if the are joining an existing cluster, they'll need to figure out what HDFS or FS path to set this too such that it's consistent with the path set by the person running the history server.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is for the standalone Master, not the history server. Here the event log directory for each application is shipped to the master as part of the application description, so the Master knows where to find the logs automatically.

(For history server, however, the user should explicitly set the path in all cases as you describe)

@pwendell
Copy link
Contributor

LGTM with one small comment.

@andrewor14
Copy link
Contributor Author

I have updated the screenshot. Anything else?

@pwendell
Copy link
Contributor

Looks good, thanks!

@pwendell
Copy link
Contributor

Hey actually - could this differentiate between the case where the event log was not enabled (and give a message like "Application did not enable event logging") and a case where the event log was expected but could not be read (and give a message like "Error reading event log"). Bonus points if you can encode the error message in the second case.

With this commit, the HistoryNotFoundPage behaves differently for
each of the following scenarios:
  (1) User did not enable event logging -> point them to the configs
  (2) Event logs are not found for some reason -> tell them that
  (3) Exception is thrown in replaying -> show them the stack trace
@SparkQA
Copy link

SparkQA commented Jul 17, 2014

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

@SparkQA
Copy link

SparkQA commented Jul 17, 2014

QA results for PR 1336:
- 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/16759/consoleFull

@andrewor14
Copy link
Contributor Author

I have updated the screenshots again. Anything else?

} else {
logWarning("Application %s (%s) has no valid logs: %s".format(appName, app.id, eventLogDir))

if (eventLogPaths.isEmpty) {
Copy link
Contributor

Choose a reason for hiding this comment

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

What happens here if eventLogDir doesn't exist?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See L670. If eventLogDir doesn't exist, we never even reach here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

(If you mean the directory does not exist on the filesystem itself, then it does go into this case, and the page displays view (2) in the PR message)

@pwendell
Copy link
Contributor

Okay cool - I'm merging tihs.

@asfgit asfgit closed this in 6afca2d Jul 18, 2014
@andrewor14 andrewor14 deleted the master-link branch July 21, 2014 20:57
xiliu82 pushed a commit to xiliu82/spark that referenced this pull request Sep 4, 2014
**Problem.** Right now, if you click on an application after it has finished, it simply refreshes the page if there are no event logs for the application. This is not super intuitive especially because event logging is not enabled by default. We should direct the user to enable this if they attempt to view a SparkUI after the fact without event logs.

**Fix.** The new page conveys different messages in each of the following scenarios:
(1) Application did not enable event logging,
(2) Event logs are not found in the specified directory, and
(3) Exception is thrown while replaying the logs

Here are screenshots of what the page looks like in each of the above scenarios:

(1)
<img src="https://issues.apache.org/jira/secure/attachment/12656204/Event%20logging%20not%20enabled.png" width="75%">

(2)
<img src="https://issues.apache.org/jira/secure/attachment/12656203/Application%20history%20not%20found.png">

(3)
<img src="https://issues.apache.org/jira/secure/attachment/12656202/Application%20history%20load%20error.png" width="95%">

Author: Andrew Or <[email protected]>

Closes apache#1336 from andrewor14/master-link and squashes the following commits:

2f06206 [Andrew Or] Merge branch 'master' of github.com:apache/spark into master-link
97cddc0 [Andrew Or] Add different severity levels
832b687 [Andrew Or] Mention spark.eventLog.dir in error message
51980c3 [Andrew Or] Merge branch 'master' of github.com:apache/spark into master-link
ded208c [Andrew Or] Merge branch 'master' of github.com:apache/spark into master-link
89d6405 [Andrew Or] Reword message
e7df7ed [Andrew Or] Add a history not found page to standalone Master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants