Book Image

Mastering Hadoop

By : Karanth
Book Image

Mastering Hadoop

By: Karanth

Overview of this book

Do you want to broaden your Hadoop skill set and take your knowledge to the next level? Do you wish to enhance your knowledge of Hadoop to solve challenging data processing problems? Are your Hadoop jobs, Pig scripts, or Hive queries not working as fast as you intend? Are you looking to understand the benefits of upgrading Hadoop? If the answer is yes to any of these, this book is for you. It assumes novice-level familiarity with Hadoop.
Table of Contents (15 chapters)
14
Index

Different modes of execution

Pig has the following three modes of execution:

  • Interactive mode: In this mode, a grunt shell is provided to the user. Users can type in Pig commands in an interactive session with Pig and the Hadoop cluster.
  • Batch mode: In this mode, the user can write a series of Pig statements into a script file. The file can then be submitted for execution.
  • Embedded mode: In this mode, any Java program can invoke Pig commands by importing the Pig libraries.

Apart from these modes of execution, Pig can either be executed locally, in the local mode using the local execution environment, or on a Hadoop cluster execution environment in the mapreduce mode . In the former mode, all commands are executed on a single system using the local filesystem. If the –x switch is not specified, Pig defaults to running in the mapreduce mode. Specifying the –x switch gives the user an option to run in the local or mapreduce mode and use the appropriate execution environment. The...