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

Get Mastering Hadoop now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.