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_r337396213
##########
File path: flink-core/src/main/java/org/apache/flink/api/common/operators/ResourceSpec.java
##########
@@ -257,12 +273,11 @@ public boolean equals(Object obj) {
} else if (obj != null && obj.getClass() == ResourceSpec.class) {
ResourceSpec that = (ResourceSpec) obj;
return this.cpuCores == that.cpuCores &&
- this.heapMemoryInMB == that.heapMemoryInMB &&
- this.directMemoryInMB == that.directMemoryInMB &&
- this.nativeMemoryInMB == that.nativeMemoryInMB &&
- this.stateSizeInMB == that.stateSizeInMB &&
- this.managedMemoryInMB == that.managedMemoryInMB &&
- Objects.equals(this.extendedResources, that.extendedResources);
+ (this.taskHeapMemory == null ? that.taskHeapMemory == null : this.taskHeapMemory.equals(that.taskHeapMemory))
&&
Review comment:
`Objects.equals` (also handles `null` btw)
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
|