启动Hive报错

    

启动hive报错如下:

[hadoop@hadoop001 bin]$ hive

which: no hbase in (/home/hadoop/apps/hive/bin:/home/hadoop/apps/hadoop/bin:/home/hadoop/apps/hadoop/sbin:/usr/local/findbugs/bin:/usr/local/protobuf/bin:/usr/lo    cal/maven/bin:/usr/java/jdk1.7.0_80/bin:/usr/local/mysql/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/hadoop/bin)


Logging initialized using configuration in jar:file:/home/hadoop/apps/hive/lib/hive-common-1.1.0-cdh5.7.0.jar!/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:j    ava.io.tmpdir%7D/$%7Bsystem:user.name%7D
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:539)
        at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:687)
        at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:626)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
        at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
        at org.apache.hadoop.fs.Path.initialize(Path.java:206)
        at org.apache.hadoop.fs.Path.(Path.java:172)
        at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:582)
        at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:517)
        ... 8 more
Caused by: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
        at java.net.URI.checkPath(URI.java:1804)
        at java.net.URI.(URI.java:752)
        at org.apache.hadoop.fs.Path.initialize(Path.java:203)

        ... 11 more

 

措施:

解决方法:
在hive-site.xml中添加

   system:java.io.tmpdir

     hive家目录/新建目录

     

     system:user.name

     hive用户名

   

或者

在hive-site.xml文件中:

将所有"${system:java.io.tmpdir}/${system:user.name}"改成 "hive家目录/新建目录/hive用户名"

hive的日志文件就保存在"hive家目录/新建目录/hive用户名"这个目录下,叫做hive.log

 

个人推荐使用第一种方法

 

 

 若泽数据交流群:707635769 

【来自@若泽大数据】

 

你可能感兴趣的:(数据仓库Hive学习总结,hive,报错)