Updated Branches: refs/heads/master b220ed6e3 -> cf2492213
OOZIE-1683 UserGroupInformationService should close any filesystems opened by it (rkanter) Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/cf249221 Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/cf249221 Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/cf249221 Branch: refs/heads/master Commit: cf24922130bec6909b81857dbe29041ba8bff359 Parents: b220ed6 Author: Robert Kanter <[email protected]> Authored: Thu Jan 30 13:15:33 2014 -0800 Committer: Robert Kanter <[email protected]> Committed: Thu Jan 30 13:15:33 2014 -0800 ---------------------------------------------------------------------- .../oozie/service/UserGroupInformationService.java | 13 ++++++++++--- release-log.txt | 1 + 2 files changed, 11 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/cf249221/core/src/main/java/org/apache/oozie/service/UserGroupInformationService.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/service/UserGroupInformationService.java b/core/src/main/java/org/apache/oozie/service/UserGroupInformationService.java index 3243e28..b81c97c 100644 --- a/core/src/main/java/org/apache/oozie/service/UserGroupInformationService.java +++ b/core/src/main/java/org/apache/oozie/service/UserGroupInformationService.java @@ -20,8 +20,10 @@ package org.apache.oozie.service; import java.io.IOException; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; +import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.security.UserGroupInformation; +import org.apache.oozie.util.XLog; public class UserGroupInformationService implements Service { @@ -33,6 +35,13 @@ public class UserGroupInformationService implements Service { @Override public void destroy() { + for (UserGroupInformation ugi : cache.values()) { + try { + FileSystem.closeAllForUGI(ugi); + } catch(IOException ioe) { + XLog.getLog(this.getClass()).warn("Exception occurred while closing filesystems for " + ugi.getUserName(), ioe); + } + } cache.clear(); } @@ -42,9 +51,7 @@ public class UserGroupInformationService implements Service { } public UserGroupInformation getProxyUser(String user) throws IOException { - if (!cache.containsKey(user)) { - cache.putIfAbsent(user, UserGroupInformation.createProxyUser(user, UserGroupInformation.getLoginUser())); - } + cache.putIfAbsent(user, UserGroupInformation.createProxyUser(user, UserGroupInformation.getLoginUser())); return cache.get(user); } http://git-wip-us.apache.org/repos/asf/oozie/blob/cf249221/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 7d45fe0..2b70dfc 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 4.1.0 release (trunk - unreleased) +OOZIE-1683 UserGroupInformationService should close any filesystems opened by it (rkanter) OOZIE-1646 HBase Table Copy between two HBase servers doesn't work with Kerberos (rkanter) OOZIE-1609 HA support for share lib. (puru via rkanter) OOZIE-1622 Multiple CoordSubmit for same bundle (shwethags via virag)
