jiangzho commented on code in PR #405:
URL:
https://github.com/apache/spark-kubernetes-operator/pull/405#discussion_r2482633273
##########
spark-operator-api/src/main/java/org/apache/spark/k8s/operator/status/ApplicationStatus.java:
##########
@@ -163,6 +180,44 @@ public ApplicationStatus terminateOrRestart(
}
}
+ /**
+ * Finds the first state of the current application attempt.
+ *
+ * <p>This method traverses the state transition history in reverse order to
find the most recent
+ * initializing state (e.g., Submitted or ScheduledToRestart), which marks
the beginning of the
+ * current attempt. If no initializing state is found, it returns the first
entry in the history.
+ *
+ * @return The ApplicationState representing the start of the current
attempt.
+ */
+ protected ApplicationState findFirstStateOfCurrentAttempt() {
+ List<Map.Entry<Long, ApplicationState>> entries =
Review Comment:
yes, we would have more powerful and elegant way to handle the history by
then
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]