Book Image

Apache Oozie Essentials

By : Jagat Singh
Book Image

Apache Oozie Essentials

By: Jagat Singh

Overview of this book

As more and more organizations are discovering the use of big data analytics, interest in platforms that provide storage, computation, and analytic capabilities is booming exponentially. This calls for data management. Hadoop caters to this need. Oozie fulfils this necessity for a scheduler for a Hadoop job by acting as a cron to better analyze data. Apache Oozie Essentials starts off with the basics right from installing and configuring Oozie from source code on your Hadoop cluster to managing your complex clusters. You will learn how to create data ingestion and machine learning workflows. This book is sprinkled with the examples and exercises to help you take your big data learning to the next level. You will discover how to write workflows to run your MapReduce, Pig ,Hive, and Sqoop scripts and schedule them to run at a specific time or for a specific business requirement using a coordinator. This book has engaging real-life exercises and examples to get you in the thick of things. Lastly, you’ll get a grip of how to embed Spark jobs, which can be used to run your machine learning models on Hadoop. By the end of the book, you will have a good knowledge of Apache Oozie. You will be capable of using Oozie to handle large Hadoop workflows and even improve the availability of your Hadoop environment.
Table of Contents (16 chapters)
Apache Oozie Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Running our first Oozie job


We will start with a very simple example. In this chapter, our use case is to delete a given folder on HDFS via Oozie. In our case study, we get data daily in one folder in HDFS, but we want to delete the previous day's data. We want to keep just latest version in our system. Let's solve our business problem:

  1. Log in to Hue and go to Workflows | Editor.

  2. In the top row of editor, there are various types of actions. Select the Hadoop Fs action.

    Tip

    Take some time with your mouse over and read the names of various types of actions that Oozie can run.

  3. Drag the Hadoop Fs action to the editor as shown in the next screenshot.

  4. Give a meaningful name to this action, for example, my_delete_folder_action.

  5. Give the path of the folder that you want to delete. I have used /user/hue/learn_oozie/my_first_oozie_job. I have also set the name of the Workflow as My First Oozie Job, as shown in the following screenshot:

    Hue Workflow editor

  6. Make these changes and click on Save for the Workflow...