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

Ayush Saxena commented on HDFS-15167:
-------------------------------------

Thanx [~surendrasingh] for the review.

Well ideally this all is done, so that post FBR, the regular BR's don't come 
together for all datanodes, considering the first time datanodes will be 
started together.
But this would be first ensured here itself in {{scheduleBlockReport(long 
delay)}}:

{code:java}
        nextBlockReportTime =
            monotonicNow() + ThreadLocalRandom.current().nextInt((int) (delay));
{code}

But here the BR's from all Datanodes will be spread in the timeframe of delay, 
so to further spread them in the time frame of BR interval (6 hours). I guess 
that is why that {{resetBlockReportTime}} is used in  
{{scheduleBlockReport()}}. So that post cluster up all Datanodes don't send 
BR's all together, but spread in between the BR Interval.

**Missed one case, that during registration also delay can be set as 0, handled 
in v6


> Block Report Interval shouldn't be reset apart from first Block Report
> ----------------------------------------------------------------------
>
>                 Key: HDFS-15167
>                 URL: https://issues.apache.org/jira/browse/HDFS-15167
>             Project: Hadoop HDFS
>          Issue Type: Bug
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>         Attachments: HDFS-15167-01.patch, HDFS-15167-02.patch, 
> HDFS-15167-03.patch, HDFS-15167-04.patch, HDFS-15167-05.patch, 
> HDFS-15167-06.patch
>
>
> Presently BlockReport interval is reset even in case the BR is manually 
> triggered or BR is triggered for diskError.
> Which isn't required. As per the comment also, it is intended for first BR 
> only :
> {code:java}
>       // If we have sent the first set of block reports, then wait a random
>       // time before we start the periodic block reports.
>       if (resetBlockReportTime) {
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to