hive> show databases;
FAILED: HiveException java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.ql.me
解决方法(启动hive元数据库)
[student@hadoop102 hive-3.1.2]$ cd bin/
[student@hadoop102 bin]$ nohup hive --service metastore &
[1] 4215
[student@hadoop102 bin]$ 2022-04-20 09:54:15: Starting Hive Metastore Server
重启hive
[student@hadoop102 hive-3.1.2]$ bin/hive
which: no hbase in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/module/jdk1.8.0_212/bin:/opt/module/hadoop-3.1.3/bin:/opt/module/hadoop-3.1.3/sbin:/opt/module/hive-3.1.2/bin:/home/atguigu/.local/bin:/home/atguigu/bin)
Hive Session ID = d7cda0ab-8e02-44a0-bbfb-a8c4e8b72405
Logging initialized using configuration in jar:file:/opt/module/hive-3.1.2/lib/hive-common-3.1.2.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. spark, tez) or using Hive 1.X releases.
Hive Session ID = 307f59bb-27c6-4a9a-9aae-0bc718138935
hive> show databases;
OK
default
Time taken: 0.472 seconds, Fetched: 1 row(s)