【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

相关推荐
尘世壹俗人3 小时前
hadoop.proxyuser.代理用户.授信域 用来干什么的
大数据·hadoop·分布式
2401_cf11 小时前
为什么hadoop不用Java的序列化?
java·hadoop·eclipse
钊兵18 小时前
hivesql是什么数据库?
大数据·hive
RestCloud18 小时前
产品更新丨谷云科技 iPaaS 集成平台 V7.5 版本发布
数据仓库·系统安全·api·数字化转型·ipaas·数据集成平台·集成平台
RestCloud19 小时前
数据清洗(ETL/ELT)原理与工具选择指南:企业数字化转型的核心引擎
数据仓库·数据安全·etl·数据集成·elt·集成平台
wingaso20 小时前
[经验总结]删除gitlab仓库分支报错:错误:无法推送一些引用到“http:”
linux·数据仓库·git
线条11 天前
MapReduce Shuffle 全解析:从 Map 端到 Reduce 端的核心数据流
大数据·hadoop·mapreduce
火龙谷2 天前
【hadoop】Kafka 安装部署
大数据·hadoop·kafka
火龙谷2 天前
【hadoop】Flume的相关介绍
大数据·hadoop·flume
RestCloud2 天前
企业对数据集成工具的需求及 ETL 工具工作原理详解
数据仓库·系统安全·etl·数字化转型·数据集成平台·集成平台