Different modes of Pig Execution

Posted at  19:58  |  in  Apache PIG

Different modes of Pig Execution:

Pig has two execution modes or types. They are:
  1. Local Mode
  2. MapReduce Mode

Now let us see each execution mode in detail.

Local Mode: 

In Local Mode of Pig execution, all the input data will be taken from local file system. After execution it provides output on top of local file system.  In local mode, Pig runs in a single JVM and accesses the local filesystem. This mode of suitable only for small datasets and when trying out Pig. To start the local mode of execution, the following command is used.   
  • # pig -x local

The above command starts Grunt. Grunt is the Pig interactive shell. 

MapReduce Mode/HDFS Mode/ Clustered Mode: 


In this mode Apache Pig will take the input form HDFS paths only, and after processing data it will put output files on top of HDFS. In MapReduce mode of execution, Pig translates queries into MapReduce jobs and runs them on a Hadoop Cluster.                                        

Share this post

About-Privacy Policy-Contact us
Copyright © 2013 Hadoop Tutor. Blogger Template by Bloggertheme9
Proudly Powered by Blogger.
back to top