[ 
https://issues.apache.org/jira/browse/HADOOP-1516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12514857
 ] 

Jim Kellerman commented on HADOOP-1516:
---------------------------------------

> In HClient#findServersForTable you have:
> 
> {code}
> +        for (int tries = 0; tries < 2; tries++) {
> {code}
> 
> in two places.  Any reason for not using HClient#numRetries rather than a 
> hard-coded '2'?
>  Or if a reason, any reason for not making it configurable?

I guess my original thinking on the subject was that some retries were 
different from others and that in order to recover more quickly,  doing fewer 
retries in some cases would reduce the amount of time spent doing retries 
rather than going down the recovery path. But ultimately, I think you are right 
that the number of retries should be configurable to allow for more prolonged 
transition periods.

> (Same later in scanOneMetaRegion -- is there a copy paste error here because 
> you are checking 
> numRetries later, low in the loop -- search for '+if(servers.size() == 0 && 
> tries == numRetries - 1) {')

No this is simply a cut and paste error. I thought I had gotten them all... 
I'll clean them up too.

> This is a little interesting:
> 
> +  volatile AtomicInteger numberOfMetaRegions;
> Its interesting because the Atomic*s are described as extensions of volatile. 
>  Volatile is not needed 
> here as assignment of the new AtomicInteger is done in the constructor so its 
> initialization should be 
> thread-safe.

The was left over from a previous edit where the variable was a regular 'int' 
and not an AtomicInteger. I'll fix this too.

Thanks for the review. I've been staring at this code too long trying to figure 
out why it wasn't working before obviously and missed cleaning up some stuff I 
had intended to do (or thought I had done).


> HClient fails to readjust when ROOT or META redeployed on new region server
> ---------------------------------------------------------------------------
>
>                 Key: HADOOP-1516
>                 URL: https://issues.apache.org/jira/browse/HADOOP-1516
>             Project: Hadoop
>          Issue Type: Bug
>          Components: contrib/hbase
>    Affects Versions: 0.15.0
>            Reporter: stack
>            Assignee: Jim Kellerman
>             Fix For: 0.15.0
>
>         Attachments: patch.txt, patch.txt, patch.txt
>
>
> Trying to add assertions about state to the test of region server clean 
> shutdown and aborts, I notice that subsequent to ROOT and META regions moving 
> to fresh region server, any attempt by the client to get actual content from 
> the new locations fails with ConnectException trying to fetch from the closed 
> region server.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to