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

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

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

    https://github.com/apache/flink/pull/4991#discussion_r156717989
  
    --- Diff: 
flink-runtime/src/test/java/org/apache/flink/runtime/clusterframework/types/ResourceProfileTest.java
 ---
    @@ -18,19 +18,21 @@
     
     package org.apache.flink.runtime.clusterframework.types;
     
    +import org.apache.flink.api.common.operators.ResourceSpec;
     import org.junit.Test;
     
    +import static org.junit.Assert.assertEquals;
     import static org.junit.Assert.assertFalse;
     import static org.junit.Assert.assertTrue;
     
     public class ResourceProfileTest {
     
        @Test
        public void testMatchRequirement() throws Exception {
    -           ResourceProfile rp1 = new ResourceProfile(1.0, 100, 100, 100);
    -           ResourceProfile rp2 = new ResourceProfile(1.0, 200, 200, 200);
    -           ResourceProfile rp3 = new ResourceProfile(2.0, 100, 100, 100);
    -           ResourceProfile rp4 = new ResourceProfile(2.0, 200, 200, 200);
    +           ResourceProfile rp1 = new ResourceProfile(1.0, 100, 100, 100, 
0, 0, null);
    --- End diff --
    
    better to use `Collections.emptyMap` because the extended resources is not 
marked as `Nullable`.


> Extend the filed in ResourceProfile for precisely calculating the resource of 
> a task manager
> --------------------------------------------------------------------------------------------
>
>                 Key: FLINK-7928
>                 URL: https://issues.apache.org/jira/browse/FLINK-7928
>             Project: Flink
>          Issue Type: Improvement
>          Components: JobManager, ResourceManager
>            Reporter: shuai.xu
>            Assignee: shuai.xu
>              Labels: flip-6
>
> ResourceProfile records all the resource requirements for a slot。It is 
> generated by JobMaster and then passed to ResourceManager with the slot 
> request. 
> A task in the slot needs three parts of resource: 
> 1. The resource for the operators, this is specified by the ResourceSpec user 
> defined 
> 2. The resource for the operators to communicating with their upstreams. For 
> example, the resource for buffer pools and so on.
> 3. The resource for the operators to communicating with their downstreams. 
> Same as above.
> So ResourceProfile should contain three parts of resource, the first part 
> from ResouceSpec, and the other two part be generated by Job Master.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to