azagrebin commented on a change in pull request #8090: [FLINK-12067][network] 
Refactor the constructor of NetworkEnvironment
URL: https://github.com/apache/flink/pull/8090#discussion_r271829700
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskmanager/NetworkEnvironmentConfiguration.java
 ##########
 @@ -105,6 +106,302 @@ public NettyConfig nettyConfig() {
                return nettyConfig;
        }
 
+       public boolean isCreditBased() {
+               return isCreditBased;
+       }
+
+       // 
------------------------------------------------------------------------
+
+       /**
+        * Utility method to extract network related parameters from the 
configuration and to
+        * sanity check them.
+        *
+        * @param configuration configuration object
+        * @param maxJvmHeapMemory the maximum JVM heap size (in bytes)
+        * @param localTaskManagerCommunication true, to skip initializing the 
network stack
+        * @param taskManagerAddress identifying the IP address under which the 
TaskManager will be accessible
+        * @return NetworkEnvironmentConfiguration
+        */
+       @Deprecated
+       public static NetworkEnvironmentConfiguration fromConfiguration(
+               Configuration configuration,
+               long maxJvmHeapMemory,
+               boolean localTaskManagerCommunication,
+               InetAddress taskManagerAddress) {
+
+               // ----> hosts / ports for communication and data exchange
+
+               final int dataport = 
configuration.getInteger(TaskManagerOptions.DATA_PORT);
 
 Review comment:
   Could we break down this method a bit more?
   I mean adding functions:
   - getDataport()
   - calculateNumberOfNetworkBuffers
   - createNettyConfig

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


With regards,
Apache Git Services

Reply via email to