TisonKun commented on a change in pull request #7535: [FLINK-11382] Disable 
MetricFetcher if interval is configured to 0 an…
URL: https://github.com/apache/flink/pull/7535#discussion_r249085542
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniCluster.java
 ##########
 @@ -362,7 +361,9 @@ public void start() throws Exception {
                                        resourceManagerGatewayRetriever,
                                        blobServer.getTransientBlobService(),
                                        executor,
-                                       MetricFetcherImpl.fromConfiguration(
+                                       updateInterval == 0 ?
 
 Review comment:
   I would prefer introducing a dedicated variable for the `MetricFetcher`, 
i.e.,
   
   ```java
   MetricFetcher metricFetcher = updateInterval == 0
                           ? VoidMetricFetcher.INSTANCE
                                           : 
MetricFetcherImpl.fromConfiguration(...)
   ```
   
   this should improve code readability.

----------------------------------------------------------------
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