Github user shuai-xu commented on a diff in the pull request:
https://github.com/apache/flink/pull/3304#discussion_r103129000
--- Diff:
flink-runtime/src/main/java/org/apache/flink/runtime/taskexecutor/TaskManagerServices.java
---
@@ -198,9 +197,9 @@ public static TaskManagerServices fromConfiguration(
final FileCache fileCache = new
FileCache(taskManagerServicesConfiguration.getTmpDirPaths());
- final List<ResourceProfile> resourceProfiles = new
ArrayList<>(taskManagerServicesConfiguration.getNumberOfSlots());
+ final List<ResourceProfile> resourceProfiles =
taskManagerServicesConfiguration.getResourceProfiles();
- for (int i = 0; i <
taskManagerServicesConfiguration.getNumberOfSlots(); i++) {
+ for (int i = resourceProfiles.size(); i <
taskManagerServicesConfiguration.getNumberOfSlots(); i++) {
resourceProfiles.add(new ResourceProfile(1.0, 42L));
--- End diff --
Now only yarn resource manager will add resource profiles in the config,
for standalone, there are none. so the resourceProfiles.size() will be zero,
still need to add a ResourceProfile here. I think adding one can match all
other resource profile is a good idea, I will introduce it.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---