hive执行方式

tech2022-08-05  127

1. hive

[root@linux01 /]# hive

本地连接--没有格式化

hive> show databases;

2. hive -command 

[root@linux01 /]# hive -e 'show databases;'

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

3. hiveserver2 &

[root@linux01 /]# hiveserver2 & [1] 11487 [root@linux01 /]# 2020-09-03 02:44:58: Starting HiveServer2

4. beeline

 [root@linux01 /]# beeline

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

set mapreduce.framework.name=local

mapreduce程序在本地运行,不提交Yarn

 

最新回复(0)