Google News
logo
Hadoop - Interview Questions
Explain the Apache Pig architecture.
Apache Pig architecture includes a Pig Latin interpreter that applies Pig Latin scripts to process and interpret massive datasets. Programmers use Pig Latin language to examine huge datasets in the Hadoop environment. Apache pig has a vibrant set of datasets showing different data operations like join, filter, sort, load, group, etc.

Programmers must practice Pig Latin language to address a Pig script to perform a particular task. Pig transforms these Pig scripts into a series of Map-Reduce jobs to reduce programmers’ work. Pig Latin programs are performed via various mechanisms such as UDFs, embedded, and Grunt shells.
 
Apache Pig architecture consists of the following major components :
 
Parser : The Parser handles the Pig Scripts and checks the syntax of the script.
Optimizer : The optimizer receives the logical plan (DAG). And carries out the logical optimization such as projection and push down.
Compiler : The compiler converts the logical plan into a series of MapReduce jobs.
Execution Engine : In the end, the MapReduce jobs get submitted to Hadoop in sorted order.
Execution Mode : Apache Pig is executed in local and Map Reduce modes. The selection of execution mode depends on where the data is stored and where you want to run the Pig script.
Advertisement