-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-20652][sql] Store SQL UI data in the new app status store. #19681
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
Closed
Closed
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
ccd5adc
[SPARK-20652][sql] Store SQL UI data in the new app status store.
c4af460
Don't store driver accum updates in the status store.
46695ed
Typo.
197dd8f
Use set to keep stage list.
ecf293b
Typo.
a42f418
Simplify and fix synchronization for live executions.
bb7388b
Remove stale comment.
1a31665
Fix a race.
56761af
Merge branch 'master' into SPARK-20652
c068a5b
Merge branch 'master' into SPARK-20652
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71 changes: 71 additions & 0 deletions
71
core/src/main/scala/org/apache/spark/status/AppStatusPlugin.scala
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one or more | ||
| * contributor license agreements. See the NOTICE file distributed with | ||
| * this work for additional information regarding copyright ownership. | ||
| * The ASF licenses this file to You under the Apache License, Version 2.0 | ||
| * (the "License"); you may not use this file except in compliance with | ||
| * the License. You may obtain a copy of the License at | ||
| * | ||
| * http://www.apache.org/licenses/LICENSE-2.0 | ||
| * | ||
| * Unless required by applicable law or agreed to in writing, software | ||
| * distributed under the License is distributed on an "AS IS" BASIS, | ||
| * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| * See the License for the specific language governing permissions and | ||
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.spark.status | ||
|
|
||
| import java.util.ServiceLoader | ||
|
|
||
| import scala.collection.JavaConverters._ | ||
|
|
||
| import org.apache.spark.SparkConf | ||
| import org.apache.spark.scheduler.SparkListener | ||
| import org.apache.spark.ui.SparkUI | ||
| import org.apache.spark.util.Utils | ||
| import org.apache.spark.util.kvstore.KVStore | ||
|
|
||
| /** | ||
| * An interface that defines plugins for collecting and storing application state. | ||
| * | ||
| * The plugin implementations are invoked for both live and replayed applications. For live | ||
| * applications, it's recommended that plugins defer creation of UI tabs until there's actual | ||
| * data to be shown. | ||
| */ | ||
| private[spark] trait AppStatusPlugin { | ||
|
|
||
| /** | ||
| * Install listeners to collect data about the running application and populate the given | ||
| * store. | ||
| * | ||
| * @param conf The Spark configuration. | ||
| * @param store The KVStore where to keep application data. | ||
| * @param addListenerFn Function to register listeners with a bus. | ||
| * @param live Whether this is a live application (or an application being replayed by the | ||
| * HistoryServer). | ||
| */ | ||
| def setupListeners( | ||
| conf: SparkConf, | ||
| store: KVStore, | ||
| addListenerFn: SparkListener => Unit, | ||
| live: Boolean): Unit | ||
|
|
||
| /** | ||
| * Install any needed extensions (tabs, pages, etc) to a Spark UI. The plugin can detect whether | ||
| * the app is live or replayed by looking at the UI's SparkContext field `sc`. | ||
| * | ||
| * @param ui The Spark UI instance for the application. | ||
| */ | ||
| def setupUI(ui: SparkUI): Unit | ||
|
|
||
| } | ||
|
|
||
| private[spark] object AppStatusPlugin { | ||
|
|
||
| def loadPlugins(): Iterable[AppStatusPlugin] = { | ||
| ServiceLoader.load(classOf[AppStatusPlugin], Utils.getContextOrSparkClassLoader).asScala | ||
| } | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...c/main/resources/META-INF/services/org.apache.spark.scheduler.SparkHistoryListenerFactory
This file was deleted.
Oops, something went wrong.
1 change: 1 addition & 0 deletions
1
sql/core/src/main/resources/META-INF/services/org.apache.spark.status.AppStatusPlugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| org.apache.spark.sql.execution.ui.SQLAppStatusPlugin |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@vanzin the live UI doesn't need a 2-step process to set up the UI, while history server needs. That's why I think they should not share one plugin interface.
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.
Let's continue the discussion on the other PR.