Book Image

Learning Big Data with Amazon Elastic MapReduce

By : Amarkant Singh, Vijay Rayapati
Book Image

Learning Big Data with Amazon Elastic MapReduce

By: Amarkant Singh, Vijay Rayapati

Overview of this book

<p>Amazon Elastic MapReduce is a web service used to process and store vast amount of data, and it is one of the largest Hadoop operators in the world. With the increase in the amount of data generated and collected by many businesses and the arrival of cost-effective cloud-based solutions for distributed computing, the feasibility to crunch large amounts of data to get deep insights within a short span of time has increased greatly.</p> <p>This book will get you started with AWS so that you can quickly create your own account and explore the services provided, many of which you might be delighted to use. This book covers the architectural details of the MapReduce framework, Apache Hadoop, various job models on EMR, how to manage clusters on EMR, and the command-line tools available with EMR. Each chapter builds on the knowledge of the previous one, leading to the final chapter where you will learn about solving a real-world use case using Apache Hadoop and EMR. This book will, therefore, get you up and running with major Big Data technologies quickly and efficiently.</p>
Table of Contents (18 chapters)
Learning Big Data with Amazon Elastic MapReduce
Credits
About the Authors
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Hadoop streaming


This is basically a prebuilt utility that comes along with the Hadoop distribution. It allows you to create a MapReduce job using any executable program or script as the mapper and reducer.

As discussed in Chapter 5, Programming Hadoop on Amazon EMR, let's say you have your local copy of Hadoop distribution in <hadoop-2.2.0-base-path>. You should be able to find the streaming utility jar file in <hadoop-2.2.0-base-path>/share/hadoop/tools/lib/hadoop-streaming-2.2.0.jar. Say you have written your mapper and reducer in Python, and you have mapper.py and reducer.py as your mapper and reducer respectively. Now, locally you can use the streaming utility by executing the following command:

<hadoop-2.2.0-base-path>/bin/hadoop  jar <hadoop-2.2.0-base-path>/share/hadoop/tools/lib/hadoop-streaming-2.2.0.jar \
    -input <inputDirectoryOrFile> \
    -output <outputDirectory> \
    -mapper mapper.py \
    -reducer reducer.py

How streaming works

The...