哪里可以看到从 hadoop pig 语句生成的 mapreduce 代码 [英] Where to see the mapreduce code generated from hadoop pig statements

查看:24
本文介绍了哪里可以看到从 hadoop pig 语句生成的 mapreduce 代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们都知道hadoop pig语句被转换成java mapreduce代码.我想知道有什么方法可以看到从 pig 语句生成的 mapreduce 代码?

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 ?

推荐答案

大家都知道hadoop pig语句转java mapreduce代码

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

事实并非如此.Hadoop Pig 语句不会转换为 Java MapReduce 代码.

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

更好的思考方式是在运行在 Java MapReduce 中的 Pig 解释器中解释"Pig 代码.可以这样想:Python 和 Perl 不会生成"C 代码,它们通过执行指令的 C 程序(解释器)运行.基本上,Pig 为要执行的查询计划提供了一个框架.Pig 代码被解释,一个预构建的解释器 MapReduce 作业执行它.因此,这是不可能的.

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.

如果您想了解更多正在发生的事情,请使用 EXPLAINILLUSTRATE 来深入了解 Pig 为执行您的代码而构建的查询计划.

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.

这篇关于哪里可以看到从 hadoop pig 语句生成的 mapreduce 代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆