Jiayi-Liao commented on a change in pull request #11176:
URL: https://github.com/apache/flink/pull/11176#discussion_r433629963



##########
File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java
##########
@@ -566,6 +562,22 @@ private ClusterSpecification validateClusterResources(
 
        }
 
+       private void logIfComponentMemNotIntegerMultipleOfYarnMinAllocation(
+                       String componentName,
+                       int componentMemoryMB,
+                       int yarnMinAllocationMB) {
+               int normalizedMemMB = (componentMemoryMB + (yarnMinAllocationMB 
- 1)) / yarnMinAllocationMB * yarnMinAllocationMB;

Review comment:
       @wangyang0918 
   What if `yarnMinAllocationMB` equals to zero, which is the default value set 
in 
https://github.com/apache/flink/blob/03b82f9aa81b828b06c61f7f30f92a331ec5120b/flink-yarn/src/main/java/org/apache/flink/yarn/YarnClusterDescriptor.java#L511
   
   I think we can add a pre condition here:
   
   ```
   if (yarnMinAllocationMB == 0) {
        return;
   }
   ```




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to