Created on 02-11-2017 06:51 PM - edited 08-17-2019 02:32 PM
Apache Ambari 2.5 will have a slew of new views that were not available before. One of them is called Workflow Manager. It is a new experience to work with Apache Oozie workflows. It is meant to be easy to use and help users in building powerful workflows without ever touching XML or dated Oozie UI. Let's get Started!
We will begin with authoring a simple Shell Action; first thing we need to do is login to Ambari views instance with a user that has permissions working with Workflow Manager. In my case user is centos. Once logged in, you will be greeted with selection of views that your particular user has permissions to:
We're going to select WFD, don't worry about the acronym name, that's configurable by your Ambari admin and can be named anything you prefer. Also, going forward, for brevity, I will refer to Workflow Manager as WFM. Once in WFM view, you're greeted with a canvas that you'll be using for the rest of the tutorial. We're going to create a new workflow by selecting it in the options menu.
Notice there are options to create coordinator and bundle types of workflows as well. Since it's a shell action, we're going to rename the workflow to shell-action.
You can see in the picture above that any action in WFM has a beginning and end. If you hover over the arrow connecting two nodes, you will notice a plus sign, this is what you're going to use to add new actions.
List of all built-in actions is visible once you click the plus sign.
Select shell action as that's what we're going to use in this scenario. Once clicked, you can edit the shell action node to rename it or configure it for your specific needs.
Click the gear icon to modify the configuration.
I'm going to run a simple echo command and capture its output as this is meant to be a simple example. You can also enter name of a script file you want to execute, I'm going to demonstrate it in a future tutorial. Then, you can scroll down into the advanced properties section to modify parameters and arguments to the command.
Notice my argument is just a statement I want to echo on the console. Since I also want to capture the output of the command for further processing or just for visual perspective, in the bottom of the dialog, I will check the capture output box.
At this point my workflow is ready and I can submit it. Click on that next, you will see a few more options. You need to specify the location of the workflow, path must exist on hdfs but not the xml, if xml exists, you need to overwrite it. Then you can select run on submit. Another option in the dialog is to validate your workflow. Clicking that will tell you whether your wf is valid or not.
Finally, let's submit the wf.
Notice anything familiar? WFM uses Oozie REST API to work with Oozie and doesn't introduce anything new to the formula except for an awesome UI, when you submit a wf, as a result you will get an Ooozie JOB ID. So what do you do next, go to Oozie UI right? No, WFM got you covered there too, it has a dashboard tab that loads the whole Oozie wf job history as well as anything current.
You can now monitor your job status in this UI! Once job completes, you can navigate to the output and view the result of the wf. The output will be in the STDOUT logs of the associated YARN job.
Created on 02-26-2017 07:18 AM
thanks for great tutorial.
unfortunately I couldn't see the output. where can I see?
And also I do not see create coordinators button 😞
Created on 02-26-2017 03:45 PM - edited 08-17-2019 02:31 PM
@Ali Mohammadi Shanghoshabad it is important that you click the checkbox for capture-output, your xml when you preview should look like so
Here is that checkbox below, look for it in the shell action.
Created on 02-28-2017 04:41 AM
thank you
Actually I had clicked the checkbox. I think, I should wait for a new version of Ambari; my Ambari is 2.4 .
Created on 04-03-2017 10:07 PM
I also do not see output: Log Type: stdout Log Upload Time: Mon Apr 03 21:23:54 +0000 2017 Log Length: 0
I'm running with Ambari 2.5 and verified "Capture output" is checked. Is there special setup required or missing?
Created on 04-05-2017 01:53 PM
It turns out that I was using the wrong set of logs. I was using "ApplicationMaster logs" Instead, I should have used "Map Task -> task name -> logs
Created on 04-05-2017 01:54 PM
Created on 04-05-2017 01:55 PM
Created on 04-06-2017 08:00 AM
I am trying to use workflow manager in Ambari 2.4. Created workflow, but can not delete it. Is there a possibility to delete workflow? Will this view see all workflows created in oozie?
Created on 04-06-2017 08:16 AM
@artem : thanks for tuto
Do you know about this error with oozie : "oozie error workflow manager kerberos" ?