Hive 执行sql命令报错

Failed with exception java.io.IOException:java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:user.name%7D

  执行 show tables;出现上面的错误。

  错误原因修改 hive-site.xml 文件中的配置出现问题。

  

# 编辑文件
vi hive-site.xml

# 找到 hive.exec.local.scratchdir 配置,注意是 local

<property>
    <name>hive.exec.local.scratchdir</name>
    <value>/home/hive/apache-hive-1.2.2-bin/tmp/${system:user.name}</value>
    <description>Local scratch space for Hive jobs</description>
</property>

# 将上面的代码改成
<property>
    <name>hive.exec.local.scratchdir</name>
    <value>/home/hive/apache-hive-1.2.2-bin/tmp/${user.name}</value>
    <description>Local scratch space for Hive jobs</description>
</property>

# 其实是把 system 去掉就行了。

  

原文地址:https://www.cnblogs.com/hanwen1014/p/10997262.html