tillrohrmann commented on a change in pull request #11353: [FLINK-16438][yarn]
Make YarnResourceManager starts workers using WorkerResourceSpec requested by
SlotManager
URL: https://github.com/apache/flink/pull/11353#discussion_r409619888
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/RegisterApplicationMasterResponseReflector.java
##########
@@ -53,12 +59,20 @@
requireNonNull(clazz);
try {
- method =
clazz.getMethod("getContainersFromPreviousAttempts");
+ getContainersFromPreviousAttemptsMethod =
clazz.getMethod("getContainersFromPreviousAttempts");
} catch (NoSuchMethodException e) {
// that happens in earlier Hadoop versions (pre 2.2)
logger.info("Cannot reconnect to previously allocated
containers. " +
"This YARN version does not support
'getContainersFromPreviousAttempts()'");
}
+
+ try {
+ getSchedulerResourceTypesMethod =
clazz.getMethod("getSchedulerResourceTypes");
+ } catch (NoSuchMethodException e) {
+ // that happens in earlier Hadoop versions (pre 2.6)
+ logger.info("Cannot get scheduler resource types. " +
+ "This YARN version does not support
'getSchedulerResourceTypes()'");
+ }
Review comment:
One could think about factoring the lookup of methods and the logging
statement out into a another method to avoid code duplication.
----------------------------------------------------------------
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