Github user Sephiroth-Lin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/5305#discussion_r27777372
  
    --- Diff: yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala ---
    @@ -559,50 +560,56 @@ private[spark] class Client(
         var lastState: YarnApplicationState = null
         while (true) {
           Thread.sleep(interval)
    -      val report = getApplicationReport(appId)
    -      val state = report.getYarnApplicationState
    -
    -      if (logApplicationReport) {
    -        logInfo(s"Application report for $appId (state: $state)")
    -        val details = Seq[(String, String)](
    -          ("client token", getClientToken(report)),
    -          ("diagnostics", report.getDiagnostics),
    -          ("ApplicationMaster host", report.getHost),
    -          ("ApplicationMaster RPC port", report.getRpcPort.toString),
    -          ("queue", report.getQueue),
    -          ("start time", report.getStartTime.toString),
    -          ("final status", report.getFinalApplicationStatus.toString),
    -          ("tracking URL", report.getTrackingUrl),
    -          ("user", report.getUser)
    -        )
    -
    -        // Use more loggable format if value is null or empty
    -        val formattedDetails = details
    -          .map { case (k, v) =>
    -          val newValue = Option(v).filter(_.nonEmpty).getOrElse("N/A")
    -          s"\n\t $k: $newValue" }
    -          .mkString("")
    -
    -        // If DEBUG is enabled, log report details every iteration
    -        // Otherwise, log them every time the application changes state
    -        if (log.isDebugEnabled) {
    -          logDebug(formattedDetails)
    -        } else if (lastState != state) {
    -          logInfo(formattedDetails)
    +      try {
    +        val report = getApplicationReport(appId)
    --- End diff --
    
    Done. Thank you!!!


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to