其他分享
首页 > 其他分享> > 启动Hive的两条指令,和测试hiveserver的一条指令

启动Hive的两条指令,和测试hiveserver的一条指令

作者:互联网

启动Hive

[root@hadoop hive-1.2.1]# hive --service metastore &
[1] 15831

[root@hadoop hive-1.2.1]# hive --service hiveserver2 &
[2] 16130

测试hiveserver2是否启动成功

[root@hadoop hive-1.2.1]# beeline -i ~/.hiverc -n root -u “jdbc:hive2://192.168.130.111:10000” -e “show databases;”

Connecting to jdbc:hive2://192.168.130.111:10000
Connected to: Apache Hive (version 1.2.1)
Driver: Hive JDBC (version 1.2.1)
Transaction isolation: TRANSACTION_REPEATABLE_READ
Running init script /root/.hiverc
/root/.hiverc (没有那个文件或目录)

OK
+----------------+--+
| database_name  |
+----------------+--+
| default        |
| zxy            |
+----------------+--+
2 rows selected (4.612 seconds)
Beeline version 1.2.1 by Apache Hive
Closing: 0: jdbc:hive2://192.168.130.111:10000

在这里插入图片描述

标签:hiverc,10000,1.2,hiveserver,hive,指令,Hive,root
来源: https://blog.csdn.net/m0_51197424/article/details/118727456