hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "stack (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-5877) When a query fails because the region has moved, let the regionserver return the new address to the client
Date Thu, 26 Apr 2012 18:22:22 GMT

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

stack commented on HBASE-5877:
------------------------------

@N This patch will benefit any move, not just rolling restart, right?

Here are a quick couple of comments on the patch.

I like addition of RegionMovedException.

Convention is to capitalize static defines: '+  private static final String hostField = "hostname=";'
so it should be HOSTFIELD.

Its super ugly that you have to parse exception message to get exception data member fields...
but thats not your fault.

Please keep the style of the surrounding code.  This kinda thing is unconventional:

{code}
+    private void updateCachedLocations(
+      Set<String> updateHistory,
+      HRegionLocation hrl,
+      Object t) {
{code}

Ugh on how ugly it is updating cache.  Again, not your fault.

Ted suggests updating interface version.  Maybe don't.  If you do, you can't get this into
a 0.94.1, etc.

I don't see changes to make use of this new functionality?  I'd expect the balancer in master
to make use of it?
                
> 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

        

Mime
View raw message