Uploaded image for project: 'Hadoop HDFS'
  1. Hadoop HDFS
  2. HDFS-14119

Improve GreedyPlanner Parameter Logging

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 3.3.0
    • 3.3.0
    • hdfs
    • None

    Description

      1. Do not use String.format() in conjunction with SLF4J. Superfluous.

      String message = String
      .format("Compute Plan for Node : %s:%d took %d ms ",
      node.getDataNodeName(), node.getDataNodePort(),
      endTime - startTime);
      LOG.info(message);

      2. Do not call an explicit toString() on an object with SLF4J parameter. Otherwise, the string will be created and then thrown away if the logger is not set to debug level. Just pass the object itself and the framework will call toString if needed.

      LOG.debug("Step : {} ",  nextStep.toString());
      

      Attachments

        1. HDFS-14119.1.patch
          3 kB
          David Mollitor

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: