Database Reference
In-Depth Information
Pig Execution Modes
With Apache Pig, two execution modes are available:
Local
MapReduce
Local Mode
Pig has an interactive shell, and we can start Pig's execution in local mode, which will
require running the following command (see Figure 6-5 ):
pig -x local
Figure 6-5 . Starting Pig in local mode
MapReduce Mode
Running Pig in MapReduce mode requires that the Hadoop process is up and running.
(You can refer to the “Reading Tweets from HDFS and Storing Count Results into Cas-
sandra” section in Chapter 5 . ) To run Pig in MapReduce mode, we need to run
$ pig
Once connected we can also explore the HDFS directory using the Grunt shell as
follows:
grunt> cd hdfs:///
grunt> ls
hdfs://0.0.0.0/tweets <dir>
hdfs://0.0.0.0/usr <dir>
With this setup and configuration in place, now we are ready to explore other con-
figurations and feature sets provided by Pig. So let's start with data types.
 
 
Search WWH ::




Custom Search