本文介绍了如何获取 Hive 编译器生成的 MapReduce Jobs 源代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道 SQL Hive 的编译器生成的代码是什么(即如果我执行一个sql语句我想看看SQL hive的编译器生成的MapReduce作业的代码.

I'd like to know what is the code generated by the compiler of SQL Hive ( i.e. if I execute one sql sentence I'd like to see the code of MapReduce jobs generated by compiler of SQL hive).

我怎样才能得到它?

推荐答案

对于 Hive,它将物理计划序列化为 xml 文件(http://www.slideshare.net/nzhang/hive-anatomy).所以,我认为用户无法获得 hadoop 的真正源代码.要获取代码,您可以尝试 YSmart (http://ysmart.cse.ohio-state.edu/).它是一个翻译器,可以将您的 sql 查询翻译成 hadoop 的 java 源代码.您可以使用 YSmart 的在线版本.只需提交架构和您的查询,您就可以查看和下载 Java 代码.

For Hive, it serializes the physical plan into an xml file (page 15 in http://www.slideshare.net/nzhang/hive-anatomy). So, I do not think that users can get the real source codes for hadoop. To get the code, you can try YSmart (http://ysmart.cse.ohio-state.edu/). It is a translator that will translate your sql queries to the java source code for hadoop. You can use the online version of the YSmart. Just submit the schema and your query, you will be able to view and download the java code.

这篇关于如何获取 Hive 编译器生成的 MapReduce Jobs 源代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-25 15:53