【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

相关推荐
wzy06231 小时前
基于 Hadoop 生态圈的数据仓库实践 —— OLAP 与数据可视化(三)
hadoop·impala
大数据狂人2 小时前
深入剖析 StarRocks 与 Hive 的区别、使用场景及协同方案实践
大数据·starrocks·hive·数仓
wzy06235 小时前
基于 Hadoop 生态圈的数据仓库实践 —— OLAP 与数据可视化(二)
hive·hadoop·impala·sparksql
wzy06236 小时前
基于 Hadoop 生态圈的数据仓库实践 —— OLAP 与数据可视化(一)
hadoop·impala
wzy062311 小时前
基于 Hadoop 生态圈的数据仓库实践 —— OLAP 与数据可视化(六)
hadoop·hue
陆水A1 天前
数仓主题域划分
大数据·数据仓库·数据库开发·etl·etl工程师
喻师傅1 天前
Spark SQL 数组函数合集:array_agg、array_contains、array_sort…详解
大数据·hadoop·分布式·sql·spark
随心............1 天前
hive专题面试总结
数据仓库·hive
isNotNullX1 天前
主数据管理系统能代替数据中台吗?
大数据·数据仓库·人工智能·数据分析·etl
LiRuiJie2 天前
基于Hadoop3.3.4+Flink1.17.0+FlinkCDC3.0.0+Iceberg1.5.0整合,实现数仓实时同步mysql数据
大数据·hadoop·flink·iceberg·flinkcdc