You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Anne Yu (JIRA)" <ji...@apache.org> on 2016/04/05 01:38:25 UTC

[jira] [Updated] (SENTRY-1155) Add waiting time for getMetastoreClient for avoiding metastore isn't ready

     [ https://issues.apache.org/jira/browse/SENTRY-1155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anne Yu updated SENTRY-1155:
----------------------------
       Resolution: Fixed
    Fix Version/s: 1.8.0
           Status: Resolved  (was: Patch Available)

commit 812159d9608c7ccd5c777a877ea678642a17437b
Author: Anne Yu <an...@apache.org>
Date:   Mon Apr 4 17:04:36 2016 -0700

    SENTRY-1155: Add waiting time for getMetastoreClient for avoiding metastore isn't ready (Dapeng Sun, reviewed by Anne Yu).

> Add waiting time for getMetastoreClient for avoiding metastore isn't ready
> --------------------------------------------------------------------------
>
>                 Key: SENTRY-1155
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1155
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.7.0
>            Reporter: Dapeng Sun
>            Assignee: Dapeng Sun
>             Fix For: 1.8.0
>
>         Attachments: SENTRY-1155.001.patch, SENTRY-1155.002.patch
>
>
> For {{TestMetastoreEndToEnd}}, If metastore didn't finish the initialization.  context.getMetaStoreClient will throw exception. 
> {noformat}
> HiveMetaStoreClient client = context.getMetaStoreClient(ADMIN1);
> {noformat}
> We should wait for the initialization of metastore, for example:
> {noformat}
>     HiveMetaStoreClient client = null;
>     for (int i=0; i < 10; i++) {
>       try {
>         client = context.getMetaStoreClient(ADMIN1);
>         break;
>       } catch (Throwable e) {
>         // ignore
>       }
>       Thread.sleep(6000);
>     }
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)