Hadoop中hive的使用

发布时间 2023-07-11 10:16:12作者: 万事胜意k

启动元数据管理服务(必须启动,否则无法工作)

前台启动:bin/hive --service metastore 
后台启动:nohup bin/hive --service metastore >> logs/metastore.log 2>&1 &

 启动客户端

Hive Shell方式(可以直接写SQL): 

bin/hive

Hive ThriftServer方式(不可直接写SQL,需要外部客户端链接使用):  

#先启动metastore服务 然后启动hiveserver2服务
nohup bin/hive --service metastore >> logs/metastore.log 2>&1 &
nohup bin/hive --service hiveserver2 >> logs/hiveserver2.log 2>&1 &

 连接DataGrip: