You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/04/30 06:30:07 UTC
[GitHub] [spark] wForget commented on a change in pull request #32395: [SPARK-35270][SQL][CORE] Remove the use of guava in order to upgrade guava version to 27
wForget commented on a change in pull request #32395:
URL: https://github.com/apache/spark/pull/32395#discussion_r623641360
##########
File path: common/network-shuffle/src/main/java/org/apache/spark/network/shuffle/RemoteBlockPushResolver.java
##########
@@ -760,19 +762,19 @@ public boolean equals(Object o) {
return false;
}
AppShuffleId that = (AppShuffleId) o;
- return shuffleId == that.shuffleId && Objects.equal(appId, that.appId);
+ return shuffleId == that.shuffleId && Objects.equals(appId, that.appId);
}
@Override
public int hashCode() {
- return Objects.hashCode(appId, shuffleId);
+ return Objects.hash(appId, shuffleId);
}
@Override
public String toString() {
- return Objects.toStringHelper(this)
- .add("appId", appId)
- .add("shuffleId", shuffleId)
+ return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
Review comment:
The results are different. Using Objects to return is like "AppShuffleId{appId=appId, shuffleId=100}", using ToStringBuilder to return is like "RemoteBlockPushResolver.AppShuffleId[appId=appId,shuffleId=100]". Will it cause some problems?
--
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
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org