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

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

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

    https://github.com/apache/flink/pull/2669#discussion_r84509754
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/minicluster/MiniClusterConfiguration.java
 ---
    @@ -96,11 +101,20 @@ public void setCommonRpcBindAddress(String 
bindAddress) {
                this.commonBindAddress = bindAddress;
        }
     
    +   public void setManagedMemoryPerTaskManager(long 
managedMemoryPerTaskManager) {
    +           checkArgument(managedMemoryPerTaskManager > 0, "must have more 
than 0 MB of memory for the TaskManager.");
    +           this.managedMemoryPerTaskManager = managedMemoryPerTaskManager;
    +   }
    +
        // 
------------------------------------------------------------------------
        //  getters
        // 
------------------------------------------------------------------------
     
        public Configuration getConfiguration() {
    +           // update the memory in case that we've changed the number of 
components (TM, RM, JM)
    +           long memory = calculateManagedMemoryPerTaskManager();
    --- End diff --
    
    Getters should usually not perform any calculation. How about changing the 
method name to `updateConfiguration()`? 


> Add memory calculation for TaskManagers and forward MetricRegistry
> ------------------------------------------------------------------
>
>                 Key: FLINK-4871
>                 URL: https://issues.apache.org/jira/browse/FLINK-4871
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Cluster Management
>            Reporter: Till Rohrmann
>            Assignee: Till Rohrmann
>            Priority: Minor
>
> Add automatic memory calculation for {{TaskManagers}} executed by the 
> {{MiniCluster}}. 
> Additionally, change the {{TaskManagerRunner}} to accept a given 
> {{MetricRegistry}} so that the one instantiated by the {{MiniCluster}} is 
> used.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to