hejufang commented on code in PR #25837:
URL: https://github.com/apache/flink/pull/25837#discussion_r2047022354
##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/metrics/MetricsTrackingAggregatingState.java:
##########
@@ -89,26 +110,29 @@ public void updateInternal(ACC valueToStore) throws
Exception {
@Override
public void mergeNamespaces(N target, Collection<N> sources) throws
Exception {
- if (latencyTrackingStateMetric.trackLatencyOnMergeNamespace()) {
+ if (latencyTrackingStateMetric != null
+ && latencyTrackingStateMetric.trackMetricsOnMergeNamespace()) {
trackLatencyWithException(
() -> original.mergeNamespaces(target, sources),
-
AggregatingStateLatencyMetrics.AGGREGATING_STATE_MERGE_NAMESPACES_LATENCY);
+
AggregatingStateMetrics.AGGREGATING_STATE_MERGE_NAMESPACES_LATENCY);
} else {
original.mergeNamespaces(target, sources);
}
}
- static class AggregatingStateLatencyMetrics extends StateLatencyMetricBase
{
+ static class AggregatingStateMetrics extends StateMetricBase {
private static final String AGGREGATING_STATE_GET_LATENCY =
"aggregatingStateGetLatency";
private static final String AGGREGATING_STATE_ADD_LATENCY =
"aggregatingStateAddLatency";
private static final String AGGREGATING_STATE_MERGE_NAMESPACES_LATENCY
=
"aggregatingStateMergeNamespacesLatency";
+ private static final String AGGREGATING_STATE_GET_KEY_SIZE =
"aggregatingStateGetKeySize";
+ private static final String AGGREGATING_STATE_ADD_KEY_SIZE =
"aggregatingStateAddKeySize";
Review Comment:
Thank you for your advice. I have updated the docs.
--
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]