Uploaded image for project: 'Hadoop Common'
  1. Hadoop Common
  2. HADOOP-13484

Log refactoring: method invocation should be replaced by variable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Major
    • Resolution: Unresolved
    • 2.7.2
    • None
    • metrics
    • None

    Description

      Similar to the fix for HDFS-409. In file:

      hadoop-rel-release-2.7.2/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/metrics2/lib/MutableRates.java

      In code block:

      String name = method.getName();
      LOG.debug(name);
      try { registry.newRate(name, name, false, true); }
      catch (Exception e) {
              LOG.error("Error creating rate metrics for "+ method.getName(), e);
      }
      

      method.getName() is better to be replaced by variable name.

      Attachments

        1. HADOOP-13484.001.patch
          0.8 kB
          Vrushali C

        Activity

          People

            vrushalic Vrushali C
            chenfsd Nemo Chen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: