其他分享
首页 > 其他分享> > 部署hive本地模式遇到的问题

部署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;” 时出错

在这里插入图片描述

暂时还没解决!!!

标签:java,部署,hadoop,hive,本地,SessionState,apache,org
来源: https://blog.csdn.net/weixin_56181697/article/details/121307182