Github user tillrohrmann commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4911#discussion_r154965306
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/api/common/operators/ResourceSpec.java
 ---
    @@ -183,17 +240,124 @@ public int hashCode() {
                result = 31 * result + directMemoryInMB;
                result = 31 * result + nativeMemoryInMB;
                result = 31 * result + stateSizeInMB;
    +           result = 31 * result + extendedResources.hashCode();
                return result;
        }
     
        @Override
        public String toString() {
    +           String extend = "";
    +           for (Resource resource : extendedResources.values()) {
    +                   extend += ", " + resource.name + "=" + resource.value;
    +           }
                return "ResourceSpec{" +
                                "cpuCores=" + cpuCores +
                                ", heapMemoryInMB=" + heapMemoryInMB +
                                ", directMemoryInMB=" + directMemoryInMB +
                                ", nativeMemoryInMB=" + nativeMemoryInMB +
    -                           ", stateSizeInMB=" + stateSizeInMB +
    +                           ", stateSizeInMB=" + stateSizeInMB + extend +
                                '}';
        }
    +
    +   public static abstract class Resource implements Serializable {
    +           final private String name;
    +
    +           final private Double value;
    --- End diff --
    
    Wrong order of keywords: `private final`


---

Reply via email to