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 2019/05/14 10:52:21 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #24569: [SPARK-23191][CORE] Warn rather than terminate when duplicate worker register happens

cloud-fan 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_r283738488
 
 

 ##########
 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:
   would be good to include the possible reasons for this case, so that end users know what's going on.

----------------------------------------------------------------
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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org