【23.9.6】启动hive

太久没看hadoop,启动过程全忘了,重新整理成文字,方便下次直接使用。

直接版:

  1. 启动hadoop集群(node1操作)。web访问地址:node1:9870
cd /export/server/hadoop-3.3.0/sbin
start-all.sh
  1. 后台启动hive metastore服务,日志在文件夹下的 nohup.out 中
nohup /export/server/apache-hive-3.1.2-bin/bin/hive --service metastore &
  1. 后台启动hive hiveserver2 服务,日志在文件夹下的 nohup.out 中
nohup /export/server/apache-hive-3.1.2-bin/bin/hive --service hiveserver2 &
  1. 如果使用第一代客户端,下面在node3上面使用hive
 /export/server/apache-hive-3.1.2-bin/bin/hive
  1. 使用第二代客户端 beeline
 /export/server/apache-hive-3.1.2-bin/bin/beeline
 beeline> ! connect jdbc:hive2://node1:10000	# hive所运行的主机、端口
 Enter username for jdbc:hive2://node1:10000: root	# 输入root,下一步没有密码直接回车

  1. 常用hive sql
show databases;
show tables;

附:
hive客户端

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值