【Hive】Hive启动时报错:Relative path in absolute URI: ${system:java.io.tmpdir}/${hive.session.id}resources

问题:Hive在启动时报错:

Logging initialized using configuration in file:/opt/module/hive/conf/hive-log4j2.properties Async: true
Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bhive.session.id%7D_resources
    at org.apache.hadoop.fs.Path.initialize(Path.java:259)
    at org.apache.hadoop.fs.Path.<init>(Path.java:217)
    at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:713)
    at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:627)
    at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:591)
    at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:747)
    at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:683)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.apache.hadoop.util.RunJar.run(RunJar.java:318)
    at org.apache.hadoop.util.RunJar.main(RunJar.java:232)
Caused by: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bhive.session.id%7D_resources
    at java.net.URI.checkPath(URI.java:1823)
    at java.net.URI.<init>(URI.java:745)
    at org.apache.hadoop.fs.Path.initialize(Path.java:256)
    ... 12 more

 报错原因:

        错误的原因是${system:java.io.tmpdir}/${hive.session.id}resources路径出现问题。

解决方法:

        修改hive-site.xml中的相关路径

具体步骤:

1.新建一个用于存放tmp的目录

        mkdir tmp

2.修改hive-site.xml文件 

        vim hive-site.xml

3.进入hive-site.xml文件之后,使用/搜索包含${system:java.io.tmpdir}的值

        /${system:java.io.tmpdir}

4.把搜索到的项中的value中的值全部替换为刚才创建的文件夹

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值