Book Image

OpenStack Sahara Essentials

By : Omar Khedher
Book Image

OpenStack Sahara Essentials

By: Omar Khedher

Overview of this book

The Sahara project is a module that aims to simplify the building of data processing capabilities on OpenStack. The goal of this book is to provide a focused, fast paced guide to installing, configuring, and getting started with integrating Hadoop with OpenStack, using Sahara. The book should explain to users how to deploy their data-intensive Hadoop and Spark clusters on top of OpenStack. It will also cover how to use the Sahara REST API, how to develop applications for Elastic Data Processing on Openstack, and setting up hadoop or spark clusters on Openstack.
Table of Contents (14 chapters)

Running jobs in Sahara


In the previous chapter, we had a running Hadoop cluster with one Master and three Worker nodes on top of OpenStack. Be aware that running any job type in Sahara requires an Active state of the provisioned cluster.

Executing jobs via Horizon

Since we intend to use Swift for input and output data, the first example will illustrate how to neaten a simple text file by trimming and removing space in each line. The text file looks like the following:

       OpenStack
EDP
    Sahara
      Swift
Jobs

To do so, we will execute a Pig Job in the Sahara cluster and designate the location of the text file in Swift named input. The Pig script might look like the following:

I = load '$INPUT' using PigStorage(':') as (cloud: chararray);
O = foreach I generate com.hadoopbook.pig.Trim(cloud);
store O into '$OUTPUT' USING PigStorage();

Let's take a look at doing a few steps in Horizon to execute a job in Sahara:

  1. Under the Object Store tab, select Containers:

  2. Click on Create Container to create...