This topic contains 1 reply, has 1 voice, and was last updated by  DataFlair Team 1 year, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #6615

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

    #6616

    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 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.