xintongsong commented on code in PR #21331:
URL: https://github.com/apache/flink/pull/21331#discussion_r1024797669
##########
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/ConnectionID.java:
##########
@@ -75,15 +84,18 @@ public boolean equals(Object other) {
}
final ConnectionID ra = (ConnectionID) other;
- if (!ra.getAddress().equals(address) || ra.getConnectionIndex() !=
connectionIndex) {
- return false;
- }
-
- return true;
+ return ra.getAddress().equals(address)
+ && ra.getConnectionIndex() == connectionIndex
+ && ra.getResourceID().equals(resourceID);
}
@Override
public String toString() {
- return address + " [" + connectionIndex + "]";
+ return address
+ + " ["
+ + connectionIndex
+ + "]"
+ + " resourceID: "
+ + resourceID.getStringWithMetadata();
Review Comment:
Below is how a connection-id is printed.
```
localhost/127.0.0.1:10000 [10] resourceID: producerLocation
```
It would be nice to have a more concise format. E.g.,
```
localhost/127.0.0.1:10000 (producerLocation) [10]
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]