flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8212) Pull EnvironmentInformation out of TaskManagerServices
Date Wed, 14 Feb 2018 13:26:03 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16364012#comment-16364012
] 

ASF GitHub Bot commented on FLINK-8212:
---------------------------------------

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

    https://github.com/apache/flink/pull/5458#discussion_r168172098
  
    --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
---
    @@ -530,10 +538,12 @@ public static long calculateNetworkBufferMemory(long totalJavaMemorySize,
Config
     	 * </ul>.
     	 *
     	 * @param tmConfig task manager services configuration object
    +	 * @param maxJvmHeapMemory the maximum JVM heap size
     	 *
     	 * @return memory to use for network buffers (in bytes)
     	 */
    -	public static long calculateNetworkBufferMemory(TaskManagerServicesConfiguration tmConfig)
{
    +	public static long calculateNetworkBufferMemory(TaskManagerServicesConfiguration tmConfig,
    +													long maxJvmHeapMemory) {
    --- End diff --
    
    Same here with the parameters


> Pull EnvironmentInformation out of TaskManagerServices
> ------------------------------------------------------
>
>                 Key: FLINK-8212
>                 URL: https://issues.apache.org/jira/browse/FLINK-8212
>             Project: Flink
>          Issue Type: Improvement
>          Components: Local Runtime, Network
>    Affects Versions: 1.5.0
>            Reporter: Till Rohrmann
>            Priority: Major
>             Fix For: 1.5.0
>
>
> We should pull the {{EnvironmentInformation}} out of the {{TaskManagerServices}} where
it is used to get access to the memory settings of the executing JVM. This unnecessarily couples
the former with the latter and makes testing extremely hard (one has to use {{PowerMockRunner}}
and mock the static {{EnvironmentInformation}}).
> When addressing this issue, then we should also refactor {{NetworkBufferCalculationTest}}.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message