You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2023/12/10 21:31:17 UTC

Re: [PR] [SPARK-46353][CORE] Refactor to improve `RegisterWorker` unit test coverage [spark]

dongjoon-hyun commented on code in PR #44284:
URL: https://github.com/apache/spark/pull/44284#discussion_r1421819742


##########
core/src/main/scala/org/apache/spark/deploy/master/Master.scala:
##########
@@ -676,6 +649,46 @@ private[deploy] class Master(
     logInfo(f"Recovery complete in ${timeTakenNs / 1000000000d}%.3fs - resuming operations!")
   }
 
+  private[master] def handleRegisterWorker(rw: RegisterWorker): Unit = {
+    val id: String = rw.id
+    val workerHost: String = rw.host
+    val workerPort: Int = rw.port
+    val workerRef: RpcEndpointRef = rw.worker
+    val workerWebUiUrl: String = rw.workerWebUiUrl
+    val memory: Int = rw.memory
+    val cores: Int = rw.cores
+    val masterAddress: RpcAddress = rw.masterAddress
+    val resources: Map[String, ResourceInformation] = rw.resources
+
+    logInfo("Registering worker %s:%d with %d cores, %s RAM".format(

Review Comment:
   The following is a `copy&paste` of the existing code.



-- 
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: reviews-unsubscribe@spark.apache.org

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