[
https://issues.apache.org/jira/browse/HDFS-16638?focusedWorklogId=784919&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-784919
]
ASF GitHub Bot logged work on HDFS-16638:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Jun/22 03:26
Start Date: 27/Jun/22 03:26
Worklog Time Spent: 10m
Work Description: ZanderXu commented on PR #4480:
URL: https://github.com/apache/hadoop/pull/4480#issuecomment-1166793988
> But constant string concatenation is pretty simple given that String
objects are allocated from heap memory.
Yes, your are right.
```
blockLog.debug("BLOCK* invalidateBlocks: postponing " +
"invalidation of {} on {} because {} replica(s) are located on "
+
"nodes with potentially out-of-date block reports", b, dn,
nr.replicasOnStaleNodes());
```
```
if(blockLog.isDebugEnabled()) {
blockLog.debug("BLOCK* invalidateBlocks: postponing " +
"invalidation of {} on {} because {} replica(s) are located on "
+
"nodes with potentially out-of-date block reports", b, dn,
nr.replicasOnStaleNodes());
}
```
So maybe we should have a performance test that which of the above two modes
has better performance.
Do you think so? Or if you have a clear result, please let me know. Thanks
@virajjasani
Issue Time Tracking
-------------------
Worklog Id: (was: 784919)
Time Spent: 1.5h (was: 1h 20m)
> Add isDebugEnabled check for debug blockLogs in BlockManager
> ------------------------------------------------------------
>
> Key: HDFS-16638
> URL: https://issues.apache.org/jira/browse/HDFS-16638
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: namenode
> Reporter: dzcxzl
> Priority: Trivial
> Labels: pull-request-available
> Time Spent: 1.5h
> Remaining Estimate: 0h
>
> There are lots of concatenating Strings using blockLog.debug in BlockManager.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]