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

Eli Collins updated HDFS-4047:
------------------------------

    Attachment: hdfs-4047.txt

Thanks Yanbo. While looking at your patch I noticed that offerService doesn't 
actually throw Exception so the outer loop is dead code which we can nuke.

What do you think of the following patch that does this? It also adds the sleep 
on IOE from the outer loop to the inner loop since that seems like the desired 
behavior.
                
> BPServiceActor has nested shouldRun loops
> -----------------------------------------
>
>                 Key: HDFS-4047
>                 URL: https://issues.apache.org/jira/browse/HDFS-4047
>             Project: Hadoop HDFS
>          Issue Type: Bug
>          Components: name-node
>    Affects Versions: 2.0.0-alpha
>            Reporter: Eli Collins
>            Priority: Minor
>         Attachments: HADOOP-4047.patch, hdfs-4047.txt
>
>
> BPServiceActor#run and offerService booth have while shouldRun loops. We only 
> need the outer one, ie we can hoist the info log from offerService out to run 
> and remove the while loop.
> {code}
> BPServiceActor#run:
> while (shouldRun()) {
>   try {
>     offerService();
>   } catch (Exception ex) {
> ...
> offerService:
> while (shouldRun()) {
>   try {
> {code}

--
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