[ 
https://issues.apache.org/jira/browse/HADOOP-16720?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Lisheng Sun resolved HADOOP-16720.
----------------------------------
    Resolution: Duplicate

> Optimize LowRedundancyBlocks#chooseLowRedundancyBlocks()
> --------------------------------------------------------
>
>                 Key: HADOOP-16720
>                 URL: https://issues.apache.org/jira/browse/HADOOP-16720
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Lisheng Sun
>            Priority: Major
>
> when priority=QUEUE_WITH_CORRUPT_BLOCKS, it mean no block in needreplication 
> need replica. 
> in current code if use continue, there is one more invalid judgment (priority 
> ==QUEUE_WITH_CORRUPT_BLOCKS).
> i think it should use break instread of continue.
> {code:java}
>  */
> synchronized List<List<BlockInfo>> chooseLowRedundancyBlocks(
>     int blocksToProcess) {
>   final List<List<BlockInfo>> blocksToReconstruct = new ArrayList<>(LEVEL);
>   int count = 0;
>   int priority = 0;
>   for (; count < blocksToProcess && priority < LEVEL; priority++) {
>     if (priority == QUEUE_WITH_CORRUPT_BLOCKS) {
>       // do not choose corrupted blocks.
>       continue;
>     }
> ...
>    
> }
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-dev-h...@hadoop.apache.org

Reply via email to