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

    https://github.com/apache/spark/pull/3471#discussion_r21309571
  
    --- Diff: 
yarn/common/src/main/scala/org/apache/spark/deploy/yarn/ApplicationMaster.scala 
---
    @@ -353,13 +355,13 @@ private[spark] class ApplicationMaster(args: 
ApplicationMasterArguments,
         val hostport = args.userArgs(0)
         val (driverHost, driverPort) = Utils.parseHostPort(hostport)
     
    -    // spark driver should already be up since it launched us, but we 
don't want to
    +    // Spark driver should already be up since it launched us, but we 
don't want to
         // wait forever, so wait 100 seconds max to match the cluster mode 
setting.
    -    // Leave this config unpublished for now. SPARK-3779 to investigating 
changing
    -    // this config to be time based.
    -    val numTries = 
sparkConf.getInt("spark.yarn.applicationMaster.waitTries", 1000)
    +    val waitTime = 100
    +    val totalWaitTime = 
sparkConf.getInt("spark.yarn.applicationMaster.waitTime", 100000)
    +    val deadline = System.currentTimeMillis + totalWaitTime
     
    -    while (!driverUp && !finished && count < numTries) {
    +    while (!driverUp && !finished && System.currentTimeMillis < deadline + 
waitTime) {
           try {
             count = count + 1
    --- End diff --
    
    count isn't needed anymore


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to