In this tutorial, I will cover how to create Oozie coordinators via Workflow Manager View. I'm also going to leverage Publish/Import Asset functionality demonstrated in my last tutorial only now using local database rather than HDFS.
We're going to publish the two actions nodes from part 9 (shell action doing echo and email action) using the next to last icon when you click on the action node.
So just like I did in part 9 to publish an asset to HDFS, same steps except there's no HDFS path.
You're greeted with dialog to give asset a name and description.
I already published shell action to assets database in the same manner. I'd like to glance at what assets I have in my local Ambari Views instance. To do that, I'm going to click on manage assets button in the top right hand corner.
You're going to see a list of any saved assets so far. In the same manner, you can delete assets by hitting red trash icon to the right of them.
Asset manager also allows you to search through all saved assets.
Keep in mind that local asset database is exactly that, local, it is not being shared across instances of Ambai Views nodes. For that, please use publish/import from HDFS functionality just like in part 9.
We're ready to tie it all together, we're going to create a new workflow, name it part-10, then begin to add new nodes, though now instead of adding pre-existing nodes, we're going to click on import asset
You'll get a pop-up to select an asset from asset manager. Click on it and hit import.
Now we're ready to import 2nd asset
Select the asset and import it.
Your workflow should look like so
I gave the action nodes more meaningful names. We pretty much built this wf from the wf in part 9 using publish/import assets. We can now submit the job. (The path mistakenly points to /user/centos/email, I then submitted this workflow and saved path to /user/centos/part-10).
Great, now we know it works, we're ready to create a coordinator workflow.
On the WFM page, in the right top hand corner, find create button and select coordinator.
You'll be prompted to fill out the details.
This beats working with XML as all I need to do is fill out 5 fields and I have a working coordinator for an existing workflow, by clicking the button next to the browse, you get an option to create a brand new workflow, since we already have one, we're going to enter the path of the existing one. I'm ready to submit the coordinator.
I prefer to save coordinator and workflow in the same directory, though my screenshots do not show that, I chose /user/centos/part-10 as the HDFS path for both workflow and coordinator in my recent work. This is what my directory looks like
Ignore the app-path in my XML, I have two one in /user/centos/email and another one in /user/centos/part-10. I grabbed the wrong screenshot :).
Let's look at our coordinator running and this will allow me to demonstrate some more cool features of WFM like chaining of search tags.
Let's click on dashboard button and see our workflow in action, notice the clock icon to the left of it to identify it as part of a coordinator.
This still shows workflows, if you click on the left of the page where workflow drop down is and select coordinator instead, you can see only coordinators.
It makes it easy to filter out coordinators from workflows and as you see soon bundles by toggling the drop down to select the type of job you're looking for. Here's an example of what a coordinator triggered every 5min will do to your dashboard.
Another cool feature in the dashboard is multi-tag search. In Oozie UI, you can click on name and it will sort ASC/DESC, here we can filter out using pre-defined tags instead to narrow down output to what's relevant.
Notice I added name filter. What if I also want to filter by status:SUCCEEDED and not just name of wf?
I can also add more tags, now I want to also filter out only running workflows.
Now I want to also filter by user name
The other available options are below
Finally, since my coordinator is configured to execute a workflow called part-10 every 5min, I'm getting a lot of emails every time it runs and succeeds. I want to kill the coordinator. I can do it directly from the dashboard. To the right of the running coordinator, I have an option to kill highlighted in red, click that.
once clicked, coordinator goes into Killed stated.