OOZIE-2567 HCat connection is not closed while getting hcat cred
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 @@
* @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 @@
XLog.getLog(getClass()).debug("set Exception" + ex.getMessage());
throw ex;
}
+ finally {
+ if (client != null) {
+ client.close();
+ }
+ }
}
/**
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)