falcon-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From venkat...@apache.org
Subject [1/2] git commit: FALCON-437 Feed Replication workflows are failing. Contributed by Venkatesh Seetharam
Date Mon, 12 May 2014 18:33:32 GMT
Repository: incubator-falcon
Updated Branches:
  refs/heads/master 7700dc268 -> a5792e4fb


FALCON-437 Feed Replication workflows are failing. Contributed by Venkatesh Seetharam


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

Branch: refs/heads/master
Commit: 397ef0c2818526d0f951bfa063fef6e97637ec75
Parents: 7700dc2
Author: Venkatesh Seetharam <venkatesh@apache.org>
Authored: Mon May 12 11:32:37 2014 -0700
Committer: Venkatesh Seetharam <venkatesh@apache.org>
Committed: Mon May 12 11:32:37 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 ++
 .../falcon/workflow/OozieWorkflowBuilder.java   | 27 +++++++++++---------
 2 files changed, 17 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/397ef0c2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index ca2ce75..1625642 100755
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -141,6 +141,8 @@ Release Version: 0.5-incubating
     FALCON-123 Improve build speeds in falcon. (Srikanth Sundarrajan via Shwetha GS)
 
   BUG FIXES
+    FALCON-437 Feed Replication workflows are failing (Venkatesh Seetharam)
+
     FALCON-429 Falcon CLI entity list command throws NPE stack trace in case
     of no entities (Satish Mittal via Venkatesh Seetharam)
 

http://git-wip-us.apache.org/repos/asf/incubator-falcon/blob/397ef0c2/oozie/src/main/java/org/apache/falcon/workflow/OozieWorkflowBuilder.java
----------------------------------------------------------------------
diff --git a/oozie/src/main/java/org/apache/falcon/workflow/OozieWorkflowBuilder.java b/oozie/src/main/java/org/apache/falcon/workflow/OozieWorkflowBuilder.java
index 19fdce8..96b5a64 100644
--- a/oozie/src/main/java/org/apache/falcon/workflow/OozieWorkflowBuilder.java
+++ b/oozie/src/main/java/org/apache/falcon/workflow/OozieWorkflowBuilder.java
@@ -148,20 +148,24 @@ public abstract class OozieWorkflowBuilder<T extends Entity> extends
WorkflowBui
         if (coordinators.size() == 0) {
             return false;
         }
+
         for (COORDINATORAPP coordinatorapp : coordinators) {
             Path coordPath = getCoordPath(bundlePath, coordinatorapp.getName());
             String coordXmlName = marshal(cluster, coordinatorapp, coordPath,
                 EntityUtil.getWorkflowNameSuffix(coordinatorapp.getName(), entity));
-            createLogsDir(cluster, coordPath);
+
+            createLogsDir(cluster, coordPath); //create logs dir
+            // copy falcon libs to the workflow dir
+            copySharedLibs(cluster, coordinatorapp);
+
+            // add the coordinator to the bundle
             COORDINATOR bundleCoord = new COORDINATOR();
             bundleCoord.setName(coordinatorapp.getName());
             bundleCoord.setAppPath(getStoragePath(coordPath) + "/" + coordXmlName);
             bundleApp.getCoordinator().add(bundleCoord);
-
-            copySharedLibs(cluster, coordPath);
         }
 
-        marshal(cluster, bundleApp, bundlePath);
+        marshal(cluster, bundleApp, bundlePath); // write the bundle
         return true;
     }
 
@@ -214,8 +218,9 @@ public abstract class OozieWorkflowBuilder<T extends Entity> extends
WorkflowBui
         }
     }
 
-    private void copySharedLibs(Cluster cluster, Path coordPath) throws FalconException {
+    private void copySharedLibs(Cluster cluster, COORDINATORAPP coordinatorapp) throws FalconException
{
         try {
+            String coordPath = coordinatorapp.getAction().getWorkflow().getAppPath().replace("${nameNode}",
"");
             Path libPath = new Path(coordPath, "lib");
             SharedLibraryHostingService.pushLibsToHDFS(StartupProperties.get().getProperty("system.lib.location"),
                 libPath, cluster, FALCON_JAR_FILTER);
@@ -336,13 +341,11 @@ public abstract class OozieWorkflowBuilder<T extends Entity> extends
WorkflowBui
         }
     }
 
-    protected String marshal(Cluster cluster, COORDINATORAPP coord, Path outPath, String
name) throws FalconException {
-        if (StringUtils.isEmpty(name)) {
-            name = "coordinator";
-        }
-        name = name + ".xml";
-        marshal(cluster, new ObjectFactory().createCoordinatorApp(coord), OozieUtils.COORD_JAXB_CONTEXT,
-            new Path(outPath, name));
+    protected String marshal(Cluster cluster, COORDINATORAPP coord, Path outPath,
+                             String name) throws FalconException {
+        name = (StringUtils.isEmpty(name) ? "coordinator" : name) + ".xml";
+        marshal(cluster, new ObjectFactory().createCoordinatorApp(coord),
+                OozieUtils.COORD_JAXB_CONTEXT, new Path(outPath, name));
         return name;
     }
 


Mime
View raw message