hive执行方式

1. hive

[[email protected] /]# hive

本地连接--没有格式化

hive> show databases;

hive执行方式 

2. hive -command 

[[email protected] /]# hive -e 'show databases;'

hive后跟命令和语句---适合写shell脚本

3. hiveserver2 &

[[email protected] /]# hiveserver2 &
[1] 11487
[[email protected] /]# 2020-09-03 02:44:58: Starting HiveServer2

4. beeline

 [[email protected] /]# beeline

beeline> !connect jdbc:hive2://linux01:10000

hive执行方式