Book Image

Learning Cascading

Book Image

Learning Cascading

Overview of this book

Table of Contents (18 chapters)
Learning Cascading
Credits
Foreword
About the Authors
About the Reviewers
www.PacktPub.com
Preface
7
Optimizing the Performance of a Cascading Application
Index

Dynamically controlling flows


One interesting aspect of Cascading is that flows can be dynamically controlled. Other similar languages and paradigms such as Pig and Hive allow a high degree of programmability, but their defined work runs from beginning to end, with no ability to control the execution flow through examination of data or conditions. With Cascading, program control can be used to alter the processing of a flow, to run it multiple times, to prevent it from running, or to programmatically control the very sequence and choice of flows that run. This is an important feature of Cascading and differentiates it from many other higher level frameworks. So the dynamic control of a flow is a "programmable" ability to run one or more flows iteratively, or alternately to control the sequence of execution. For instance:

  1. In a loop, run a flow.

  2. Check the status when the flow ends.

  3. Decide whether to run the flow again. Alternately, based on the outcome, determine which flow to run next.

  4. End when...