如何在配置单元中添加jar文件 [英] how to add a jar file in hive
问题描述
我正在尝试使用 ADD JAR hive-contrib-0.10.0.jar 命令在hive中添加hive-contrib-0.10.0.jar,但它总是说hive-contrib-0.10。 0.jar不存在。
I'm trying to add hive-contrib-0.10.0.jar in hive using ADD JAR hive-contrib-0.10.0.jar command but it always saying hive-contrib-0.10.0.jar does not exist.
我现在正在使用HDP 2.1版本。我还使用hue将此jar文件添加到 / user / root
文件夹中并运行命令
I'm using HDP 2.1 version right now. I also added this jar file into /user/root
folder using hue and run the command
ADD JAR hdfs:///hive-contrib-0.10.0.jar
但它给了我同样的错误 jar文件不存在
。
but it giving me same error jar file doesn't exist
.
有没有办法解决这个问题。
我应该保留这个jar文件以便它能成功运行以及要使用的命令是什么?
Is there any way to solve this problem. Where should I keep this jar file so that it will run successfully and what will be the command to be used?
推荐答案
- 将JAR文件上传到hdfs路径
- 使用添加命令和HDFS完整路径添加JAR文件
示例:
hadoop fs -put ~/Downloads/hive.jar /lib/
打开配置单元
add jar hdfs:///lib/hive.jar
这篇关于如何在配置单元中添加jar文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!