You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@celeborn.apache.org by "waitinfuture (via GitHub)" <gi...@apache.org> on 2023/02/20 12:37:52 UTC

[GitHub] [incubator-celeborn] waitinfuture commented on a diff in pull request #1239: [CELEBORN-302] Fix workers count out of sync in HA mode.

waitinfuture commented on code in PR #1239:
URL: https://github.com/apache/incubator-celeborn/pull/1239#discussion_r1111891917


##########
common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala:
##########
@@ -259,17 +259,22 @@ class WorkerInfo(
        |""".stripMargin
   }
 
-  override def equals(obj: Any): Boolean = {
-    val other = obj.asInstanceOf[WorkerInfo]
-    host == other.host &&
-    rpcPort == other.rpcPort &&
-    pushPort == other.pushPort &&
-    fetchPort == other.fetchPort &&
-    replicatePort == other.replicatePort
+  private def canEqual(other: Any): Boolean = other.isInstanceOf[WorkerInfo]
+
+  override def equals(other: Any): Boolean = other match {
+    case that: WorkerInfo =>
+      that.canEqual(this) &&

Review Comment:
   useless



##########
common/src/main/scala/org/apache/celeborn/common/meta/WorkerInfo.scala:
##########
@@ -259,17 +259,22 @@ class WorkerInfo(
        |""".stripMargin
   }
 
-  override def equals(obj: Any): Boolean = {
-    val other = obj.asInstanceOf[WorkerInfo]
-    host == other.host &&
-    rpcPort == other.rpcPort &&
-    pushPort == other.pushPort &&
-    fetchPort == other.fetchPort &&
-    replicatePort == other.replicatePort
+  private def canEqual(other: Any): Boolean = other.isInstanceOf[WorkerInfo]

Review Comment:
   useless



-- 
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: issues-unsubscribe@celeborn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org