Hive启动报错-which : no hbase in

EaShion1994 2016-07-28 02:52:40
Hive配置完成后启动报错(在未启动hadoop情况下执行hive命令也是一样)

下面是错误信息,希望大神能够帮忙解决。

——————————————————————————————————————

which: no hbase in (/opt/java/jdk1.8.0_101/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/hadoop/hadoop-2.6.4/bin:/opt/hadoop/hadoop-2.6.4/sbin:/root/bin:/opt/hive/apache-hive-2.1.0-bin/bin)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/opt/tuniu/hive/apache-hive-2.1.0-bin/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/opt/tuniu/hadoop/hadoop-2.6.4/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]

Logging initialized using configuration in jar:file:/opt/tuniu/hive/apache-hive-2.1.0-bin/lib/hive-common-2.1.0.jar!/hive-log4j2.properties Async: true
Exception in thread "main" java.lang.RuntimeException: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:578)
at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:518)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:705)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:641)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:226)
at org.apache.hadoop.hive.ql.metadata.Hive.<init>(Hive.java:366)
at org.apache.hadoop.hive.ql.metadata.Hive.create(Hive.java:310)
at org.apache.hadoop.hive.ql.metadata.Hive.getInternal(Hive.java:290)
at org.apache.hadoop.hive.ql.metadata.Hive.get(Hive.java:266)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:545)
... 9 more
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3593)
at org.apache.hadoop.hive.ql.metadata.Hive.reloadFunctions(Hive.java:236)
at org.apache.hadoop.hive.ql.metadata.Hive.registerAllFunctionsOnce(Hive.java:221)
... 14 more
Caused by: MetaException(message:Hive metastore database is not initialized. Please use schematool (e.g. ./schematool -initSchema -dbType ...) to create the schema. If needed, don't forget to include the option to auto-create the underlying database in your JDBC connection string (e.g. ?createDatabaseIfNotExist=true for mysql))
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3364)
at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:3336)
at org.apache.hadoop.hive.ql.metadata.Hive.getAllFunctions(Hive.java:3590)
... 16 more

—————————————————————————————————————————————
...全文
13561 9 打赏 收藏 转发到动态 举报
写回复
用AI写文章
9 条回复
切换为时间正序
请发表友善的回复…
发表回复
  • 打赏
  • 举报
回复 1
只是照做了??有没有安装hbase?
super耶耶 2019-05-08
  • 打赏
  • 举报
回复
引用 6 楼 Ricky__Zhang 的回复:
[size=14px]需要在/etc/profile中配置HBASE_HOME,[/size] 操作如下: 1. 打开文件 vim /etc/profile 2.加入如下配置: export HBASE_HOME=/opt/app/online/hbase-1.2.0-cdh5.8.3 export PATH=$HBASE_HOME/bin:$PATH 3.保存文件 4.应用新的配置source /etc/profile
我按照你的做了 怎么还是这种问题
Ricky__Zhang 2017-03-29
  • 打赏
  • 举报
回复
[size=14px]需要在/etc/profile中配置HBASE_HOME,[/size] 操作如下: 1. 打开文件 vim /etc/profile 2.加入如下配置: export HBASE_HOME=/opt/app/online/hbase-1.2.0-cdh5.8.3 export PATH=$HBASE_HOME/bin:$PATH 3.保存文件 4.应用新的配置source /etc/profile
dltigles 2017-03-16
  • 打赏
  • 举报
回复
请问解决了吗?
supertiezhu 2017-03-15
  • 打赏
  • 举报
回复
解决了吗??怎么解决的???
小林多喜N+1 2016-12-23
  • 打赏
  • 举报
回复
我也遇到这个问题,请问现在有答案了吗?
qq_33084379 2016-11-21
  • 打赏
  • 举报
回复
拷进去还是出现这个问题(求解在线等)
SucreLiu04 2016-08-31
  • 打赏
  • 举报
回复
这个应该是mysql的驱动没有拷贝到hive的lib目录下。 下载mysql的jar包mysql-connector-java-xxx.xxxx-bin.jar,放在hive安装目录lib下。 启动hadoop; 启动hive.
yuemingshikong 2021-07-06
  • 举报
回复
@SucreLiu04 考了的,还是这样

932

社区成员

发帖
与我相关
我的任务
社区描述
云计算 云存储相关讨论
社区管理员
  • 云存储
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧