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_r336042781
##########
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:
Offline conclusion: exclude `INFINITE` renaming for now. Later follow-up
could be a proper separation of profile and requirement concerns to not mix
them in one class.
----------------------------------------------------------------
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