[
https://issues.apache.org/jira/browse/HBASE-5153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13184211#comment-13184211
]
stack commented on HBASE-5153:
------------------------------
Patch looks good. I like your addition of a specific Exception for closed
state.
Does this have to be public Jieshan?
{code}
getRegionServerWithRetries
{code}
Same for processBatch and getRegionLocation.
If public should be in HTableInterface but they seem implementation methods
rather than something that should be part of public interface.
A style nit -- i.e. not important but if you are going to redo the patch you
miight want to address it -- is that you do this in
handleConnectionClosedException....
{code}
+ if (ioe instanceof ConnectionClosedException) {
{code}
and the whole method is dealing with the case where above is true. I'd suggest
that you might do:
{code}
if (!(ioe instanceof ConnectionClosedException)) return;
{code}
... then you save a whole indent and its clear that the method is all about
dealing with ConnectionClosedException.
Is it right including this in HTable?
{code}
getPauseTime
{code}
In trunk that is in a new ConnectionUtils class. Maybe you have to do it for
0.90?
I'm wondering if the class ConnectionClosedException needs to be public also?
Its only used in this package, right?
> HConnection re-creation in HTable after HConnection abort
> ---------------------------------------------------------
>
> Key: HBASE-5153
> URL: https://issues.apache.org/jira/browse/HBASE-5153
> Project: HBase
> Issue Type: Bug
> Components: client
> Affects Versions: 0.90.4
> Reporter: Jieshan Bean
> Assignee: Jieshan Bean
> Fix For: 0.90.6
>
> Attachments: HBASE-5153-V2.patch, HBASE-5153-V3.patch,
> HBASE-5153.patch
>
>
> HBASE-4893 is related to this issue. In that issue, we know, if multi-threads
> share a same connection, once this connection got abort in one thread, the
> other threads will got a
> "HConnectionManager$HConnectionImplementation@18fb1f7 closed" exception.
> It solve the problem of "stale connection can't removed". But the orignal
> HTable instance cann't be continue to use. The connection in HTable should be
> recreated.
> Actually, there's two aproach to solve this:
> 1. In user code, once catch an IOE, close connection and re-create HTable
> instance. We can use this as a workaround.
> 2. In HBase Client side, catch this exception, and re-create connection.
--
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