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

Yuanbo Liu commented on HDFS-10645:
-----------------------------------

[~ajisakaa] Thanks for your comments and your patience.
{quote}
When setting maxDataLength, would you use dnConf instead of dn.getConf()? Null 
check is not needed.
{quote}
Agree to use dnConf instead of dn.getConf(). But the null check can not be 
deleted. I've found some code from {{TestDatanodeRegister#setUpsetUp}} 
{code}
    DataNode mockDN = mock(DataNode.class);
    doReturn(true).when(mockDN).shouldRun();
    doReturn(mockDnConf).when(mockDN).getDnConf();
{code}
it uses {{mock}} to test some functions. I've no knowledge about {{mock}} in 
unit test, but it will cause nullpoint  exception when I write code in 
{{BPServiceActor}} like this:
{code}
    this.maxDataLength =
        dnConf.getConf().getInt(CommonConfigurationKeys.IPC_MAXIMUM_DATA_LENGTH,
        CommonConfigurationKeys.IPC_MAXIMUM_DATA_LENGTH_DEFAULT);
{code}
I hope to get your thoughts before I upload v5 patch.
Thank you again for your time.

> Make block report size as a metric and add this metric to datanode web ui
> -------------------------------------------------------------------------
>
>                 Key: HDFS-10645
>                 URL: https://issues.apache.org/jira/browse/HDFS-10645
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>          Components: datanode, ui
>            Reporter: Yuanbo Liu
>            Assignee: Yuanbo Liu
>         Attachments: HDFS-10645.001.patch, HDFS-10645.002.patch, 
> HDFS-10645.003.patch, HDFS-10645.004.patch, Selection_047.png, 
> Selection_048.png
>
>
> Record block report size as a metric and show it on datanode UI. It's 
> important for administrators to know the bottleneck of  block report, and the 
> metric is also a good tuning metric.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to