Return-Path: X-Original-To: apmail-falcon-dev-archive@minotaur.apache.org Delivered-To: apmail-falcon-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4621911068 for ; Mon, 8 Sep 2014 21:31:53 +0000 (UTC) Received: (qmail 92722 invoked by uid 500); 8 Sep 2014 21:31:53 -0000 Delivered-To: apmail-falcon-dev-archive@falcon.apache.org Received: (qmail 92677 invoked by uid 500); 8 Sep 2014 21:31:53 -0000 Mailing-List: contact dev-help@falcon.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@falcon.incubator.apache.org Delivered-To: mailing list dev@falcon.incubator.apache.org Received: (qmail 92652 invoked by uid 99); 8 Sep 2014 21:31:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2014 21:31:52 +0000 X-ASF-Spam-Status: No, hits=-2001.7 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Mon, 08 Sep 2014 21:31:30 +0000 Received: (qmail 91147 invoked by uid 99); 8 Sep 2014 21:31:28 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 08 Sep 2014 21:31:28 +0000 Date: Mon, 8 Sep 2014 21:31:28 +0000 (UTC) From: "Venkatesh Seetharam (JIRA)" To: dev@falcon.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (FALCON-508) Cache expiry is not handled in HiveCatalogService MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/FALCON-508?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Venkatesh Seetharam updated FALCON-508: --------------------------------------- Fix Version/s: (was: 0.6) > Cache expiry 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 > Labels: Hive > > 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.3.4#6332)