Github user squito commented on a diff in the pull request:
https://github.com/apache/spark/pull/6935#discussion_r47551365
--- Diff:
core/src/main/scala/org/apache/spark/deploy/history/ApplicationHistoryProvider.scala
---
@@ -33,7 +33,35 @@ private[spark] case class ApplicationAttemptInfo(
private[spark] case class ApplicationHistoryInfo(
id: String,
name: String,
- attempts: List[ApplicationAttemptInfo])
+ attempts: List[ApplicationAttemptInfo]) {
+
+ /**
+ * Has this application completed?
+ * @return true if the most recent attempt has completed
+ */
+ def completed: Boolean = {
+ attempts.nonEmpty && attempts.head.completed
+ }
+}
+
+/**
+ * Case class which can be subclasses by any provider to store information
which
+ * can then be used to determine whether an application attempt has been
updated
+ * since the last time it was retrieved.
+ *
+ * Examples include: a timestamp, a counter or a checksum.
+ */
+private[history] case class HistoryProviderUpdateState()
--- End diff --
you probably don't want this to be a case class, case classes aren't meant
to be extended. The specific sub-classes could be case-classes if you want.
But I guess this should just a trait
---
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]