zabetak opened a new pull request, #5066:
URL: https://github.com/apache/hive/pull/5066

   ### Why are the changes needed?
   The PerfLogger#setPerfLogger is redundant and error-prone.
   
   The small number of current uses could be replaced by simply calling the 
respective getter (which implicitly changes the underlying ThreadLocal 
variable).
   
   Ideally thread local variable should never be set after obtaining the 
initial value. Moreover, allowing any caller to change the thread local 
variable can affect the correctness of the program.
   
   Dropping this method improves the encapsulation and readability of the class.
   
   The org.apache.hadoop.hive.metastore.metrics.PerfLogger has various unused 
fields/methods that can be removed as well to improve encapsulation, 
readability, and maintenance.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### Is the change a dependency upgrade?
   No
   
   ### How was this patch tested?
   Existing tests


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to