先去hive官网下载源代码,我现在阅读hive2.1.0
官网: http://mirrors.cnnic.cn/apache/hive/
通过import maven工程后需要修改两个地方:
1、修改 .project
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>hive-exec</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name><span style="color:#ff0000;">org.eclipse.jdt.core.javabuilder</span></name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature><span style="color:#ff0000;">org.eclipse.jdt.core.javanature</span></nature>
</natures>
</projectDescription>
2、添加.classpath文件
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="output" path="bin"/>
</classpath>
然后去eclipse看,就是java工程了。因为hive代码刚开始是ant的,后来用maven