[ https://issues.apache.org/jira/browse/HDFS-16802?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17624133#comment-17624133 ]
ASF GitHub Bot commented on HDFS-16802: --------------------------------------- ZanderXu commented on code in PR #5013: URL: https://github.com/apache/hadoop/pull/5013#discussion_r1005141101 ########## hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirRenameOp.java: ########## @@ -247,10 +247,8 @@ static RenameResult renameToInt( throws IOException { String src = srcArg; String dst = dstArg; - if (NameNode.stateChangeLog.isDebugEnabled()) { - NameNode.stateChangeLog.debug("DIR* NameSystem.renameTo: with options -" + - " " + src + " to " + dst); - } + NameNode.stateChangeLog.debug("DIR* NameSystem.renameTo: with options={} {} to {}", + Arrays.toString(options), src, dst); Review Comment: Oh, here is my mistake. @jianghuazhu we need `if (NameNode.stateChangeLog.isDebugEnabled())` here, because `Arrays.toString(options)` will cost some time to compose a string. > Print options when accessing ClientProtocol#rename2() > ----------------------------------------------------- > > Key: HDFS-16802 > URL: https://issues.apache.org/jira/browse/HDFS-16802 > Project: Hadoop HDFS > Issue Type: Improvement > Components: namenode > Affects Versions: 3.3.4 > Reporter: JiangHua Zhu > Assignee: JiangHua Zhu > Priority: Minor > Labels: pull-request-available > > When accessing ClientProtocol#rename2(), the carried options cannot be seen > in the log. Here is some log information: > {code:java} > 2022-10-13 10:21:10,727 [Listener at localhost/59732] DEBUG hdfs.StateChange > (FSDirRenameOp.java:renameToInt(255)) - DIR* NameSystem.renameTo: with > options - /testNamenodeRetryCache/testRename2/src to > /testNamenodeRetryCache/testRename2/target > {code} > We should improve this, maybe printing options would be better. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org