You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/07/04 13:56:00 UTC
[jira] [Work logged] (HDFS-16648) Normalize the usage of debug logs in NameNode
[ https://issues.apache.org/jira/browse/HDFS-16648?focusedWorklogId=787606&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-787606 ]
ASF GitHub Bot logged work on HDFS-16648:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 04/Jul/22 13:55
Start Date: 04/Jul/22 13:55
Worklog Time Spent: 10m
Work Description: ZanderXu opened a new pull request, #4529:
URL: https://github.com/apache/hadoop/pull/4529
Refer to [PR4480](https://github.com/apache/hadoop/pull/4480#event-6923776715) to uniformly the debug logs in HDFS core classes.
And the detailed performance test, please refer to [debugLogPerformanceTest](https://github.com/apache/hadoop/pull/4480#issuecomment-1166936626).
Issue Time Tracking
-------------------
Worklog Id: (was: 787606)
Remaining Estimate: 0h
Time Spent: 10m
> Normalize the usage of debug logs in NameNode
> ---------------------------------------------
>
> Key: HDFS-16648
> URL: https://issues.apache.org/jira/browse/HDFS-16648
> Project: Hadoop HDFS
> Issue Type: Improvement
> Reporter: ZanderXu
> Assignee: ZanderXu
> Priority: Minor
> Time Spent: 10m
> Remaining Estimate: 0h
>
> There are many irregular debug logs in NameNode. such as:
> Error type1:
> {code:java}
> if (LOG.isDebugEnabled()) {
> LOG.debug("Getting groups for user " + user);
> }
> {code}
> we can format it to:
> {code:java}
> LOG.debug("Getting groups for user {}. ", user);
> {code}
> Error type2:
> {code:java}
> LOG.debug("*DIR* NameNode.renameSnapshot: Snapshot Path {}, " +
> "snapshotOldName {}, snapshotNewName {}", snapshotRoot,
> snapshotOldName, snapshotNewName);
> {code}
> we can format it to:
> {code:java}
> if (LOG.isDebugEnabled()) {
> LOG.debug("*DIR* NameNode.renameSnapshot: Snapshot Path {}, " +
> "snapshotOldName {}, snapshotNewName {}", snapshotRoot,
> snapshotOldName, snapshotNewName);
> }
> {code}
> Error type3:
> {code:java}
> if (LOG.isDebugEnabled()) {
> LOG.debug("getAdditionalDatanode: src=" + src
> + ", fileId=" + fileId
> + ", blk=" + blk
> + ", existings=" + Arrays.asList(existings)
> + ", excludes=" + Arrays.asList(excludes)
> + ", numAdditionalNodes=" + numAdditionalNodes
> + ", clientName=" + clientName);
> }
> {code}
> We can format it to:
> {code:java}
> if (LOG.isDebugEnabled()) {
> LOG.debug("getAdditionalDatanode: src={}, fileId={}, "
> + "blk={}, existings={}, excludes={}, numAdditionalNodes={}, "
> + "clientName={}.", src, fileId, blk, Arrays.asList(existings),
> Arrays.asList(excludes), numAdditionalNodes, clientName);
> }
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org