wangyang0918 commented on a change in pull request #9587: [FLINK-13685][yarn]
Validate YARN deployment against YARN scheduler maximum vcore size
URL: https://github.com/apache/flink/pull/9587#discussion_r320558203
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/AbstractYarnClusterDescriptor.java
##########
@@ -483,12 +483,14 @@ private void
validateClusterSpecification(ClusterSpecification clusterSpecificat
}
final int yarnMinAllocationMB =
yarnConfiguration.getInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB,
0);
+ final int yarnSchedulerMaxVcores =
yarnConfiguration.getInt(YarnConfiguration.RM_SCHEDULER_MAXIMUM_ALLOCATION_VCORES,
0);
Review comment:
@gyfora I think you misunderstood my point. The `maximumResourceCapability`
what i mean is `GetNewApplicationResponse.getMaximumResourceCapability()`. I
have checked the yarn code and write a unit test to confirm. The
`maximumResourceCapability.getVirtualCores()` returns the correct max
allocation vcores of yarn scheduler. It is equals to the min one of
`yarn.scheduler.maximum-allocation-vcores` and
`yarn.nodemanager.resource.vcores`.
Get the max allocation vcores from yarn configuration in flink client in not
very good. We should better get it from the yarn RM side.
----------------------------------------------------------------
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