[
https://issues.apache.org/jira/browse/HADOOP-14369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15991788#comment-15991788
]
Inigo Goiri commented on HADOOP-14369:
--------------------------------------
[~xiaochen], this was introduced in HDFS-10320 when switching to {{Logger}}.
I think this is the right way to avoid building the whole String.
I think we should also fix:
{code}
LOG.debug("Failed to find datanode (scope=\"{}\" excludedScope=\"{}\").",
String.valueOf(scope), String.valueOf(excludedScope));
{code}
Not sure of the reason for {{valueOf()}}.
> NetworkTopology calls expensive toString() when debugging
> ---------------------------------------------------------
>
> Key: HADOOP-14369
> URL: https://issues.apache.org/jira/browse/HADOOP-14369
> Project: Hadoop Common
> Issue Type: Bug
> Reporter: Inigo Goiri
> Assignee: Inigo Goiri
> Attachments: HADOOP-14369-000.patch
>
>
> When {{NetworkTopology}} calls {{add()}} or {{remove()}}, it calls
> {{toString()}} for {{LOG.debug()}} which is pretty expensive.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]