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

Improve Logger for Operation Child Classes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • None
    • None

    Description

      The Operation class declares its logger this way:

      Operation.java
      public abstract class Operation {
        public static final Logger LOG = LoggerFactory.getLogger(Operation.class.getName());
        ...
      }
      

      Notice that this is an abstract class, but the Logger is tied to the Operation.class.getName(). This means that logging cannot be controlled for each subclass of Operation independently since they all use the same static Logger instance.

      Make the LOG a protected instance variable that inherits the name of the child class.

      Attachments

        1. HIVE-23099.5.patch
          16 kB
          David Mollitor
        2. HIVE-23099.5.patch
          16 kB
          David Mollitor
        3. HIVE-23099.5.patch
          16 kB
          David Mollitor
        4. HIVE-23099.4.patch
          16 kB
          David Mollitor
        5. HIVE-23099.4.patch
          16 kB
          David Mollitor
        6. HIVE-23099.3.patch
          16 kB
          David Mollitor
        7. HIVE-23099.2.patch
          15 kB
          David Mollitor
        8. HIVE-23099.1.patch
          15 kB
          David Mollitor

        Issue Links

          Activity

            People

              belugabehr David Mollitor
              belugabehr David Mollitor
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: