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_r409622180
##########
File path:
flink-yarn/src/main/java/org/apache/flink/yarn/RegisterApplicationMasterResponseReflector.java
##########
@@ -96,7 +110,40 @@
}
@VisibleForTesting
- Method getMethod() {
- return method;
+ Method getGetContainersFromPreviousAttemptsMethod() {
+ return getContainersFromPreviousAttemptsMethod;
+ }
+
+ /**
+ * Get names of resource types that are considered by the Yarn
scheduler.
+ * @param response The response object from the registration at the
ResourceManager.
+ * @return A set of resource type names, or {@link Optional#empty()} if
the Yarn version does not support this API.
+ */
+ Optional<Set<String>> getSchedulerResourceTypeNames(final
RegisterApplicationMasterResponse response) {
+ return getSchedulerResourceTypeNamesUnsafe(response);
+ }
+
+ @VisibleForTesting
+ Optional<Set<String>> getSchedulerResourceTypeNamesUnsafe(final Object
response) {
Review comment:
```suggestion
private Optional<Set<String>> getSchedulerResourceTypeNamesUnsafe(final
Object response) {
```
and remove `@VisibleForTesting`.
----------------------------------------------------------------
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