TheDeveloperBlog.com

Home | Contact Us

C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML

Pig Run Modes

Apache Pig Run Modes for beginners and professionals with examples on hive, pig run mode, local mode, map reduce mode, pig, hbase, hdfs, mapreduce, oozie, zooker, spark, sqoop

<< Back to PIG

Apache Pig Run Modes

Apache Pig executes in two modes: Local Mode and MapReduce Mode.

Apache Pig Run Modes

Local Mode

  • It executes in a single JVM and is used for development experimenting and prototyping.
  • Here, files are installed and run using localhost.
  • The local mode works on a local file system. The input and output data stored in the local file system.

The command for local mode grunt shell:

$ pig-x local  

MapReduce Mode

  • The MapReduce mode is also known as Hadoop Mode.
  • It is the default mode.
  • In this Pig renders Pig Latin into MapReduce jobs and executes them on the cluster.
  • It can be executed against semi-distributed or fully distributed Hadoop installation.
  • Here, the input and output data are present on HDFS.

The command for Map reduce mode:

 $ pig  

Or,

$ pig -x mapreduce

Ways to execute Pig Program

These are the following ways of executing a Pig program on local and MapReduce mode: -

  • Interactive Mode - In this mode, the Pig is executed in the Grunt shell. To invoke Grunt shell, run the pig command. Once the Grunt mode executes, we can provide Pig Latin statements and command interactively at the command line.
  • Batch Mode - In this mode, we can run a script file having a .pig extension. These files contain Pig Latin commands.
  • Embedded Mode - In this mode, we can define our own functions. These functions can be called as UDF (User Defined Functions). Here, we use programming languages like Java and Python.
Next TopicPig Latin Concepts




Related Links:


Related Links

Adjectives Ado Ai Android Angular Antonyms Apache Articles Asp Autocad Automata Aws Azure Basic Binary Bitcoin Blockchain C Cassandra Change Coa Computer Control Cpp Create Creating C-Sharp Cyber Daa Data Dbms Deletion Devops Difference Discrete Es6 Ethical Examples Features Firebase Flutter Fs Git Go Hbase History Hive Hiveql How Html Idioms Insertion Installing Ios Java Joomla Js Kafka Kali Laravel Logical Machine Matlab Matrix Mongodb Mysql One Opencv Oracle Ordering Os Pandas Php Pig Pl Postgresql Powershell Prepositions Program Python React Ruby Scala Selecting Selenium Sentence Seo Sharepoint Software Spellings Spotting Spring Sql Sqlite Sqoop Svn Swift Synonyms Talend Testng Types Uml Unity Vbnet Verbal Webdriver What Wpf