Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-28063

Drop PerfLogger#setPerfLogger method and unused fields/methods

    XMLWordPrintableJSON

Details

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              zabetak Stamatis Zampetakis
              zabetak Stamatis Zampetakis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: