Repository: oozie Updated Branches: refs/heads/master 4bd777e5e -> e717255bf
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/e717255b Tree: http://git-wip-us.apache.org/repos/asf/oozie/tree/e717255b Diff: http://git-wip-us.apache.org/repos/asf/oozie/diff/e717255b Branch: refs/heads/master Commit: e717255bf3b8e5f16f6498bba31f6c3fc43861e2 Parents: 4bd777e Author: Purshotam Shah <[email protected]> Authored: Wed Oct 15 17:22:32 2014 -0700 Committer: Purshotam Shah <[email protected]> Committed: Wed Oct 15 17:22:32 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/e717255b/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 40af6d9..63c5a41 100644 --- a/core/src/main/java/org/apache/oozie/service/ShareLibService.java +++ b/core/src/main/java/org/apache/oozie/service/ShareLibService.java @@ -331,7 +331,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/e717255b/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 8652087..68cb357 100644 --- a/core/src/test/java/org/apache/oozie/service/TestShareLibService.java +++ b/core/src/test/java/org/apache/oozie/service/TestShareLibService.java @@ -546,6 +546,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/e717255b/release-log.txt ---------------------------------------------------------------------- diff --git a/release-log.txt b/release-log.txt index 6fb9a8f..64751b0 100644 --- a/release-log.txt +++ b/release-log.txt @@ -1,5 +1,6 @@ -- Oozie 4.2.0 release (trunk - unreleased) +OOZIE-1973 ConcurrentModificationException in Sharelib service (puru) OOZIE-1728 When an ApplicationMaster restarts, it restarts the launcher job: DistCp followup (ryota) OOZIE-2009 Requeue CoordActionInputCheck in case of permission error (ryota) OOZIE-1896 ZKUUIDService - Too many job submission fails (puru)
