You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "dongjoon-hyun (via GitHub)" <gi...@apache.org> on 2023/04/10 05:22:30 UTC

[GitHub] [spark] dongjoon-hyun commented on a diff in pull request #40637: [SPARK-43002][YARN] Modify yarn client application report logging frequency to reduce noise

dongjoon-hyun commented on code in PR #40637:
URL: https://github.com/apache/spark/pull/40637#discussion_r1161442071


##########
resource-managers/yarn/src/main/scala/org/apache/spark/deploy/yarn/Client.scala:
##########
@@ -1160,9 +1162,12 @@ private[spark] class Client(
               Some(msg))
         }
       val state = report.getYarnApplicationState
-
+      reportsSinceLastLog += 1
       if (logApplicationReport) {
-        logInfo(s"Application report for $appId (state: $state)")
+        if (reportsSinceLastLog >= reportsTillNextLog || lastState != state) {

Review Comment:
   nit. According to the description, shall we put state check first?
   ```scala
   - if (reportsSinceLastLog >= reportsTillNextLog || lastState != state) {
   + if (lastState != state || reportsSinceLastLog >= reportsTillNextLog) {
   ```
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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