You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/04/17 13:46:40 UTC

[GitHub] [flink] azagrebin commented on a change in pull request #8191: [FLINK-12213][network] Pass TaskManagerMetricGroup into constructor of NetworkEnvironment

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_r276233404
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/io/network/NetworkEnvironment.java
 ##########
 @@ -63,11 +70,19 @@
 
 	private boolean isShutdown;
 
-	public NetworkEnvironment(NetworkEnvironmentConfiguration config, TaskEventPublisher taskEventPublisher) {
+	public NetworkEnvironment(
 
 Review comment:
   From dependency injection perspective, could we add a static factory method here which would create all dependency components, like networkBufferPool, connectionManager, doing metrics registration etc? Then it could just call the private constructor passing all configured dependencies. I know we do not use this constructor at the moment but it would help to keep code cleaner in long term. At the end `ShuffleMaster.createShuffleService(flinkConfig)` could merge parsing `NetworkEnvironmentConfiguration` and creation of dependency components before creating `NetworkEnvironment` as `ShuffleService`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services