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

ASF GitHub Bot commented on HDFS-16802:
---------------------------------------

jianghuazhu commented on code in PR #5013:
URL: https://github.com/apache/hadoop/pull/5013#discussion_r995373375


##########
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirRenameOp.java:
##########
@@ -249,7 +249,7 @@ static RenameResult renameToInt(
     String dst = dstArg;
     if (NameNode.stateChangeLog.isDebugEnabled()) {
       NameNode.stateChangeLog.debug("DIR* NameSystem.renameTo: with options -" 
+
-          " " + src + " to " + dst);
+          " {} to {}, options={}", src, dst, Arrays.toString(options));

Review Comment:
   `
   if (NameNode.stateChangeLog.isDebugEnabled()) {
        ......
   }
   `
   In Hadoop, this phenomenon seems to be a lot.





> 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

Reply via email to