falcon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Venkatesh Seetharam (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FALCON-508) Cache iexpiry is not handled in HiveCatalogService
Date Wed, 16 Jul 2014 05:43:04 GMT
Venkatesh Seetharam created FALCON-508:
------------------------------------------

             Summary: Cache iexpiry is not handled in HiveCatalogService
                 Key: FALCON-508
                 URL: https://issues.apache.org/jira/browse/FALCON-508
             Project: Falcon
          Issue Type: Bug
    Affects Versions: 0.5
            Reporter: Venkatesh Seetharam
             Fix For: 0.6


Again, Don Bosco Durai reported to me in an email:

We are using cached HCatClient object. His last success was June 30th, so the connection might
have been stale. If there is an exception, we should clear the cache and try to get a new
one. Since the getProxiedClient() and isAlive() method are different calls, you might have
to give a method to clear the cache or pass additional parameter to fetch new client connection.

{code}
    public static synchronized HCatClient getProxiedClient(String catalogUrl,
                                                           String metaStorePrincipal) throws
FalconException {
        if (!CACHE.containsKey(catalogUrl)) {
{code}

Also, the below code seems odd for cache. We should be always be overriding with the latest
object. This might not be an issue if hcatClient is idempotent.
Line 111:                CACHE.putIfAbsent(catalogUrl, hcatClient);

I do not think the latter is an issue but May be we could use org.apache.hcatalog.common.HCatUtil#getHiveClient
which handles cache appropriately.

Thanks Bosco.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message