Hive网络接口的使用

该博客已经完全转移到http://sunhs.me

 

中并增加更多新的技术内容(hadoop为

 

 

主),欢迎访问!

 
1.hive-site.xml中增加配置
<property>
<name>hive.hwi.listen.host</name>
<value>0.0.0.0</value>
<description>this is the host address the hive web interface will listen on</description>
</property>
<property>
<name>hive.hwi.listen.port</name>
<value>9999</value>
<description>this is the port the Hive web interface will listen on</description>
</property>
<property>
<name>hive.hwi.war.file</name>
<value>/home/asheng/hive/hive-0.10.0/lib/hive-hwi-x.x.x.war</value>
<description>this is the war file with the jsp content for hive web interface</description>
</property>

 

2.开启服务

    hive --service hwi

    出现错误:

     FATAL hwi.HWIServer: HWI WAR file not found at /home/asheng/hive/hive-0.10.0/home/asheng/hive/hive-     0.10.0/lib/hive_hwi.war

    解决方法:

    配置文件hive-site.xml中要进行相应的修改(不用写绝对路径,相对路径即可):

<property>
<name>hive.hwi.war.file</name>
<value>lib/hive-hwi-0.10.0.war</value>
<description>this is the war file with the jsp content for hive web interface</description>
</property>

 

3.访问网络接口

浏览器访问http://IP:9999/hwi

点击Browse Schema就可以查看相应的数据库了,点击数据库名称查看数据库下所有表的信息,点击表名就可以查看表的具体信息

4.hive查询

    <1>创建一个session会话(ListSessions会列出所有的会话,hive重启后,所有的session丢失)

    <2>输入查询语句,点击查询即可

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值