You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@oozie.apache.org by an...@apache.org on 2018/09/21 12:27:33 UTC

oozie git commit: OOZIE-3347 [examples] Fix Fluent Job global example (asalamon74 via andras.piros)

Repository: oozie
Updated Branches:
  refs/heads/master 4a268ff04 -> 3cbb64882


OOZIE-3347 [examples] Fix Fluent Job global example (asalamon74 via andras.piros)


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

Branch: refs/heads/master
Commit: 3cbb648828c2261328b95e2f7c72ee22583e8941
Parents: 4a268ff
Author: Andras Piros <an...@cloudera.com>
Authored: Fri Sep 21 14:26:44 2018 +0200
Committer: Andras Piros <an...@cloudera.com>
Committed: Fri Sep 21 14:26:44 2018 +0200

----------------------------------------------------------------------
 .../apache/oozie/example/fluentjob/Global.java  | 28 ++++++++++++++------
 release-log.txt                                 |  1 +
 2 files changed, 21 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/oozie/blob/3cbb6488/examples/src/main/java/org/apache/oozie/example/fluentjob/Global.java
----------------------------------------------------------------------
diff --git a/examples/src/main/java/org/apache/oozie/example/fluentjob/Global.java b/examples/src/main/java/org/apache/oozie/example/fluentjob/Global.java
index c50fda0..b35ee79 100644
--- a/examples/src/main/java/org/apache/oozie/example/fluentjob/Global.java
+++ b/examples/src/main/java/org/apache/oozie/example/fluentjob/Global.java
@@ -18,7 +18,9 @@
 
 package org.apache.oozie.example.fluentjob;
 
-import org.apache.oozie.fluentjob.api.action.LauncherBuilder;
+import org.apache.oozie.fluentjob.api.action.JavaAction;
+import org.apache.oozie.fluentjob.api.action.JavaActionBuilder;
+
 import org.apache.oozie.fluentjob.api.factory.WorkflowFactory;
 import org.apache.oozie.fluentjob.api.workflow.GlobalBuilder;
 import org.apache.oozie.fluentjob.api.workflow.Workflow;
@@ -30,19 +32,29 @@ import org.apache.oozie.fluentjob.api.workflow.WorkflowBuilder;
 public class Global implements WorkflowFactory {
     @Override
     public Workflow create() {
+        final JavaAction parent = JavaActionBuilder.create()
+                .withName("java-main-1")
+                .withMainClass("org.apache.oozie.example.DemoJavaMain")
+                .withArchive(
+                        "${nameNode}/user/${wf:user()}/${examplesRoot}/apps/java-main/lib/oozie-examples-${projectVersion}.jar")
+                .withArg("Hello")
+                .withArg("Oozie!")
+                .build();
+        JavaActionBuilder.createFromExistingAction(parent)
+                .withName("java-main-2")
+                .withoutArg("Oozie!")
+                .withArg("Oozie2!")
+                .withParent(parent)
+                .build();
+
         final Workflow workflow = new WorkflowBuilder()
                 .withName("workflow-with-global")
                 .withGlobal(GlobalBuilder.create()
                         .withResourceManager("${resourceManager}")
                         .withNameNode("${nameNode}")
-                        .withJobXml("job.xml")
-                        .withConfigProperty("key1", "value1")
-                        .withLauncher(new LauncherBuilder()
-                                .withMemoryMb(1024L)
-                                .withVCores(1L)
-                                .build())
+                        .withConfigProperty("mapred.job.queue.name", "${queueName}")
                         .build())
-                .build();
+                .withDagContainingNode(parent).build();
 
         return workflow;
     }

http://git-wip-us.apache.org/repos/asf/oozie/blob/3cbb6488/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index cdf98a8..37ad2ac 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -1,5 +1,6 @@
 -- Oozie 5.1.0 release (trunk - unreleased)
 
+OOZIE-3347 [examples] Fix Fluent Job global example (asalamon74 via andras.piros)
 OOZIE-3160 amend PriorityDelayQueue put()/take() can cause significant CPU load due to busy waiting (pbacsko)
 OOZIE-3342 [examples] Missing archive tag from Fluent Job examples (asalamon74 via andras.piros)
 OOZIE-2734 amend [docs] Switch from TWiki to Markdown (asalamon74 via andras.piros, pbacsko, gezapeti)