Github user jerryshao commented on a diff in the pull request:

    https://github.com/apache/spark/pull/21243#discussion_r186633839
  
    --- Diff: 
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala
 ---
    @@ -389,37 +389,40 @@ private[spark] class ApplicationMaster(args: 
ApplicationMasterArguments) extends
       }
     
       private def registerAM(
    +      host: String,
    +      port: Int,
           _sparkConf: SparkConf,
    -      _rpcEnv: RpcEnv,
    -      driverRef: RpcEndpointRef,
    -      uiAddress: Option[String]) = {
    +      uiAddress: Option[String]): Unit = {
         val appId = client.getAttemptId().getApplicationId().toString()
         val attemptId = client.getAttemptId().getAttemptId().toString()
         val historyAddress = ApplicationMaster
           .getHistoryServerAddress(_sparkConf, yarnConf, appId, attemptId)
     
    -    val driverUrl = RpcEndpointAddress(
    -      _sparkConf.get("spark.driver.host"),
    -      _sparkConf.get("spark.driver.port").toInt,
    +    client.register(host, port, yarnConf, _sparkConf, uiAddress, 
historyAddress)
    +    registered = true
    +  }
    +
    +  private def createAllocator(driverRef: RpcEndpointRef, _sparkConf: 
SparkConf): Unit = {
    --- End diff --
    
    What is the purpose of separating into two methods? Sorry I cannot get the 
point.


---

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

Reply via email to