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

Ashutosh Chauhan commented on HIVE-3400:
----------------------------------------

@Bhushan, It will be nice if this retrying logic is hidden from the users of 
{{HiveMetaStoreClient}}, otherwise they have to do {code}
else if (!metaStoreClient.isConnected()) {      
      metaStoreClient.connect();        
    }
{code} 
(as you have done in Hive.java) before every rpc call they make on a created 
HMSC, i.e., test whether client is connected and reconnect if its not. Best 
solution for this to proxy all calls on HMSC. You can find an example of how 
this is done in RetryingRawStore.java which proxies all calls to {{RawStore}} 
from {{HiveMetaStore}} precisely for this reason.
                
> Add Retries to Hive MetaStore Connections
> -----------------------------------------
>
>                 Key: HIVE-3400
>                 URL: https://issues.apache.org/jira/browse/HIVE-3400
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Bhushan Mandhani
>            Assignee: Bhushan Mandhani
>            Priority: Minor
>
> Currently, when using Thrift to access the MetaStore, if the Thrift host 
> dies, there is no mechanism to reconnect to some other host even if the 
> MetaStore URIs variable in the Conf contains multiple hosts. Hive should 
> retry and reconnect rather than throwing a communication link error.

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