flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] azagrebin commented on a change in pull request #9910: [FLINK-14405][runtime] Align ResourceProfile/ResourceSpec fields with the new TaskExecutor memory setups.
Date Wed, 16 Oct 2019 15:36:35 GMT
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message