gyfora commented on code in PR #751:
URL:
https://github.com/apache/flink-kubernetes-operator/pull/751#discussion_r1450008152
##########
flink-autoscaler/src/main/java/org/apache/flink/autoscaler/RestApiMetricsCollector.java:
##########
@@ -103,6 +106,42 @@ protected Map<FlinkMetric, AggregatedMetric>
queryAggregatedVertexMetrics(
}
}
+ @Override
+ @SneakyThrows
+ protected Map<FlinkMetric, Metric> queryJmMetrics(Context ctx) {
+ Map<String, FlinkMetric> metrics =
+ Map.of(
+ "numRegisteredTaskManagers",
FlinkMetric.NUM_TASK_MANAGERS,
+ "taskSlotsTotal", FlinkMetric.NUM_TASK_SLOTS_TOTAL,
+ "taskSlotsAvailable",
FlinkMetric.NUM_TASK_SLOTS_AVAILABLE);
Review Comment:
I think it should be enough to query `taskSlotsUsed` instead of these 3
metrics. From the config we have numTaskSlotsPerTm, and then taskSlotsUsed /
numTaskSlotsPerTm gives us the number of task managers.
--
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]