You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by pu...@apache.org on 2016/06/10 21:21:32 UTC

oozie git commit: OOZIE-2567 HCat connection is not closed while getting hcat cred

Repository: oozie
Updated Branches:
  refs/heads/master c22364554 -> 901616b21


OOZIE-2567 HCat connection is not closed while getting hcat cred


Project: http://git-wip-us.apache.org/repos/asf/oozie/repo
Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/901616b2
Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/901616b2
Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/901616b2

Branch: refs/heads/master
Commit: 901616b21974da291e6538d545f7849a9ecb8adf
Parents: c223645
Author: Purshotam Shah <pu...@yahoo-inc.com>
Authored: Fri Jun 10 14:21:23 2016 -0700
Committer: Purshotam Shah <pu...@yahoo-inc.com>
Committed: Fri Jun 10 14:21:23 2016 -0700

----------------------------------------------------------------------
 .../org/apache/oozie/action/hadoop/HCatCredentialHelper.java | 8 +++++++-
 release-log.txt                                              | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/901616b2/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentialHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentialHelper.java b/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentialHelper.java
index 428975e..36ad1df 100644
--- a/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentialHelper.java
+++ b/core/src/main/java/org/apache/oozie/action/hadoop/HCatCredentialHelper.java
@@ -52,8 +52,9 @@ public class HCatCredentialHelper {
      * @throws Exception
      */
     public void set(JobConf launcherJobConf, String principal, String server) throws Exception {
+        HCatClient client = null;
         try {
-            HCatClient client = getHCatClient(launcherJobConf, principal, server);
+            client = getHCatClient(launcherJobConf, principal, server);
             XLog.getLog(getClass()).debug(
                     "HCatCredentialHelper: set: User name for which token will be asked from HCat: "
                             + launcherJobConf.get(USER_NAME));
@@ -68,6 +69,11 @@ public class HCatCredentialHelper {
             XLog.getLog(getClass()).debug("set Exception" + ex.getMessage());
             throw ex;
         }
+        finally {
+            if (client != null) {
+                client.close();
+            }
+        }
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/oozie/blob/901616b2/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 88f66e9..fba302b 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 4.3.0 release (trunk - unreleased)
 
+OOZIE-2567 HCat connection is not closed while getting hcat cred (puru)
 OOZIE-2547 Add mapreduce.job.cache.files to spark action (satishsaley via rohini)
 OOZIE-2550 Flaky tests in TestZKUUIDService.java (pbacsko via rkanter)
 OOZIE-2445 Doc for - Specifying coordinator input datasets in more logical ways (puru)