azkaban-aplcache

Details

diff --git a/az-examples/kafka-event-based-trigger/eventTriggerProject.zip b/az-examples/kafka-event-based-trigger/eventTriggerProject.zip
new file mode 100644
index 0000000..08dc916
Binary files /dev/null and b/az-examples/kafka-event-based-trigger/eventTriggerProject.zip differ
diff --git a/az-examples/kafka-event-based-trigger/flow_trigger.flow b/az-examples/kafka-event-based-trigger/flow_trigger.flow
new file mode 100644
index 0000000..47f79eb
--- /dev/null
+++ b/az-examples/kafka-event-based-trigger/flow_trigger.flow
@@ -0,0 +1,76 @@
+---
+# Flow trigger
+trigger:
+  maxWaitMins: 2880
+  schedule:
+    type: cron
+    value: 0 0/2 * * * ?
+
+  triggerDependencies:
+    - name: dep1 # an unique name to identify the dependency
+      type: kafka
+      params:
+        match: .*
+        topic: AzEvent_Topic4
+    - name: dep2 # an unique name to identify the dependency
+      type: kafka
+      params:
+        match: hadoop?.*
+        topic: AzEvent_Topic1
+    - name: dep3 # an unique name to identify the dependency
+      type: kafka
+      params:
+        match: .*Partition[A-Z]....Event
+        topic: AzEvent_Topic4
+
+
+ A map data structure that enables efficient lookup by topic and adding/removing topic event pairs.
+ Structure looks like:
+ {
+  Topic1:{
+    Rule1:[List of dependencies]
+    Rule2:[List of dependencies]
+  }
+  Topic2:{
+    Rule1:[List of dependencies]
+    Rule2:[List of dependencies]
+  }
+  Topic3:{
+    Rule1:[List of dependencies]
+    Rule2:[List of dependencies]
+  }
+}
+
+# All flow level properties here
+config:
+  #failure.emails: example@example.com
+
+# This section defines the list of jobs
+# A node can be a job or a flow
+# In this example, all nodes are jobs
+nodes:
+  # Job definition
+  # The job definition is like a YAMLified version of properties file
+  # with one major difference. All custom properties are now clubbed together
+  # in a config section in the definition.
+  # The first line describes the name of the job
+  - name: shell_end
+    # Describe the type of the job
+    type: noop
+
+    # List the dependencies of the job
+    dependsOn:
+      - shell_pwd
+      - shell_echo
+
+  - name: shell_echo
+    # Describe the type of the job
+    type: command
+    config:
+      command: echo "This is an echoed text."
+
+  - name: shell_pwd
+    # Describe the type of the job
+    type: command
+    config:
+      command: sleep 10 
diff --git a/az-examples/kafka-event-based-trigger/flow_trigger.project b/az-examples/kafka-event-based-trigger/flow_trigger.project
new file mode 100644
index 0000000..4929753
--- /dev/null
+++ b/az-examples/kafka-event-based-trigger/flow_trigger.project
@@ -0,0 +1 @@
+azkaban-flow-version: 2.0
diff --git a/az-examples/kafka-event-based-trigger/regular.flow b/az-examples/kafka-event-based-trigger/regular.flow
new file mode 100644
index 0000000..5641db6
--- /dev/null
+++ b/az-examples/kafka-event-based-trigger/regular.flow
@@ -0,0 +1,35 @@
+---
+
+# All flow level properties here
+config:
+  flow-level-parameter: value
+
+# This section defines the list of jobs
+# A node can be a job or a flow
+# In this example, all nodes are jobs
+nodes:
+  # Job definition
+  # The job definition is like a YAMLified version of properties file
+  # with one major difference. All custom properties are now clubbed together
+  # in a config section in the definition.
+  # The first line describes the name of the job
+  - name: shell_end
+    # Describe the type of the job
+    type: noop
+
+    # List the dependencies of the job
+    dependsOn:
+      - shell_pwd
+      - shell_echo
+
+  - name: shell_echo
+    # Describe the type of the job
+    type: command
+    config:
+      command: echo "This is an echoed text."
+
+  - name: shell_pwd
+    # Describe the type of the job
+    type: command
+    config:
+      command: pwd