gyfora commented on code in PR #501:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/501#discussion_r1062521191
##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/observer/ClusterHealthObserver.java:
##########
@@ -34,26 +33,30 @@ public class ClusterHealthObserver {
private static final Logger LOG =
LoggerFactory.getLogger(ClusterHealthObserver.class);
private static final String FULL_RESTARTS_METRIC_NAME = "fullRestarts";
private static final String NUM_RESTARTS_METRIC_NAME = "numRestarts";
- private final FlinkService flinkService;
private final ClusterHealthEvaluator clusterHealthEvaluator;
- public ClusterHealthObserver(FlinkService flinkService) {
- this.flinkService = flinkService;
+ public ClusterHealthObserver() {
this.clusterHealthEvaluator = new
ClusterHealthEvaluator(Clock.systemDefaultZone());
}
- /** Observe the health of the flink cluster. */
- public void observe(FlinkDeployment flinkApp, Configuration
deployedConfig) {
+ /**
+ * Observe the health of the flink cluster.
+ *
+ * @param ctx Resource context.
+ */
+ public void observe(FlinkResourceContext<FlinkDeployment> ctx) {
+ var flinkApp = ctx.getResource();
Review Comment:
Yes I agree that it could be improved
--
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]