aicam commented on code in PR #6853:
URL: https://github.com/apache/texera/pull/6853#discussion_r3650880465
##########
computing-unit-managing-service/src/main/scala/org/apache/texera/service/util/ComputingUnitHelpers.scala:
##########
@@ -58,4 +90,113 @@ object ComputingUnitHelpers {
WorkflowComputingUnitMetrics("NaN", "NaN")
}
}
+
+ /**
+ * Resolves status from a pre-fetched pod-phase map instead of a per-unit
cluster call, so a
+ * listing costs O(1) round trips rather than one per unit.
+ */
+ def getComputingUnitStatus(
+ unit: WorkflowComputingUnit,
+ podPhases: Map[String, String]
+ ): ComputingUnitState = {
+ unit.getType match {
+ case WorkflowComputingUnitTypeEnum.local =>
+ Running
Review Comment:
I think we should check if computing unit microservice is running. For
example if I create a local CU, then turn off computing unit master service, it
still shows its running but its actually off. Not a blocker since local
deployment is not our standard, just a note.
--
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]