BELUGA BEHR created HDFS-14119:
----------------------------------

             Summary: GreedyPlanner Parameter Logging
                 Key: HDFS-14119
                 URL: https://issues.apache.org/jira/browse/HDFS-14119
             Project: Hadoop HDFS
          Issue Type: Improvement
          Components: hdfs
    Affects Versions: 3.3.0
            Reporter: BELUGA BEHR
         Attachments: HDFS-14119.1.patch

1. Do not use {{String.format()}} in conjunction with SLF4J.  Superfluous.
{code:java}
String message = String
.format("Compute Plan for Node : %s:%d took %d ms ",
node.getDataNodeName(), node.getDataNodePort(),
endTime - startTime);
LOG.info(message);{code}

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.
{code}
LOG.debug("Step : {} ",  nextStep.toString());
{code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to