shubhampatel28 opened a new pull request, #14354:
URL: https://github.com/apache/hudi/pull/14354

   ### Describe the issue this Pull Request addresses
   
   Introduces a SamplingLogger utility class that logs at INFO level once every 
N times, otherwise at DEBUG level. This allows reducing log volume while still 
maintaining periodic visibility into frequently executed code paths.
   
   Files added:
   
   SamplingLogger.java - thread-safe utility class that samples log output 
based on a configurable frequency
   TestSamplingLogger.java - Unit tests for the SamplingLogger
   Files modified:
   
   AbstractTableFileSystemView.java - Updated to use SamplingLogger for 
high-frequency log statements:
   "Building file system view for partition(s)": DEBUG for metadata tables, 
INFO once every 10 times for data tables
   "Took X ms to read Y instants, Z replaced file groups": INFO once every 5 
times to track latencies
   
   ### Impact
   
   User-facing impact: Reduced log volume for high-frequency operations while 
maintaining periodic INFO-level visibility for monitoring and debugging.
   
   
   ### Risk Level
   
   NONE
   
   ### Documentation Update
   
   <!-- Describe any necessary documentation update if there is any new 
feature, config, or user-facing change. If not, put "none".
   
   - The config description must be updated if new configs are added or the 
default value of the configs are changed.
   - Any new feature or user-facing change requires updating the Hudi website. 
Please follow the 
     [instruction](https://hudi.apache.org/contribute/developer-setup#website) 
to make changes to the website. -->
   
   ### Contributor's checklist
   
   - [x] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [x] Enough context is provided in the sections above
   - [x] Adequate tests were added if applicable
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to