简体   繁体   English

如何获取Hive编译器生成的MapReduce Jobs源代码?

[英]How can I get the MapReduce Jobs source codes generated by the Hive compiler?

I'd like to know what is the code generated by the compiler of SQL Hive ( ie if I execute one sql sentence I'd like to see the code of MapReduce jobs generated by compiler of SQL hive). 我想知道SQL Hive编译器生成的代码是什么(即如果我执行一个sql语句,我想看看SQL hive编译器生成的MapReduce作业代码)。

How can I get it? 我怎么才能得到它?

For Hive, it serializes the physical plan into an xml file (page 15 in http://www.slideshare.net/nzhang/hive-anatomy ). 对于Hive,它将物理计划序列化为xml文件( http://www.slideshare.net/nzhang/hive-anatomy中的第15页)。 So, I do not think that users can get the real source codes for hadoop. 所以,我不认为用户可以获得hadoop的真实源代码。 To get the code, you can try YSmart ( http://ysmart.cse.ohio-state.edu/ ). 要获取代码,您可以尝试YSmart( http://ysmart.cse.ohio-state.edu/ )。 It is a translator that will translate your sql queries to the java source code for hadoop. 它是一个翻译器,将您的SQL查询转换为hadoop的java源代码。 You can use the online version of the YSmart. 您可以使用YSmart的在线版本。 Just submit the schema and your query, you will be able to view and download the java code. 只需提交架构和查询,您就可以查看和下载Java代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM