Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/1218#discussion_r16206929
--- Diff:
core/src/main/scala/org/apache/spark/scheduler/ApplicationEventListener.scala
---
@@ -24,38 +24,39 @@ package org.apache.spark.scheduler
* from multiple applications are seen, the behavior is unspecified.
*/
private[spark] class ApplicationEventListener extends SparkListener {
- var appName = "<Not Started>"
- var sparkUser = "<Not Started>"
- var startTime = -1L
- var endTime = -1L
- var viewAcls = ""
- var adminAcls = ""
+ var appName: Option[String] = None
+ var appId: Option[String] = None
+ var sparkUser: Option[String] = None
+ var startTime: Option[Long] = None
+ var endTime: Option[Long] = None
+ var viewAcls: Option[String] = None
+ var adminAcls: Option[String] = None
- def applicationStarted = startTime != -1
+ def applicationStarted = startTime.isDefined
- def applicationCompleted = endTime != -1
+ def applicationCompleted = endTime.isDefined
def applicationDuration: Long = {
--- End diff --
Given your other changes to the other fields in this class, should this
return an option of long as well?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]