You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/08/04 22:13:15 UTC

[GitHub] [spark] kevin85421 opened a new pull request, #37409: [SPARK-39970] Introduce ThrottledLogger to prevent log message flooding caused by network issues

kevin85421 opened a new pull request, #37409:
URL: https://github.com/apache/spark/pull/37409

   ### What changes were proposed in this pull request?
   This PR implemented a ThrottledLogger, a logger with RateLimiters, to prevent  log message flooding caused by network issues. In our ThrottledLogger, we enable users to register prefixes. Each prefix has its RateLimiter, and each prefix has its rate limit strategy (by setting different value of `throttlingSeconds`). Each RateLimiter will create a permit per second, and printing a message needs to acquire `throttlingSeconds` permits. For example, 
   
   ```java
   ThrottledLogger tlogger = new ThrottledLogger("ThrottledLogger");
   tlogger.registerPrefix("msg", 2); // Printing a message with the prefix "msg" consumes 2 permits.
   
   // will be printed
   tlogger.info("msg1"); 
   
   // The RateLimiter of prefix "msg" does not have enough permits. => will not be printed
   tlogger.info("msg2"); 
   
   // The message which does not match with any registered prefix will always be printed.
   tlogger.info("abc"); 
   
   // Sleep two seconds, and the RateLimiter will get 2 permits.
   Thread.sleep(2000);
   
   // The RateLimiter of the prefix "msg" has enough permits. => print
   tlogger.info("msg3");
   ```
   
   
   ### Why are the changes needed?
   When transient network error occurs, Spark may write out a large volume of error logs related to the network errors. The excessive logging can create further problems downstream, e.g. blow up our log storage. If we can combine / batch the network errors when they come in a burst, we only print out periodic summaries of errors that are happening repeatedly in a short time window.
   
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   ```
   build/sbt "network-common/testOnly *ThrottledLoggerSuite"
   ```
   


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


[GitHub] [spark] kevin85421 commented on pull request #37409: [SPARK-39970] Introduce ThrottledLogger to prevent log message flooding caused by network issues

Posted by GitBox <gi...@apache.org>.
kevin85421 commented on PR #37409:
URL: https://github.com/apache/spark/pull/37409#issuecomment-1205821679

   cc. @Ngone51 @jiangxb1987 


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


[GitHub] [spark] AmplabJenkins commented on pull request #37409: [SPARK-39970][CORE] Introduce ThrottledLogger to prevent log message flooding caused by network issues

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on PR #37409:
URL: https://github.com/apache/spark/pull/37409#issuecomment-1207133115

   Can one of the admins verify this patch?


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


[GitHub] [spark] github-actions[bot] closed pull request #37409: [SPARK-39970][CORE] Introduce ThrottledLogger to prevent log message flooding caused by network issues

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #37409: [SPARK-39970][CORE] Introduce ThrottledLogger to prevent log message flooding caused by network issues
URL: https://github.com/apache/spark/pull/37409


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


[GitHub] [spark] github-actions[bot] commented on pull request #37409: [SPARK-39970][CORE] Introduce ThrottledLogger to prevent log message flooding caused by network issues

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #37409:
URL: https://github.com/apache/spark/pull/37409#issuecomment-1314585785

   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


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