Dennis-Mircea commented on code in PR #1249:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/1249#discussion_r4709831737
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/service/AbstractFlinkService.java:
##########
@@ -805,28 +805,8 @@ public CheckpointStatsResult fetchCheckpointStats(
}
@Override
- public ClusterInfo getClusterInfo(Configuration conf, @Nullable String
jobId) throws Exception {
Review Comment:
I would say it is a good reason, because now as it is mentioned within the
PR description, the session cluster observer performs this request twice: `A
session cluster no longer fetches its cluster info twice per loop. Before,
SessionObserver fetched it once to see whether the REST API was reachable and
threw the result away, then observeClusterInfo fetched it again to store it.
Now the single fetch is the readiness check, and its result is what gets
stored.`
This split also gives us a clean separation of concerns. Previously,
`getClusterInfo` also called `getStateSize`, which is a job-level observation
(its REST endpoint is `/jobs/:jobid/checkpoints`). We also don't want to hit
that endpoint before the JM is actually ready, and with the split, it's only
called at the right time.
The same applies to the `getTaskManagerReplicas` split: it's now called at
cluster level, and only once the JM is ready.
--
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]