软件版本:
hive1.2.1 ,eclipse4.5,maven3.2 ,JDK1.7
软件准备:
hive:
环境准备:
(1). 安装好的hadoop集群(伪分布式亦可);
(2) linux 下maven环境;(这里需要说下,maven编译hive,在windows下是不通的,因为里面需要bash的支持,所以直接使用linux编译hive就好)
0. 编译前,建议把maven的local_reposity 配置下,同时配置源如下(开源中国的maven源,相对国外的源较快):
<mirror>
<id>nexus-osc</id>
<mirrorOf>central</mirrorOf>
<name>Nexus osc</name>
<url>http://maven.oschina.net/content/groups/public/</url>
</mirror>
<mirror>
<id>nexus-osc-thirdparty</id>
<mirrorOf>thirdparty</mirrorOf>
<name>Nexus osc thirdparty</name>
<url>http://maven.oschina.net/content/repositories/thirdparty/</url>
</mirror>
1. 编译Hive,下载hive1.2.1的源码,并解压到linux某目录,按照下面的命令进行编译(进入hive源码解压后路径):
(1)mvn clean install -DskipTests -Phadoop-2
[INFO] Reactor Summary:
[INFO]
[INFO] Hive ............................................... SUCCESS [ 4.457 s]
[INFO] Hive Shims Common .................................. SUCCESS [ 5.047 s]
[INFO] Hive Shims 0.20S ................................... SUCCESS [ 2.017 s]
[INFO] Hive Shims 0.23 .................................... SUCCESS [ 7.157 s]
[INFO] Hive Shims Scheduler ............................... SUCCESS [ 1.796 s]
[INFO] Hive Shims ......................................... SUCCESS [ 1.674 s]
[INFO] Hive Common ........................................ SUCCESS [ 5.711 s]
[INFO] Hive Serde ......................................... SUCCESS [ 7.577 s]
[INFO] Hive Metastore ..................................... SUCCESS [ 18.044 s]
[INFO] Hive Ant Utilities ................................. SUCCESS [ 1.373 s]
[INFO] Spark Remote Client ................................ SUCCESS [ 10.962 s]
[INFO] Hive Query Language ................................ SUCCESS [05:12 min]
[INFO] Hive Service ....................................... SUCCESS [ 42.408 s]
[INFO] Hive Accumulo Handler .............................. SUCCESS [01:40 min]
[INFO] Hive JDBC .......................................... SUCCESS [ 9.021 s]
[INFO] Hive Beeline ....................................... SUCCESS [ 12.194 s]
[INFO] Hive CLI ........................................... SUCCESS [ 12.576 s]
[INFO] Hive Contrib ....................................... SUCCESS [ 3.031 s]
[INFO] Hive HBase Handler ................................. SUCCESS [01:54 min]
[INFO] Hive HCatalog ...................................... SUCCESS [ 28.797 s]
[INFO] Hive HCatalog Core ................................. SUCCESS [ 5.609 s]
[INFO] Hive HCatalog Pi