Github user dawidwys commented on a diff in the pull request:

    https://github.com/apache/flink/pull/5448#discussion_r197708483
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
 ---
    @@ -482,14 +484,15 @@ private static NetworkEnvironment 
createNetworkEnvironment(
        public static long calculateNetworkBufferMemory(long 
totalJavaMemorySize, Configuration config) {
                Preconditions.checkArgument(totalJavaMemorySize > 0);
     
    -           int segmentSize = 
config.getInteger(TaskManagerOptions.MEMORY_SEGMENT_SIZE);
    +           int segmentSize = (int) 
MemorySize.parse(config.getString(TaskManagerOptions.MEMORY_SEGMENT_SIZE)).getBytes();
    --- End diff --
    
    Use `checkedDownCast`


---

Reply via email to