zentol commented on a change in pull request #6850: [FLINK-10252] Handle 
oversized metric messges
URL: https://github.com/apache/flink/pull/6850#discussion_r230286560
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/metrics/dump/MetricQueryService.java
 ##########
 @@ -119,6 +123,36 @@ public void onReceive(Object message) {
                }
        }
 
+       public void unregister(Metric metric) {
+               if (metric instanceof Counter) {
+                       this.counters.remove(metric);
+               } else if (metric instanceof Gauge) {
+                       this.gauges.remove(metric);
+               } else if (metric instanceof Histogram) {
+                       this.histograms.remove(metric);
+               } else if (metric instanceof Meter) {
+                       this.meters.remove(metric);
+               }
+       }
+
+       private void 
unregisterOversizedMetrics(MetricDumpSerialization.MetricSerializationResult 
serializationResult) {
+               for (Metric metric : serializationResult.counters.keySet()) {
 
 Review comment:
   this line is incredibly misleading; based on the naming one would assume 
that all metrics are unregistered.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to