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

Eli Collins commented on HDFS-3828:
-----------------------------------

Agree this approach is best for now. Please file a jira for the proposed 
refactoring outlining the issues it addresses with the current approach (eg 
that we do unnecessary work if we finish the scan w/in the period).

- Per the findbugs warnning I'd pull your new check in scanBlockPoolSlice out 
to a synchronized method (eg workRemainingInCurrentPeriod)
- DataBlockScanner#run should use SLEEP_PERIOD_MS (could use in 
getNextBPScanner as well, though it and waitForInit aren't part of the "period")
- In getTotalScans rather than throw IOE if given a bpid w/o a scanner I 
believe this should be an assert (we should always have a scanner for a block 
pool if we've enbabled scanning, which we have if we're in DataBlockScanner)

                
> Block Scanner rescans blocks too frequently
> -------------------------------------------
>
>                 Key: HDFS-3828
>                 URL: https://issues.apache.org/jira/browse/HDFS-3828
>             Project: Hadoop HDFS
>          Issue Type: Bug
>    Affects Versions: 0.23.0, 2.0.0-alpha
>            Reporter: Andy Isaacson
>            Assignee: Andy Isaacson
>         Attachments: hdfs-3828-1.txt, hdfs-3828-2.txt, hdfs3828.txt
>
>
> {{BlockPoolSliceScanner#scan}} calls cleanUp every time it's invoked from 
> {{DataBlockScanner#run}} via {{scanBlockPoolSlice}}.  But cleanUp 
> unconditionally roll()s the verificationLogs, so after two iterations we have 
> lost the first iteration of block verification times.  As a result a cluster 
> with just one block repeatedly rescans it every 10 seconds:
> {noformat}
> 2012-08-16 15:59:57,884 INFO  datanode.BlockPoolSliceScanner 
> (BlockPoolSliceScanner.java:verifyBlock(391)) - Verification succeeded for 
> BP-2101131164-172.29.122.91-1337906886255:blk_7919273167187535506_4915
> 2012-08-16 16:00:07,904 INFO  datanode.BlockPoolSliceScanner 
> (BlockPoolSliceScanner.java:verifyBlock(391)) - Verification succeeded for 
> BP-2101131164-172.29.122.91-1337906886255:blk_7919273167187535506_4915
> 2012-08-16 16:00:17,925 INFO  datanode.BlockPoolSliceScanner 
> (BlockPoolSliceScanner.java:verifyBlock(391)) - Verification succeeded for 
> BP-2101131164-172.29.122.91-1337906886255:blk_7919273167187535506_4915
> {noformat}
> {quote}
> To fix this, we need to avoid roll()ing the logs multiple times per period.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to