azagrebin commented on a change in pull request #8191: [FLINK-12213][network] 
Pass TaskManagerMetricGroup into constructor of NetworkEnvironment
URL: https://github.com/apache/flink/pull/8191#discussion_r276248490
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerRunner.java
 ##########
 @@ -357,15 +357,16 @@ public static TaskExecutor startTaskManager(
                TaskManagerServices taskManagerServices = 
TaskManagerServices.fromConfiguration(
                        taskManagerServicesConfiguration,
                        resourceID,
+                       remoteAddress,
+                       metricRegistry,
 
 Review comment:
   Why do we need to move `taskManagerMetricGroup` from `TaskExecutor` to 
`TaskManagerServices`? It seems it would be enough to just create 
`taskManagerMetricGroup` before `taskManagerServices` and pass it to 
`TaskManagerServices.fromConfiguration` and have less changes.
   
   Also, I am wondering whether it would make sense to pull out the creation of 
`NetworkEnviroment` completely from 
`TaskManagerServicesConfiguration.fromConfiguration`/`TaskManagerServices.fromConfiguration`
 and pass it as a parameter to `TaskManagerServices.fromConfiguration`. We 
could migrate completely `NetworkEnviroment` creation into 
`NetworkEnviroment.fromConfiguration(configuration)` to get closer to 
`ShuffleMaster.createShuffleService(configuration)`. Probably, as a separate 
commit.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to