简体   繁体   English

配置单元添加文件/ jar说不存在

[英]Hive add file/jar says does not exist

So I wanted to try custom mapper reducer queries using Hive MAP and REDUCE. 所以我想尝试使用Hive MAP和REDUCE的自定义mapper reducer查询。

I have written and exported the custom mapper and reducer to jar file and tried adding it from Hive CLI. 我已经将自定义映射器和reducer写入并导出到jar文件,并尝试从Hive CLI添加它。 I am getting does "not exist" error no matter where I am copying the jar. 无论我在哪里复制jar,我都会得到“不存在”错误。 I tried the following. 我尝试了以下方法。

I copied the file to /usr/local/hive/lib/ , /usr/local/hive/conf/ and /tmp/ then in hdfs also I copied it to / , /user/hive/ and /user/hive/warehouse/ 我将文件复制到/ usr / local / hive / lib /,/ usr / local / hive / conf /和/ tmp /中,然后在hdfs中也将其复制到/,/ user / hive /和/ user / hive / warehouse /

I tried giving the full path then I am getting URL syntax exception 我试图给出完整的路径,然后我得到URL语法异常

hive> add jar 'hdfs://srimanthpc:9000/SpaceTravel.jar';
Illegal character in scheme name at index 0: 'hdfs://srimanthpc:9000/SpaceTravel.jar'
Query returned non-zero code: 1, cause: java.net.URISyntaxException: Illegal character in scheme name at index 0: 'hdfs://srimanthpc:9000/SpaceTravel.jar'

hive> add jar 'file:///home/anil/Desktop/SpaceTravel.jar';
Illegal character in scheme name at index 0: 'file:///home/anil/Desktop/SpaceTravel.jar'
Query returned non-zero code: 1, cause: java.net.URISyntaxException: Illegal character in scheme name at index 0: 'file:///home/anil/Desktop/SpaceTravel.jar'

If I give the path without any schema it says it does not exist. 如果我给出的路径没有任何模式,则表示该路径不存在。 I tried add file instead of add jar also. 我尝试添加文件而不是也添加jar

My hive-site.xml has hive.aux.jars.path set to /usr/local/hive/lib/. 我的hive-site.xml将hive.aux.jars.path设置为/ usr / local / hive / lib /。 I tried changing this to file:/// hdfs://localhost:9000/ but no change :( 我试图将其更改为file:/// hdfs:// localhost:9000 /但没有任何改变:(

All the online documentation says ADD JAR|FILE filepath . 所有在线文档都说ADD JAR | FILE filepath but nobody is mentioning what the that path. 但是没有人提到那条路。 :( :(

I have been stuck here since past 4 hours please help me. 过去四个小时以来,我一直被困在这里,请帮助我。 What am I missing? 我想念什么?

Additional info : My .bashrc 附加信息:我的.bashrc

export HIVE_HOME=/usr/local/hive
export PATH=$PATH:$HIVE_HOME/bin
export CLASSPATH=$CLASSPATH:/usr/local/Hadoop/lib/*:.
export CLASSPATH=$CLASSPATH:/usr/local/hive/lib/*:.

remove ' from your query 从查询中删除'

hive> add jar hdfs://srimanthpc:9000/SpaceTravel.jar;

in case, master is on localhost 万一主人在本地主机上

hive> add jar hdfs://localhost:9000/SpaceTravel.jar;

make sure SpaceTravel.jar should be in hdfs. 确保SpaceTravel.jar应该在hdfs中。

by using command 通过使用命令

hdfs dfs -ls /

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM