falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suh...@apache.org
Subject falcon git commit: FALCON-995 Sharelib directory does not exist in webapp. Contributed by Peeyush Bishnoi.
Date Tue, 20 Jan 2015 07:29:43 GMT
Repository: falcon
Updated Branches:
  refs/heads/master c781e3f7e -> e44872584


FALCON-995 Sharelib directory does not exist in webapp. 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/e4487258
Tree: http://git-wip-us.apache.org/repos/asf/falcon/tree/e4487258
Diff: http://git-wip-us.apache.org/repos/asf/falcon/diff/e4487258

Branch: refs/heads/master
Commit: e448725847d19218815951bceb7190c06929511c
Parents: c781e3f
Author: Suhas Vasu <suhas.v@inmobi.com>
Authored: Tue Jan 20 12:59:29 2015 +0530
Committer: Suhas Vasu <suhas.v@inmobi.com>
Committed: Tue Jan 20 12:59:29 2015 +0530

----------------------------------------------------------------------
 CHANGES.txt                                           |  3 +++
 .../apache/falcon/listener/HadoopStartupListener.java | 14 +++++++++-----
 2 files changed, 12 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/falcon/blob/e4487258/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b01c540..31e35e0 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -75,6 +75,9 @@ Trunk (Unreleased)
    (Suhas vasu)
 
   BUG FIXES
+   FALCON-995 Sharelib directory does not exist in webapp
+   (Peeyush Bishnoi via Suhas Vasu)
+
    FALCON-984 Falcon build is broken. (Peeyush Bishnoi via Srikanth
    Sundarrajan)
 

http://git-wip-us.apache.org/repos/asf/falcon/blob/e4487258/test-tools/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java
----------------------------------------------------------------------
diff --git a/test-tools/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java
b/test-tools/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java
index 4298558..7bee592 100644
--- a/test-tools/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java
+++ b/test-tools/hadoop-webapp/src/main/java/org/apache/falcon/listener/HadoopStartupListener.java
@@ -55,14 +55,18 @@ public class HadoopStartupListener implements ServletContextListener {
     }
 
     private void copyShareLib() throws Exception {
-        String shareLibHDFSPath = getShareLibPath() +  File.separator + SHARE_LIB_PREFIX
-                                    + getTimestampDirectory();
+        Path shareLibFSPath = new Path(getShareLibPath() +  File.separator + SHARE_LIB_PREFIX
+                + getTimestampDirectory());
         Configuration conf = new Configuration();
-        FileSystem fs = FileSystem.get(new Path(shareLibHDFSPath).toUri(), conf);
+        FileSystem fs = FileSystem.get(shareLibFSPath.toUri(), conf);
+        if (!fs.exists(shareLibFSPath)) {
+            fs.mkdirs(shareLibFSPath);
+        }
+
         String[] actionDirectories = getLibActionDirectories();
         for(String actionDirectory : actionDirectories) {
-            LOG.info("Copying Action Directory {0}", actionDirectory);
-            fs.copyFromLocalFile(new Path(shareLibPath, actionDirectory), new Path(shareLibHDFSPath));
+            LOG.info("Copying Action Directory: {}", actionDirectory);
+            fs.copyFromLocalFile(new Path(shareLibPath, actionDirectory), shareLibFSPath);
         }
     }
 


Mime
View raw message