The Dynamic Workflow Builder in Hue

Hue is a web interface for Apache Hadoop that makes common Hadoop tasks such as running MapReduce jobs, browsing HDFS, and creating Apache Oozie workflows, easier. In this post, we’re going to focus on the dynamic workflow builder that Hue provides for Oozie that will be released in Hue 2.2.0 (For a high-level description of Oozie integration in Hue, see this blog post).

The dynamic workflow editor is feature packed and emphasizes usability. The heavy lifting is delegated to the client via Javascript to provide a more “dynamic” experience for the user. This is achieved by using the MVVM (Model View View-Model) design pattern with KnockoutJS and event handling with JQuery. In effect, moving, creating, modifying, and deleting actions will be much easier. Also, the workflow editor will support Oozie’s Decision node.

Basic Operations on Actions

The experience of performing basic operations on actions has been simplified (IE: Creating, updating, and deleting a node).

Nodes can be added seamlessly by clicking on the desired node type and filling out a few parameters. The parameters shown will vary depending on the type of node being added.

The node’s attributes can be modified in the future by clicking on the name of the node. Whenever a node is added or updated, the node will be validated before the popup will be closed. Also, a node can be removed by clicking on the “x” symbol within the node:

Drag and Drop Actions in the Workflow

The dynamic workflow editor has three main movement functions: action placement, forking, and splitting by decision.

Here’s a quick demo of each of the main movement functions in the new workflow editor:

Basic Node Placement

Actions can be placed almost anywhere in the workflow by simply dragging the action to the desired location. This can be in between two other actions, at the top of the workflow, or at the very bottom of the workflow.

Forking

Fork nodes split the path of execution into multiple paths of execution. These paths of execution run concurrently. Fork nodes can be created by dragging an action onto another action. More paths of execution can be added by dropping an action to the fork node itself. Fork nodes are immobile, but can be removed by moving all actions out of the split paths of execution.

Decision Node Support

Decision nodes choose a path of execution based on conditions specified in the node itself. To create a decision node, users will need to convert existing Fork nodes by clicking on a Fork node’s name.

The conditions can be added, or modified, by editing the node itself and providing expressions in the form ${ } as shown below.

Summary

The soon to be released workflow editor is much more usable and flexible. It allows users to drag actions to any location in the workflow, trivially create forks, and perform basic operations on actions. It also introduces the decision node, which can be used to conditionally split the paths of execution.

Hue will be seeing a slew of updates in the near future. The workflow editor itself will support more actions and provide a better experience when managing coordinators.

Have any suggestions? Feel free to tell us what you think through hue-user.

Filed under:

1 Response
  • canac remote control technologies / February 01, 2013 / 2:10 AM

    Hello! I simply want to give you a huge thumbs up for
    your excellent info you have got right here on this post.
    I will be returning to your blog for more soon.

Leave a comment


5 × eight =