hive3.1.2版本在启动hive时出现Exception in thread “main“ java.lang.IllegalArgumentException: java.net.URISynt

hive3.1.2版本在启动hive时出现Exception in thread “main“ java.lang.IllegalArgumentException: java.net.URISynt,第1张

项目场景:

在进行安装hive3.1.2版本时,使用命令进入hive时。


问题描述

出现Exception in thread “main” java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: KaTeX parse error: Expected '}', got 'EOF' at end of input: …a.io.tmpdir%7D/%7Bsystem:user.name%7D的报错提示。

如图所示


原因分析:

因为hive-site.xml里面的临时文件存储路径设置有问题。


解决方案:

把hive-site.xml 中所有包含 ${system:Java.io.tmpdir}替换成/usr/local/hive/iotmp.

    代码:
    :%s#${system:java.io.tmpdir}#usr/local/hive/iotemp#g

如果系统默认没有指定系统用户名,那么要把配置${system:user.name}替换成当前用户名root

    代码:
    :%s/${system:user.name}/root/g

新建目录并进行权限赋值

先启动hdfs

    [root@qianfeng01 hive] # hdfs dfs -mkdir -p /user/hive/warehouse 
    [root@qianfeng01 hive] # hdfs dfs -mkdir -p /tmp/hive/ 
    [root@qianfeng01 hive] # hdfs dfs -chmod 750 /user/hive/warehouse 
    [root@qianfeng01 hive] # hdfs dfs -chmod 777 /tmp/hive

然后再重新进入hive,就可以成功了

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/737356.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-28
下一篇 2022-04-28

发表评论

登录后才能评论

评论列表(0条)

保存