[
https://issues.apache.org/jira/browse/HDFS-9706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15119862#comment-15119862
]
Xiao Chen commented on HDFS-9706:
---------------------------------
Thanks Yongjun for the comments.
I agree with your suggestions. Patch 2 rewrote the debug log, to match the
parameters passed in. After that, I additionally printed {{isClient}},
{{isDatanode}}, and {{responseInterval}}. These 3 can be deducted from input or
read from the config of the input datanode, but since this is debug log, I
think having 1 more line to save some developer time is a good tradeoff.
Below is a sample output of the log:
{noformat}
2016-01-27 09:34:12,849 [DataXceiver for client cl at /127.0.0.1:50088
[Receiving block BP-908057294-192.168.1.79-1453916050495:blk_1073741825_1001]]
DEBUG datanode.DataNode (BlockReceiver.java:<init>(189)) - BlockReceiver:
BP-908057294-192.168.1.79-1453916050495:blk_1073741825_1001
storageType=DISK, inAddr=/127.0.0.1:50088
myAddr=/127.0.0.1:50079, stage=DATA_STREAMING, newGs=0
minBytesRcvd=1
maxBytesRcvd=1, clientname=cl
srcDataNode=:0
datanode=127.0.0.1:50079
requestedChecksum=DataChecksum(type=CRC32C, chunkSize=512)
cachingStrategy=CachingStrategy(dropBehind=null, readahead=null)
allowLazyPersist=false, pinning=false
isClient=true, isDatanode=false
responseInterval=30000
{noformat}
> Log more details in debug logs in BlockReceiver's constructor
> -------------------------------------------------------------
>
> Key: HDFS-9706
> URL: https://issues.apache.org/jira/browse/HDFS-9706
> Project: Hadoop HDFS
> Issue Type: Bug
> Reporter: Xiao Chen
> Assignee: Xiao Chen
> Priority: Minor
> Labels: supportability
> Attachments: HDFS-9706.01.patch
>
>
> Currently {{BlockReceiver}}'s constructor has some debug logs to help
> identifying problems. During my triage of HDFS-9701, I needed to add the
> {{isTransfer}} into the logs to see which block the code goes later.
> I propose to add more details in the debug logs, to save future effort. Will
> also see whether more details need to be logged.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)