hive图形界面hwi启动及异常 Ant could not find the task or a class this task relies upon.

本文详细介绍了Hive Web Interface (HWI) 的部署步骤,包括从Apache官网下载源码、打包war文件、配置hive-site.xml等,并分享了在Windows浏览器中启动Hive时遇到的异常及其解决方案。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

一. hwi即 HiveWebInterface,在启动前,先要配置好相应的war包。

1. 在apache官网下载好对应Hive版本的源码文件

2. 解压此压缩文件,在hwi目录下找到web文件夹。

3. 将这个web文件夹打包为war包,执行命令:jar cvfM0 hive-hwi-2.1.1.war -C web/ .

4. 将此war包传到Linux中Hive目录下的lib文件夹中。

5. 修改配置文件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>lib/hive-hwi-2.1.1.war</value>
</property>

 

二、网页启动Hive时的异常及解决

1. 在windows的浏览器中启动localhost:9000/hwi/发现以下异常:

The following error occurred while executing this line: jar:file:/home/linux/application/hive2.1.1/lib/ant-1.9.1.jar!/org/apache/tools/ant/antlib.xml:37: Could not create task or type of type: componentdef.

Ant could not find the task or a class this task relies upon.

2. 异常解决:经过多次摸索,发现了以下解决方案,亲测有效。

下载1.10.5版本的ant,将lib中的ant.jar文件重命名为ant.1.10.5.jar并移动到hive的lib目录下,执行chmod 777 ant.1.10.5.jar. 重新执行hive --service hwi 即可。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值