Execution modes available in PIG?

Viewing 1 reply thread
  • Author
    Posts
    • #6615
      DataFlair TeamDataFlair Team
      Spectator

      What are the different modes of Pig Execution?
      Explain Apache Pig Execution?

    • #6616
      DataFlair TeamDataFlair Team
      Spectator

      In terms of starting Pig, it can be started in 2 modes –

      In Local Mode:
      1) Files are referenced from the Local File System.
      2) No need of Hadoop or HDFS .
      3) Used mainly for Testing and Debugging purposes.
      4) It is started by:pig -x local

      In MapReduce Mode:
      1) Files are referenced from HDFS (in localhost or remote cluster)
      2) Each PigLatin statement is broken down into a series of MapReduce jobs in the background.
      3) Used for Production run.
      4) It is started by:pig -x mapreduceor simplypig

      In terms of Executing Pig Scripts, they can be executed in 2 modes –

      • Interactive Mode
      • Batch Mode.

      In Interactive Mode a user can start Grunt Shell by executing the commandpigorpig -x localand can run Pig Latin statements in the shell.

      In Batch Mode a user can save the Pig statements in a single file (usually saved with .pig extension) and then run the file aspig file.pig

Viewing 1 reply thread
  • You must be logged in to reply to this topic.