hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Akira AJISAKA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-12912) Add LOG.isDebugEnabled() guard in Progress.set method
Date Thu, 10 Mar 2016 10:13:40 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-12912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15189009#comment-15189009
] 

Akira AJISAKA commented on HADOOP-12912:
----------------------------------------

We are removing unnecessarily guarding from Hadoop source-tree by moving to slf4j, so generally
adding guarding seems not to be a good idea. However, if {{Progress.set(float progress)}}
is called from hot path and the {{progress}} is not in \[0, 1\], there are many String instance
creations and the cost becomes higher.
Therefore I'm +1 for adding guards. Would you add a comment that the method is called from
hot path and that's why we need guarding to save the cost of creating String instances?

> Add LOG.isDebugEnabled() guard in Progress.set method
> -----------------------------------------------------
>
>                 Key: HADOOP-12912
>                 URL: https://issues.apache.org/jira/browse/HADOOP-12912
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Tsuyoshi Ozawa
>            Assignee: Tsuyoshi Ozawa
>         Attachments: HADOOP-12912.001.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message