You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@falcon.apache.org by aj...@apache.org on 2015/05/15 07:46:02 UTC

falcon git commit: FALCON-1165 Falcon restart failed, if defined service in cluster entity is unreachable. Contributed by Peeyush Bishnoi

Repository: falcon
Updated Branches:
  refs/heads/master eecf7f533 -> ed1654fab


FALCON-1165 Falcon restart failed, if defined service in cluster entity is unreachable. Contributed by Peeyush Bishnoi


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

Branch: refs/heads/master
Commit: ed1654fab53f64f3f09b09225183a0e18c6177bf
Parents: eecf7f5
Author: Ajay Yadava <aj...@gmail.com>
Authored: Fri May 15 11:11:22 2015 +0530
Committer: Ajay Yadava <aj...@gmail.com>
Committed: Fri May 15 11:11:22 2015 +0530

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


http://git-wip-us.apache.org/repos/asf/falcon/blob/ed1654fa/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index e21238f..77d0d06 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -24,6 +24,9 @@ Trunk (Unreleased)
   OPTIMIZATIONS
 
   BUG FIXES
+    FALCON-1165 Falcon restart failed, if defined service in cluster entity is unreachable
+    (Peeyush Bishnoi via Ajay Yadava)
+     
     FALCON-1195 ClusterEntityParserTest fails intermittently
     (Balu Vellanki via Sowmya Ramesh)
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/ed1654fa/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 b3b7bf3..e3de6a4 100644
--- a/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
+++ b/oozie/src/main/java/org/apache/falcon/service/SharedLibraryHostingService.java
@@ -70,12 +70,20 @@ public class SharedLibraryHostingService implements ConfigurationChangeListener
     };
 
     private void addLibsTo(Cluster cluster) throws FalconException {
-        Path lib = new Path(ClusterHelper.getLocation(cluster, ClusterLocationType.WORKING).getPath(), "lib");
-        Path libext = new Path(ClusterHelper.getLocation(cluster, ClusterLocationType.WORKING).getPath(), "libext");
+        FileSystem fs = null;
         try {
-            FileSystem fs = HadoopClientFactory.get().createFalconFileSystem(
-                    ClusterHelper.getConfiguration(cluster));
+            LOG.info("Initializing FS: {} for cluster: {}", ClusterHelper.getStorageUrl(cluster), cluster.getName());
+            fs = HadoopClientFactory.get().createFalconFileSystem(ClusterHelper.getConfiguration(cluster));
+            fs.getStatus();
+        } catch (Exception e) {
+            throw new FalconException("Failed to initialize FS for cluster : " + cluster.getName(), e);
+        }
 
+        try {
+            Path lib = new Path(ClusterHelper.getLocation(cluster, ClusterLocationType.WORKING).getPath(),
+                    "lib");
+            Path libext = new Path(ClusterHelper.getLocation(cluster, ClusterLocationType.WORKING).getPath(),
+                    "libext");
             Properties properties = StartupProperties.get();
             pushLibsToHDFS(fs, properties.getProperty("system.lib.location"), lib,
                     NON_FALCON_JAR_FILTER);
@@ -183,7 +191,7 @@ public class SharedLibraryHostingService implements ConfigurationChangeListener
         try {
             onAdd(entity);
         } catch (FalconException e) {
-            throw new FalconException(e);
+            LOG.error(e.getMessage(), e);
         }
     }
 }