目录
一,需要一个类linux环境
安装使用编译工具Cygwin
--参考了 Cygwin安装教程_小白学CS的博客-优快云博客
二,hive源码获取
1,gith ub上拉 git地址
$ mkdir workspace
$ cd workspace
$ git clone https://github.com/apache/hive.git注意hive版本
2,官网获取src文件 Index of /hive
三,hive源码编译 官方编译指南
参考官方的开发指南(链接如上),但上面只写了hive2.x和hive1.x的具体命令,我的版本是hive3.x用官网获取src文件放在本地,尝试使用hive2.x的命令编译成功。
四,hive编译实例--hive编译具体步骤
1,编译整个hive 官方编译步骤
1.编译步骤
$ cd hive $ mvn clean package -Pdist [-DskipTests -Dmaven.javadoc.skip=true]
2.编译中遇到的问题
参考 hive3.1.3 on Sprak3.0.3 源码编译_JD926的博客-优快云博客
3.编译完成后查看
$ cd packaging/target/apache-hive-{version}-SNAPSHOT-bin/apache-hive-{version}-SNAPSHOT-bin
$ ls
LICENSE
NOTICE
README.txt
RELEASE_NOTES.txt
bin/ (all the shell scripts)
lib/ (required jar files)
conf/ (configuration files)
examples/ (sample input and query files)
hcatalog / (hcatalog installation)
scripts / (upgrade scripts for hive-metastore)
2,编译特定编码方式比如protobuf
1.需要安装ptotobufhttps://github.com/andrewkroh/gradle-protobuf-plugin/issues/13
2.去官网下载对应版本2.5.0 · Releases · protocolbuffers/protobuf · GitHub,写进环境变量
3.成功
该文详细介绍了如何在类Linux环境下编译Hive源码,包括从GitHub克隆项目,官网下载源文件,使用Cygwin模拟环境,以及遵循官方编译指南进行编译。在编译过程中,特别提到了针对Hive3.x版本的适应性调整和解决编译问题的方法,还涉及到protobuf的特定编译需求。
960

被折叠的 条评论
为什么被折叠?



