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

Zhihong Yu commented on HBASE-5877:
-----------------------------------

For RegionMovedException.java:
{code}
+    String tmpHostname = "nohostname";
{code}
I think the above could potentially be a host name :-)
{code}
+    } catch (Exception ignored) {
+      LOG.warn("Can't parse the hostname and the port from this string: " + s 
+ ", "+
+        "Continuing");
+    }
{code}
Can we mark the failure and make this RegionMovedException behave the same as 
NotServingRegionException ?
For updateCachedLocations(), please put explanation for parameter on the same 
line as the parameter:
{code}
+     * @param row  - row and tableName can be null id hrl is not null.
{code}
{code}
+            LOG.warn("Failed all from " + loc, e);
{code}
'Failed all' -> 'Failed call'
{code}
+          if (resp == null) {
+            // Entire server failed
+            LOG.fatal("Failed all for server: " + loc.getHostnamePort() +
+              ", removing from cache");
+            continue;
+          }
{code}
How is the server removed from cache since I see 'continue' above ?
{code}
+              } else {
+                if (numRetries == 1)
+                  LOG.fatal("step 4 got result " + regionResult.getFirst() + " 
" + regionResult.getSecond());
{code}
Why is the above fatal (regionResult != null) ? Step 4 appears in a comment 
below the above code. Should the above say step 3 ?

Please increase the VERSION of HRegionInterface
{code}
+   * @param destServerName: server name on which the server will be moved
{code}
'which the server' -> 'which the region'

For ServerManager.sendRegionClose(), please add javadoc for destServerName 
param.
For HRegionServer.java:
{code}
+    LOG.info("Closing region "+region.getRegionName()+", moving to 
"+sn.getServerName() );
{code}
Is it possible that destServerName is null ?
{code}
+  private ServerName getMovedRegion(String encodedRegionName) {
+    LOG.fatal("Called getMovedRegion for "+encodedRegionName+" "+ 
movedRegions.size()+ " "+movedRegions);
{code}
Please change the above to debug log.

                
> When a query fails because the region has moved, let the regionserver return 
> the new address to the client
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-5877
>                 URL: https://issues.apache.org/jira/browse/HBASE-5877
>             Project: HBase
>          Issue Type: Improvement
>          Components: client, master, regionserver
>    Affects Versions: 0.96.0
>            Reporter: nkeywal
>            Assignee: nkeywal
>            Priority: Minor
>             Fix For: 0.96.0
>
>         Attachments: 5877.v1.patch
>
>
> This is mainly useful when we do a rolling restart. This will decrease the 
> load on the master and the network load.
> Note that a region is not immediately opened after a close. So:
> - it seems preferable to wait before retrying on the other server. An 
> optimisation would be to have an heuristic depending on when the region was 
> closed.
> - during a rolling restart, the server moves the regions then stops. So we 
> may have failures when the server is stopped, and this patch won't help.
> The implementation in the first patch does:
> - on the region move, there is an added parameter on the regionserver#close 
> to say where we are sending the region
> - the regionserver keeps a list of what was moved. Each entry is kept 100 
> seconds.
> - the regionserver sends a specific exception when it receives a query on a 
> moved region. This exception contains the new address.
> - the client analyses the exeptions and update its cache accordingly...

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to