Skip to content

Commit f74bccb

Browse files
mccheahAndrew Or
authored andcommitted
[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 444ccdd commit f74bccb

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
@@ -608,7 +608,7 @@ private[spark] class Master(
608608

609609
def registerApplication(app: ApplicationInfo): Unit = {
610610
val appAddress = app.driver.path.address
611-
if (addressToWorker.contains(appAddress)) {
611+
if (addressToApp.contains(appAddress)) {
612612
logInfo("Attempted to re-register application at same address: " + appAddress)
613613
return
614614
}

0 commit comments

Comments
 (0)