You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by "BELUGA BEHR (JIRA)" <ji...@apache.org> on 2018/11/30 23:02:00 UTC

[jira] [Created] (HDFS-14119) GreedyPlanner Parameter Logging

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-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-help@hadoop.apache.org