azagrebin commented on a change in pull request #9910: [FLINK-14405][runtime] 
Align ResourceProfile/ResourceSpec fields with the new TaskExecutor memory 
setups.
URL: https://github.com/apache/flink/pull/9910#discussion_r335492412
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java
 ##########
 @@ -51,11 +52,19 @@
 
        private static final long serialVersionUID = 1L;
 
-       /** A ResourceProfile that indicates an unknown set of resources. */
+       /**
+        * A ResourceProfile that indicates an unknown resource requirement.
+        * This is mainly used for describing resource requirements that the 
exact amount of resource needed is not specified.
+        * It can also be used for describing remaining resource of a multi 
task slot that contains tasks with unknown resource requirements.
+        * It should not used for describing total resource of a task executor 
/ slot, which should always be specific.
+        * */
        public static final ResourceProfile UNKNOWN = new ResourceProfile();
 
-       /** ResourceProfile which matches any other ResourceProfile. */
-       public static final ResourceProfile ANY = new 
ResourceProfile(Double.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, 
Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, 
Collections.emptyMap());
+       /**
+        * A ResourceProfile that indicates infinite resource that matches any 
resource requirement, for testability purpose only.
+        * */
+       @VisibleForTesting
+       public static final ResourceProfile INFINITE = new 
ResourceProfile(Double.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, 
Integer.MAX_VALUE, Integer.MAX_VALUE, Integer.MAX_VALUE, 
Collections.emptyMap());
 
 Review comment:
   I agree, that `INFINITE` might be a bit better name. One could also argue 
that `ANY` means any amount of resources is available. Is it really important 
to change the git history because of this naming?
   `UNKNOWN` could be also then renamed to `UNKNOWN_REQ(UIREMENT)` because it 
is not a profile but a requirement.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to