Github user sarutak commented on the pull request:

    https://github.com/apache/spark/pull/3143#issuecomment-62239300
  
    @JoshRosen You mean we should call `ClientBase#monitorApplication()` with 
blocking parameter instead of implementing similar code. In a nut shell, like 
following code?
    
    
        private def asyncMonitorApplication(): Unit = {
          assert(client != null && appId != null, "Application has not been 
submitted yet!")
          val t = new Thread {
            override def run() {
              val (state, _) = client.monitorApplication(appId, returnOnRunning 
= false) // blocking
              if (!stopping) {
                logError(s"Yarn application has already exited with state 
$state!")
                sc.stop()
              }
            }
          }
          t.setName("Yarn application state monitor")
          t.setDaemon(true)
          t.start()
        }


---
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