Skip to content

Commit efdc573

Browse files
committed
[SPARK-5691] Fixing wrong data structure lookup for dupe app registration
In Master's registerApplication method, it checks if the application had already registered by examining the addressToWorker hash map. In reality, it should refer to the addressToApp data structure, as this is what really tracks which apps have been registered.
1 parent 0793ee1 commit efdc573

File tree

1 file changed

+1
-1
lines changed
  • core/src/main/scala/org/apache/spark/deploy/master

1 file changed

+1
-1
lines changed

core/src/main/scala/org/apache/spark/deploy/master/Master.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ private[spark] class Master(
671671

672672
def registerApplication(app: ApplicationInfo): Unit = {
673673
val appAddress = app.driver.path.address
674-
if (addressToWorker.contains(appAddress)) {
674+
if (addressToApp.contains(appAddress)) {
675675
logInfo("Attempted to re-register application at same address: " + appAddress)
676676
return
677677
}

0 commit comments

Comments
 (0)