linkedin / linkedin-gradle-plugin-for-apache-hadoop

Apache License 2.0
117 stars 76 forks source link

DSL Trigger Implementation #212

Closed reallocf closed 6 years ago

reallocf commented 6 years ago

As Azkaban rolls out data-availability based triggers, we're updating the DSL so it can generate these triggers.

Note: Since triggers are flow-level, it requires the new Flow 2.0 yaml serialization. You can instruct the DSL to generate yaml by specifying generateYamlOutput true in your hadoop closure.

This PR provides a full data triggers implementation. It introduces the Trigger, Schedule, and TriggerDependency objects.

Other than the introduction of these objects and the logic to yamlize them in the AzkabanDslYamlCompiler, this PR is primarily checker logic and unit and integration tests. The TriggerChecker is implemented to make sure that Triggers/Schedules/TriggerDependencies are properly defined. The unit tests confirm that the AzkabanDslYamlCompiler compiles the new objects properly. And the integration tests test confirm that the DSL is generating Triggers in Yaml in an expected way and that the TriggerChecker picks up improperly defined Triggers.

More info in #194