Skip to content

Commit

Permalink
[SPARK-23956][YARN] Use effective RPC port in AM registration
Browse files Browse the repository at this point in the history
  • Loading branch information
gerashegalov committed Apr 11, 2018
1 parent 75a1830 commit cc67ccb
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -29,7 +29,6 @@ import org.apache.spark.{SecurityManager, SparkConf}
import org.apache.spark.deploy.yarn.config._
import org.apache.spark.internal.Logging
import org.apache.spark.rpc.RpcEndpointRef
import org.apache.spark.util.Utils

/**
* Handles registering and unregistering the application with the YARN ResourceManager.
Expand Down Expand Up @@ -71,7 +70,8 @@ private[spark] class YarnRMClient extends Logging {

logInfo("Registering the ApplicationMaster")
synchronized {
amClient.registerApplicationMaster(Utils.localHostName(), 0, trackingUrl)
amClient.registerApplicationMaster(driverRef.address.host, driverRef.address.port,
trackingUrl)
registered = true
}
new YarnAllocator(driverUrl, driverRef, conf, sparkConf, amClient, getAttemptId(), securityMgr,
Expand Down

0 comments on commit cc67ccb

Please sign in to comment.