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 HADOOP_CONF_DIR...