falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ar...@apache.org
Subject [12/18] git commit: FALCON-616. cluster submission should fail when shared libs copy fail. Contributed by Shwetha GS
Date Thu, 21 Aug 2014 17:30:54 GMT
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 <suhas.v@inmobi.com>
Authored: Wed Aug 20 13:14:36 2014 +0530
Committer: Suhas V <suhas.v@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);
         }
     }
 }


Mime
View raw message