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

Xintong Song commented on FLINK-14869:
--------------------------------------

We plan to support extended resources for fine grained resource management.

For FLIP-156, only {{ResourceProfile}} will be used. We probably will need 
{{ResourceSpec}} as well in future, as a public interface to avoid expose all 
the details of {{ResourceProfile}} to users.

I'll fix this for both {{ResourceProfile/ResourceSpec}}.

> Force an extended resource to be null if it's value is 0
> --------------------------------------------------------
>
>                 Key: FLINK-14869
>                 URL: https://issues.apache.org/jira/browse/FLINK-14869
>             Project: Flink
>          Issue Type: Improvement
>          Components: Runtime / Coordination
>    Affects Versions: 1.10.0
>            Reporter: Zhu Zhu
>            Priority: Major
>
> {{Resource}} accepts value 0 at the moment because 0 {{CPUResource}} is used 
> in production to indicate no strict requirement for CPU cores. 
> However, keeping extended resources with value 0 is causing troubles. 
> e.g. There can be 2 ResourceSpecs, rs1 and rs2, with the same resources 
> except that rs1 contains a GPUResource with value 0 while rs2 does not 
> contains a specified GPUResource. In this case, rs1.equals(rs2)==false and 
> rs1.isLessOrEqualThan(rs2)==false, which is not correct.
> Accepting both 0 and null extended resources is also making things more 
> complex, since we need to consider it in all 
> comparisons(equals/lessThanOrEqual/isMatch) and aggregations(merge/subtract).
> To be simple, I'd propose to change it like this: in 
> ResourceSpec/ResourceProfile we only keep extended resource with positive 
> values. To be specific, if in the constructors of 
> ResourceSpec/ResourceProfile, a specified extended resource is found to be 0, 
> it must be dropped so that 0 resource would always be null.
> cc [~chesnay]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to