Repository: oozie Updated Branches: refs/heads/branch-4.1 0d2f60152 -> ae471035b
OOZIE-1973 ConcurrentModificationException in Sharelib service Project: http://git-wip-us.apache.org/repos/asf/oozie/repo Commit: http://git-wip-us.apache.org/repos/asf/oozie/commit/ae471035 Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/ae471035 Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/ae471035 Branch: refs/heads/branch-4.1 Commit: ae471035b08a145525ef0be3d5d1959d9f3a5a25 Parents: 0d2f601 Author: Purshotam Shah <[email protected]> Authored: Wed Oct 15 17:24:10 2014 -0700 Committer: Purshotam Shah <[email protected]> Committed: Wed Oct 15 17:24:10 2014 -0700 ---------------------------------------------------------------------- .../apache/oozie/service/ShareLibService.java | 2 +- .../oozie/service/TestShareLibService.java | 29 ++++++++++++++++++++ release-log.txt | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/oozie/blob/ae471035/core/src/main/java/org/apache/oozie/service/ShareLibService.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/oozie/service/ShareLibService.java b/core/src/main/java/org/apache/oozie/service/ShareLibService.java index 893b85b..f91405d 100644 --- a/core/src/main/java/org/apache/oozie/service/ShareLibService.java +++ b/core/src/main/java/org/apache/oozie/service/ShareLibService.java @@ -330,7 +330,7 @@ public class ShareLibService implements Service, Instrumentable { } } } - returnList = launcherLibMap.get(actionKey); + returnList.addAll(launcherLibMap.get(actionKey)); } if (actionKey.equals(JavaActionExecutor.OOZIE_COMMON_LIBDIR)) { List<Path> sharelibList = getShareLibJars(actionKey); http://git-wip-us.apache.org/repos/asf/oozie/blob/ae471035/core/src/test/java/org/apache/oozie/service/TestShareLibService.java ---------------------------------------------------------------------- diff --git a/core/src/test/java/org/apache/oozie/service/TestShareLibService.java b/core/src/test/java/org/apache/oozie/service/TestShareLibService.java index 05460b4..3707a0a 100644 --- a/core/src/test/java/org/apache/oozie/service/TestShareLibService.java +++ b/core/src/test/java/org/apache/oozie/service/TestShareLibService.java @@ -545,6 +545,35 @@ public class TestShareLibService extends XFsTestCase { } } + @Test + public void testMultipleLauncherCall() throws Exception { + services = new Services(); + setSystemProps(); + Configuration conf = services.getConf(); + conf.set(ShareLibService.SHIP_LAUNCHER_JAR, "true"); + try { + services.init(); + FileSystem fs = getFileSystem(); + Date time = new Date(System.currentTimeMillis()); + ShareLibService shareLibService = Services.get().get(ShareLibService.class); + Path basePath = new Path(services.getConf().get(WorkflowAppService.SYSTEM_LIB_PATH)); + Path libpath = new Path(basePath, ShareLibService.SHARED_LIB_PREFIX + + ShareLibService.dateFormat.format(time)); + fs.mkdirs(libpath); + Path ooziePath = new Path(libpath.toString() + Path.SEPARATOR + "oozie"); + fs.mkdirs(ooziePath); + createFile(libpath.toString() + Path.SEPARATOR + "oozie" + Path.SEPARATOR + "oozie_luncher.jar"); + shareLibService.init(services); + List<Path> launcherPath = shareLibService.getSystemLibJars(JavaActionExecutor.OOZIE_COMMON_LIBDIR); + assertEquals(launcherPath.size(), 2); + launcherPath = shareLibService.getSystemLibJars(JavaActionExecutor.OOZIE_COMMON_LIBDIR); + assertEquals(launcherPath.size(), 2); + } + finally { + services.destroy(); + } + } + public void createFile(String filename) throws IOException { Path path = new Path(filename); FSDataOutputStream out = getFileSystem().create(path); http://git-wip-us.apache.org/repos/asf/oozie/blob/ae471035/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 6ab740c..e7bb24f 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 4.1.0 release (4.1 - unreleased) +OOZIE-1973 ConcurrentModificationException in Sharelib service (puru) OOZIE-1896 ZKUUIDService - Too many job submission fails (puru) OOZIE-2005 Coordinator rerun fails to initialize error code and message (ryota) OOZIE-2019 SLA miss processed on server2 not send email (puru)
