-
Notifications
You must be signed in to change notification settings - Fork 28.5k
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-20355] Add per application spark version on the history server headerpage #17658
Changes from 4 commits
1f50b27
21f7903
bad5ea2
5f6e80b
097e7cc
5533775
7350649
e7da27d
f1fa890
298248e
bafad1a
52f414c
dad87a6
93e7a20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,7 @@ private[spark] class ApplicationEventListener extends SparkListener { | |
var adminAcls: Option[String] = None | ||
var viewAclsGroups: Option[String] = None | ||
var adminAclsGroups: Option[String] = None | ||
var appSparkVersion: Option[String] = None | ||
|
||
override def onApplicationStart(applicationStart: SparkListenerApplicationStart) { | ||
appName = Some(applicationStart.appName) | ||
|
@@ -57,4 +58,10 @@ private[spark] class ApplicationEventListener extends SparkListener { | |
adminAclsGroups = allProperties.get("spark.admin.acls.groups") | ||
} | ||
} | ||
|
||
override def onOtherEvent(event: SparkListenerEvent): Unit = event match { | ||
case SparkListenerLogStart(sparkVersion) => | ||
appSparkVersion = Some(sparkVersion) | ||
case _ => | ||
} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You need a "catch all" here:
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,9 +160,9 @@ case class SparkListenerApplicationEnd(time: Long) extends SparkListenerEvent | |
|
||
/** | ||
* An internal class that describes the metadata of an event log. | ||
* This event is not meant to be posted to listeners downstream. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason this note was here? What was the reasoning behind it? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was only for metadata info, so when this was written it was just not meant to be consumed but now we can reuse it for this case |
||
*/ | ||
private[spark] case class SparkListenerLogStart(sparkVersion: String) extends SparkListenerEvent | ||
@DeveloperApi | ||
case class SparkListenerLogStart(sparkVersion: String) extends SparkListenerEvent | ||
|
||
/** | ||
* Interface for creating history listeners defined in other modules like SQL, which are used to | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,7 +71,6 @@ private[spark] trait SparkListenerBus | |
listener.onNodeUnblacklisted(nodeUnblacklisted) | ||
case blockUpdated: SparkListenerBlockUpdated => | ||
listener.onBlockUpdated(blockUpdated) | ||
case logStart: SparkListenerLogStart => // ignore event log metadata | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I haven't looked at this closely, but will allowing this through cause any issues? Why was it ignored before? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not see it getting consumed apart from registering some metadata, so I guess it should be fine as this event already logs the version There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this change the behavior of
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that if this is gonna be posted on the bus it might be better to make it public and Adding new events is not an issue, but posting an event that people can't handle is a little odd. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not too sure if it will change any behavior and precisely why we post it to other events, in case someone wants to listen to them and utilize the event like in this scenario |
||
case _ => listener.onOtherEvent(event) | ||
} | ||
} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -92,7 +92,8 @@ private[spark] object ApplicationsListResource { | |
sparkUser = internalAttemptInfo.sparkUser, | ||
completed = internalAttemptInfo.completed | ||
) | ||
} | ||
}, | ||
appSparkVersion = org.apache.spark.SPARK_VERSION | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not right. This might be different from the current version, just like the UI case. You have to somehow plumb it from the event log information to here. |
||
) | ||
} | ||
} |
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.
Is it correct to remove this two lines? As I know it is necessary because in the previousreplay
call we only parseSparkListenerApplicationStart
andSparkListenerApplicationEnd
event.Sorry about it, just saw you moved this two lines above.