【Hive】——CLI客户端(bin/beeline,bin/hive)

1 HiveServer、HiveServer2

2 bin/hive 、bin/beeline 区别


3 bin/hive 客户端

hive-site.xml 配置远程 MateStore 地址

xml 复制代码
XML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
  <!-- 远程模式部署metastore 服务地址 -->
  <property>
    <name>hive.metastore.uris</name>
    <value>thrift://hadoop102:9083</value>
    <description>Thrift URI for the remote metastore. Used by metastore client to connect to remote
      metastore.</description>
  </property>
</configuration>

4 bin/beeline 客户端

官方文档

https://cwiki.apache.org/confluence/display/Hive/HiveServer2+Clients#HiveServer2Clients-Beeline–NewCommandLineShell

4.1 启动Hiveserver2服务

xml 复制代码
Shell
cd /opt/module/hive/bin
hive --service hiveserver2 &

4.2 连接beeline客户端

使用beeline客户端进行连接访问,需要注意hiveserver2服务启动之后需要稍等一会才可以对外提供服务。

Beeline 是JDBC客户端,同构JDBC歇息和Hiveserver2服务进行通信。协议地址是:jdbc:hive2://hadoop102:1000

相关推荐
大数据CLUB15 小时前
基于spark的奥运会奖牌变化数据分析
大数据·hadoop·数据分析·spark
Edingbrugh.南空15 小时前
Hadoop高可用集群搭建
大数据·hadoop·分布式
无级程序员1 天前
hive2服务启动报错:/tmp/hive on HDFS should be writable(不是chmod 777能解决的)
hive·hadoop·hdfs
rui锐rui2 天前
大数据学习2:HIve
大数据·hive·学习
凌辰揽月2 天前
Servlet学习
hive·学习·servlet
weixin_307779132 天前
Hive集群之间迁移的Linux Shell脚本
大数据·linux·hive·bash·迁移学习
王小王-1232 天前
基于Hadoop的公共自行车数据分布式存储和计算平台的设计与实现
大数据·hive·hadoop·分布式·hadoop公共自行车·共享单车大数据分析·hadoop共享单车
王小王-1232 天前
基于Hadoop的大规模文本词频统计分析系统设计与实现
hadoop·mapreduce·hadoop词频统计·hadoop文本统计·mapreduce词频统计
陈敬雷-充电了么-CEO兼CTO3 天前
推荐算法系统系列>推荐数据仓库集市的ETL数据处理
大数据·数据库·数据仓库·数据挖掘·数据分析·etl·推荐算法
桂成林3 天前
Hive UDF 开发实战:MD5 哈希函数实现
hive·hadoop·哈希算法