javapg
努力的小白
2019-04-23 09:26

hive启动 which: no hbase

5
  • 人工智能

hive安装完成后, 启动后包which: no hbase ,但是能创建数据库、能建表、能查询。hive 所连接舍数据库也多了一个hive库(元数据)。
1、网上都说在/hive/lib 目录下添加mysql-connector-java-5.1.47-bin.jar架包,我也添加了但并不起作用。
2、这里没有其他的error信息,我想请问一下hive的启动日志是在哪个目录下
3、想用beeline连接hive,是否需要安装habase

[root@devcrm ~]# hive
which: no hbase in (/usr/local/kafka/zookeeper-3.4.10/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/open/maven/rj/apache-maven-3.5.2/bin:/usr/local/java/bin:/usr/local/kafka/hadoop-2.7.6/bin:/usr/local/kafka/hadoop-2.7.6/sbin:/usr/local/kafka/hive/bin:/root/bin)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/local/kafka/hive/lib/log4j-slf4j-impl-2.6.2.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/local/kafka/hadoop-2.7.6/share/hadoop/common/lib/slf4j-log4j12-1.7.10.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:/usr/local/kafka/hive/lib/hive-common-2.3.0.jar!/hive-log4j2.properties Async: true
Hive-on-MR is deprecated in Hive 2 and may not be available in the future versions. Consider using a different execution engine (i.e. tez, spark) or using Hive 1.X releases.
hive> use myhive;
OK
Time taken: 3.439 seconds
hive> select * from student where name like '%小%;
OK
95014   王小丽   女 19  CS
95019   邢小丽   女 19  IS
95010   孔小涛   男 19  CS
95011   包小柏   男 18  MA
95014   王小丽   女 19  CS
95019   邢小丽   女 19  IS
95010   孔小涛   男 19  CS
95011   包小柏   男 18  MA
Time taken: 1.901 seconds, Fetched: 8 row(s)
hive> 

这是hive连接的mysql数据库
图片说明
hive/lib目录下添加的mysql驱动架包
图片说明

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐