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

Todd Lipcon commented on HDFS-3456:
-----------------------------------

Patch v4 looks reasonable to me. It does make sense to provide a long value for 
the block report interval, for example if you have a lot of trust in the 
_incremental_ block reports and thus have no need for periodic _full_ block 
reports. However, I'd also be fine just clamping the "jitter" at something like 
1 day. The point of the randomization is just to jitter the startup block 
reports, and I don't think you really need to jitter over a multi-day period.
                
> blockReportInterval is long value but when we take the random value it uses 
> getRandom().nextInt,it is causing frequently BR
> ---------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-3456
>                 URL: https://issues.apache.org/jira/browse/HDFS-3456
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: data-node
>    Affects Versions: 2.0.0-alpha
>            Reporter: Brahma Reddy Battula
>            Assignee: Colin Patrick McCabe
>            Priority: Minor
>         Attachments: HDFS-3456.001.patch, HDFS-3456.002.patch, 
> HDFS-3456.003.patch, HDFS-3456.004.patch
>
>
> blockReportInterval is long value but when we take the random value it uses 
> getRandom().nextInt.
> Due to this, offerService can throw exception as long may get rotated to 
> negative value.
> So, block report may send very frequently.
> {code}
>       if (resetBlockReportTime) {
>         lastBlockReport = startTime - 
> DFSUtil.getRandom().nextInt((int)(dnConf.blockReportInterval));
>       resetBlockReportTime = false;
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to