-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HADOOP-19280. [ABFS] Initialize client timer only if metric collection is enabled (branch-3.4) #7307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HADOOP-19280. [ABFS] Initialize client timer only if metric collection is enabled (branch-3.4) #7307
Conversation
…" changes to branch-3.4
🎊 +1 overall
This message was automatically generated. |
🎊 +1 overall
This message was automatically generated. |
============================================================
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Main PR: #7061
Description of PR
JIRA: https://issues.apache.org/jira/browse/HADOOP-19280
Current Flow: In the current flow, we are initializing the timer of the abfs-timer-client outside the metric collection enable check. As a result, for each file system, when the AbfsClient object is initialized, it spawns a thread to evaluate the time of the ABFS client. Since we are purging/closing the timer inside the metric collection check, these threads are not being closed, causing them to persist in a long-lived state.
Changes Made: This PR contains the changes related to moving the initialization of the timer inside the metric collection check. Also includes check on metric collection if we are accessing the timer variable to avoid the null pointer exception.
Created two test suites to check the behaviour of timer variable and thread spawn in case of metric collection enabled and disabled.