欢迎投稿

今日深度:

hive jdbc,

hive jdbc,


登陆hive所在机器(172.2.2.12)启动Starting Hive Thrift Server


命令:bin/hive --service hiveserver -p 10001,hive --service hiveserver2 --hiveconf hive.server2.thrift.port=10001


-p指定Thrift Thrift 端口,若不指定默认为10000


也可以将Hive Thrift Server放在后台执行:bin/hive --service hiveserver -p 10001 &


查看端口信息:netstat -anp | grep '10001'


可以看到端口被监听了。


然后写jdbc连接程序,网上一抓一大把,我就不赘述了。


需要的最少jar包:


commons-collections-3.2.1.jar


commons-logging-1.1.1.jar


hadoop-common-2.3.0.jar


hive-exec-0.12.0.jar


hive-jdbc-0.12.0.jar


hive-metastore-0.12.0.jar


hive-service-0.12.0.jar


libfb303-0.9.0.jar


slf4j-api-1.6.1.jar


然后打包运行ok

www.htsjk.Com true http://www.htsjk.com/hive/40020.html NewsArticle hive jdbc, 登陆hive所在机器(172.2.2.12)启动Starting Hive Thrift Server 命令:bin/hive --service hiveserver -p 10001, hive --service hive server2  --hiveconf hive. server2 .thrift.port=10001 -p指定Thrift Thrift 端口,若...
相关文章
    暂无相关文章
评论暂时关闭