Github user shuai-xu commented on a diff in the pull request: https://github.com/apache/flink/pull/4991#discussion_r156848154 --- Diff: flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java --- @@ -52,6 +63,15 @@ /** How many native memory in mb are needed */ private final int nativeMemoryInMB; + /** A extensible field for user specified resources from {@link ResourceSpec}. */ + private final Map<String, Double> extendedResources = new TreeMap<>(); --- End diff -- HashMap is not ordered, so when comparing two ResourceProfile, the result may differ if the extended resource are added in different order. Using TreeMap can promise the comparision of two ResourceProfile is always same if the extend resources is same.
---