Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to see the mapreduce code generated from hadoop pig statements

We all know that the hadoop pig statements are converted into java mapreduce code. I want to know there is any way i can see the mapreduce code generated from pig statements ?

like image 900
user1471250 Avatar asked Dec 20 '22 20:12

user1471250


1 Answers

We all know that hadoop pig statements are converted into java mapreduce code

This is not the case. Hadoop Pig statements are not translated into Java MapReduce code.

A better way of thinking about it is Pig code is "interpreted" in an Pig interpreter that runs in Java MapReduce. Think about it this way: Python and Perl do not "generate" C code, they run through a C program (interpreter) that executes the instructions. Basically, Pig provides a framework for a query plan to be executed. The Pig code gets interpreted and a prebuilt interpreter MapReduce job executes it. For this reason, this is impossible to do.

If you want to understand more of what is going on, use EXPLAIN and ILLUSTRATE to get some insight on the query plan that Pig built to execute your code.

like image 90
Donald Miner Avatar answered Mar 01 '23 23:03

Donald Miner