部署hive本地模式遇到的问题

部署hive本地模式遇到的问题
1、元数据没有初始化
解决方法

schematool -dbType mysql -initSchema(此时使用的数据库是MySQL)

2、hive启动时报错
Exception in thread "main" Java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D at org.apache.Hadoop.hive.ql.session.SessionState.start(SessionState.java:444) at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:672) at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:616) 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.main(RunJar.java:160) 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:148) at org.apache.hadoop.fs.Path.<init>(Path.java:126) at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:487) at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:430)
解决方法:

配置hive-site.xml
#如下命令将"${system:Java.io.tmpdir}"字段全部替换成"/hive/tmp"
sed -i 's#${system:Java.io.tmpdir}#/hive/tmp#g' hive-site.xml

3、hive中 “show databases;” 时出错

部署hive本地模式遇到的问题

暂时还没解决!!!

上一篇:11.30


下一篇:关于多台机器之前session共享,sessionState mode="StateServer" 问题的困扰