1.启动hadoop集群
[hadoop@master ~]$ start-all.sh
2.启动元数据metastore
[hadoop@master ~]$ hive --service metastore
Starting Hive Metastore Server
18/12/19 14:48:55 WARN conf.HiveConf: HiveConf of name hive.archive.har.parentdir.settable does not exist
3.启动HiveServer驱动服务
[hadoop@master ~]$ hive --service hiveserver2
18/12/19 16:05:43 WARN conf.HiveConf: HiveConf of name hive.archive.har.parentdir.settable does not exist
4.在IDE(eclipse)中创建Hive工程
1)根据所安装的hive版本,导入eclipse内jdbc hive 相关jar包。可以从hive安装目录下的lib导入eclipse;最后三个在hive的lib中没有找到;需要单独从网上下载下来导入eclipse。有个网站https://www.mvnjar.com/相当好用,很多jar包都能在上面找到并免费下载下来。
hive-jdbc-1.2.2.jar
commons-logging-1.2.2.jar
hive-exec-1.2.2.jar
hive-metastore-1.2.2.jar
hive-service-1.2.2.jar
libfb303-0.9.2.jar
log4j-1.2.16.jar
httpclient-4.4.jar
httpcore-4.4.jar
hadoop-common-1.2.2.jar
slf4j-api-1.6.1.jar
slf4j-nop-1.6.1.jar
2)将收集好的jar包导入eclipse。这里就不多说,可以按照