Ngone51 commented on a change in pull request #24569: [SPARK-23191][CORE] Warn
rather than terminate when duplicate worker register happens
URL: https://github.com/apache/spark/pull/24569#discussion_r283745431
##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -393,12 +393,20 @@ private[deploy] class Worker(
private def handleRegisterResponse(msg: RegisterWorkerResponse): Unit =
synchronized {
msg match {
- case RegisteredWorker(masterRef, masterWebUiUrl, masterAddress) =>
- if (preferConfiguredMasterAddress) {
- logInfo("Successfully registered with master " +
masterAddress.toSparkURL)
- } else {
- logInfo("Successfully registered with master " +
masterRef.address.toSparkURL)
+ case RegisteredWorker(masterRef, masterWebUiUrl, masterAddress,
duplicate) =>
+ val preferredMasterAddress = {
+ if (preferConfiguredMasterAddress) {
+ masterAddress.toSparkURL
+ } else {
+ masterRef.address.toSparkURL
+ }
+ }
+
+ if (duplicate) {
+ logWarning(s"Duplicate registration at master
$preferredMasterAddress")
Review comment:
Good idea, I'll update it.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]