azagrebin commented on a change in pull request #9910: [FLINK-14405][runtime] 
Align ResourceProfile/ResourceSpec fields with the new TaskExecutor memory 
setups.
URL: https://github.com/apache/flink/pull/9910#discussion_r337402043
 
 

 ##########
 File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/clusterframework/types/ResourceProfile.java
 ##########
 @@ -341,16 +406,15 @@ public int hashCode() {
        public boolean equals(Object obj) {
                if (obj == this) {
                        return true;
-               }
-               else if (obj != null && obj.getClass() == 
ResourceProfile.class) {
+               } else if (obj != null && obj.getClass() == 
ResourceProfile.class) {
                        ResourceProfile that = (ResourceProfile) obj;
                        return this.cpuCores == that.cpuCores &&
-                                       this.heapMemoryInMB == 
that.heapMemoryInMB &&
-                                       this.directMemoryInMB == 
that.directMemoryInMB &&
-                                       this.nativeMemoryInMB == 
that.nativeMemoryInMB &&
-                                       this.networkMemoryInMB == 
that.networkMemoryInMB &&
-                                       this.managedMemoryInMB == 
that.managedMemoryInMB &&
-                                       Objects.equals(extendedResources, 
that.extendedResources);
+                               (this.taskOffHeapMemory == null ? 
that.taskHeapMemory == null : this.taskHeapMemory.equals(that.taskHeapMemory)) 
&&
 
 Review comment:
   also `Objects.equals`

----------------------------------------------------------------
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

Reply via email to