java.net.URISyntaxException当开始蜂巢

时间:2021-05-15 16:55:17

I am new in HIVE. I have already set up hadoop and it works well, and I want to set up Hive. When I start hive , it shows an error as

我是新来的。我已经设置了hadoop,它运行良好,我想设置Hive。当我启动hive时,它显示出一个错误。

Caused by: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D

Are there any solutions?

有什么解决方案吗?

5 个解决方案

#1


34  

Put the following at the beginning of hive-site.xml

在hive-site.xml的开始处放置以下内容。

  <property>
    <name>system:java.io.tmpdir</name>
    <value>/tmp/hive/java</value>
  </property>
  <property>
    <name>system:user.name</name>
    <value>${user.name}</value>
  </property>

See also question

看到同样的问题

#2


13  

Change in hfs-site.xml this properties

hfs-site的变化。xml这个属性

<name>hive.exec.scratchdir</name>
<value>/tmp/hive-${user.name}</value>

 <name>hive.exec.local.scratchdir</name>
 <value>/tmp/${user.name}</value>

<name>hive.downloaded.resources.dir</name>
<value>/tmp/${user.name}_resources</value>

<name>hive.scratch.dir.permission</name>
    <value>733</value>

restart hive metastore and hiveserver2

重新启动蜂箱转移和hiveserver2。

#3


12  

I figure it out myself. In the hive-site.xml, replace ${system:java.io.tmpdir}/${system:user.name} by /tmp/mydir as what has been told in https://cwiki.apache.org/confluence/display/Hive/AdminManual+Configuration.

我自己搞清楚了。hive-site。在https://cwiki.apache.org/confluence/display/Hive/AdminManual+配置中,使用xml,替换${system:java.io.tmpdir}/${系统:user.name} // tmp/mydir。

#4


0  

I too have encountered the same error while starting HMaster for Hbase. this was corrected by specfying the path to directory on hdfs where you want to store hbase data in hbase.rootdir property of hbase-site.xml earlier i was using only relative path.

我也遇到了同样的错误,同时开始Hbase的Hbase。这是通过在hbase中存储hbase数据的hdfs上的路径来修正的。rootdir hbase-site的属性。之前我只使用相对路径。

path causing exception : hdfs://localhost:8020

引发异常的路径:hdfs://localhost:8020。

correct path : hdfs://localhost:8020/hbase

正确的路径:hdfs:/ / localhost:8020 / hbase

#5


-1  

add property in hive-site.xml

在hive-site.xml添加属性

<configuration>
<property>
  <name>hive.metastore.schema.verification</name>
  <value>false</value>
  <description>Will remove your error occurring because of metastore_db in shark</description>
</property>
</configuration>

add java and hadoop path in hive-env.sh according to your system.

在hive-env中添加java和hadoop路径。根据你的系统。

# Set HADOOP_HOME to point to a specific hadoop install directory
export HADOOP_HOME=/home/user17/BigData/hadoop

#hive 
export HIVE_HOME=/home/user17/BigData/hive

# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR=$HIVE_HOME/conf

and also set hive and hadoop path in .bashrc

并在.bashrc中设置hive和hadoop路径。

export JAVA_HOME=/home/user17/jdk
export PATH=$PATH:$JAVA_HOME/bin

export HADOOP_INSTALL=/home/user17/BigData/hadoop
export PATH=$PATH:$HADOOP_INSTALL/bin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL

export HIVE_INSTALL=/home/user17/BigData/hive
export PATH=$PATH:$HIVE_INSTALL/bin

Note-- this all files path are set according to my system , you should give path according to your system. let me know if not work

注意——所有的文件路径都是根据我的系统设置的,你应该根据你的系统给出路径。如果不行,请告诉我。

#1


34  

Put the following at the beginning of hive-site.xml

在hive-site.xml的开始处放置以下内容。

  <property>
    <name>system:java.io.tmpdir</name>
    <value>/tmp/hive/java</value>
  </property>
  <property>
    <name>system:user.name</name>
    <value>${user.name}</value>
  </property>

See also question

看到同样的问题

#2


13  

Change in hfs-site.xml this properties

hfs-site的变化。xml这个属性

<name>hive.exec.scratchdir</name>
<value>/tmp/hive-${user.name}</value>

 <name>hive.exec.local.scratchdir</name>
 <value>/tmp/${user.name}</value>

<name>hive.downloaded.resources.dir</name>
<value>/tmp/${user.name}_resources</value>

<name>hive.scratch.dir.permission</name>
    <value>733</value>

restart hive metastore and hiveserver2

重新启动蜂箱转移和hiveserver2。

#3


12  

I figure it out myself. In the hive-site.xml, replace ${system:java.io.tmpdir}/${system:user.name} by /tmp/mydir as what has been told in https://cwiki.apache.org/confluence/display/Hive/AdminManual+Configuration.

我自己搞清楚了。hive-site。在https://cwiki.apache.org/confluence/display/Hive/AdminManual+配置中,使用xml,替换${system:java.io.tmpdir}/${系统:user.name} // tmp/mydir。

#4


0  

I too have encountered the same error while starting HMaster for Hbase. this was corrected by specfying the path to directory on hdfs where you want to store hbase data in hbase.rootdir property of hbase-site.xml earlier i was using only relative path.

我也遇到了同样的错误,同时开始Hbase的Hbase。这是通过在hbase中存储hbase数据的hdfs上的路径来修正的。rootdir hbase-site的属性。之前我只使用相对路径。

path causing exception : hdfs://localhost:8020

引发异常的路径:hdfs://localhost:8020。

correct path : hdfs://localhost:8020/hbase

正确的路径:hdfs:/ / localhost:8020 / hbase

#5


-1  

add property in hive-site.xml

在hive-site.xml添加属性

<configuration>
<property>
  <name>hive.metastore.schema.verification</name>
  <value>false</value>
  <description>Will remove your error occurring because of metastore_db in shark</description>
</property>
</configuration>

add java and hadoop path in hive-env.sh according to your system.

在hive-env中添加java和hadoop路径。根据你的系统。

# Set HADOOP_HOME to point to a specific hadoop install directory
export HADOOP_HOME=/home/user17/BigData/hadoop

#hive 
export HIVE_HOME=/home/user17/BigData/hive

# Hive Configuration Directory can be controlled by:
export HIVE_CONF_DIR=$HIVE_HOME/conf

and also set hive and hadoop path in .bashrc

并在.bashrc中设置hive和hadoop路径。

export JAVA_HOME=/home/user17/jdk
export PATH=$PATH:$JAVA_HOME/bin

export HADOOP_INSTALL=/home/user17/BigData/hadoop
export PATH=$PATH:$HADOOP_INSTALL/bin
export HADOOP_MAPRED_HOME=$HADOOP_INSTALL
export HADOOP_COMMON_HOME=$HADOOP_INSTALL
export HADOOP_HDFS_HOME=$HADOOP_INSTALL
export YARN_HOME=$HADOOP_INSTALL

export HIVE_INSTALL=/home/user17/BigData/hive
export PATH=$PATH:$HIVE_INSTALL/bin

Note-- this all files path are set according to my system , you should give path according to your system. let me know if not work

注意——所有的文件路径都是根据我的系统设置的,你应该根据你的系统给出路径。如果不行,请告诉我。