Exception in thread "main" java.lang.IllegalArgumentException: java.net.URISynt occurs when hive3.1.2 version starts hive

Project scenario:

When installing hive3.1.2 version, use the command to enter hive.


Problem Description

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 error message.

as the picture shows
Insert image description here


Cause Analysis:

Because there is a problem with the temporary file storage path setting in hive-site.xml.


solution:

Replace all entries in hive-site.xml containing ${system:Java.io.tmpdir} with /usr/local/hive/iotmp.

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

If the system does not specify a system user name by default, then the configuration ${system:user.name} must be replaced with the current user name root.

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

Create a new directory and assign permissions

Start hdfs first

    [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

Then re-enter hive and you will be successful.
Insert image description here

Guess you like

Origin blog.csdn.net/qq_45263520/article/details/124374650