You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by ar...@apache.org on 2014/08/21 19:30:54 UTC

[12/18] git commit: FALCON-616. cluster submission should fail when shared libs copy fail. Contributed by Shwetha GS

FALCON-616. cluster submission should fail when shared libs copy fail. Contributed by Shwetha GS


Project: http://git-wip-us.apache.org/repos/asf/incubator-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-falcon/commit/b991e813
Tree: http://git-wip-us.apache.org/repos/asf/incubator-falcon/tree/b991e813
Diff: http://git-wip-us.apache.org/repos/asf/incubator-falcon/diff/b991e813

Branch: refs/heads/FALCON-585
Commit: b991e81353de8687a4e08befbc45a46366f2d0f9
Parents: 62b2af0
Author: Suhas V <su...@inmobi.com>
Authored: Wed Aug 20 13:14:36 2014 +0530
Committer: Suhas V <su...@inmobi.com>
Committed: Wed Aug 20 13:14:36 2014 +0530

----------------------------------------------------------------------
 CHANGES.txt                                               |  3 +++
 .../falcon/service/SharedLibraryHostingService.java       | 10 +++++-----
 2 files changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b991e813/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 55856ea..6409032 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -64,6 +64,9 @@ Trunk (Unreleased)
   OPTIMIZATIONS
 
   BUG FIXES
+   FALCON-616 cluster submission should fail when shared libs copy fail
+   (Shwetha GS via Suhas Vasu)   
+
    FALCON-598 ProcessHelper throws NPE if the process has no inputs OR no
    outputs defined (Balu Vellanki via Venkatesh Seetharam)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/b991e813/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java b/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
index c61e089..d273d61 100644
--- a/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
+++ b/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
@@ -85,7 +85,7 @@ public class SharedLibraryHostingService implements ConfigurationChangeListener
             pushLibsToHDFS(properties.getProperty("libext.process.paths"),
                     new Path(libext, EntityType.PROCESS.name()) , cluster, null);
         } catch (IOException e) {
-            LOG.error("Failed to copy shared libs to cluster {}", cluster.getName(), e);
+            throw new FalconException("Failed to copy shared libs to cluster" + cluster.getName(), e);
         }
     }
 
@@ -104,8 +104,8 @@ public class SharedLibraryHostingService implements ConfigurationChangeListener
             throw new FalconException("Unable to connect to HDFS: "
                     + ClusterHelper.getStorageUrl(cluster), e);
         }
-        if (!fs.exists(target)) {
-            fs.mkdirs(target);
+        if (!fs.exists(target) && !fs.mkdirs(target)) {
+            throw new FalconException("mkdir " + target + " failed");
         }
 
         for(String srcPaths : src.split(",")) {
@@ -185,8 +185,8 @@ public class SharedLibraryHostingService implements ConfigurationChangeListener
     public void onReload(Entity entity) throws FalconException {
         try {
             onAdd(entity);
-        } catch (FalconException ignored) {
-            LOG.warn("Failed to copy shared libraries to cluster", ignored);
+        } catch (FalconException e) {
+            throw new FalconException(e);
         }
     }
 }