【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

相关推荐
5***790015 小时前
JavaScript生成器函数
hive·tidb·consul
顧棟1 天前
HDFS元数据与auditlog结合Hive元数据统计分析
hive·hadoop·hdfs
z***89711 天前
【分布式】Hadoop完全分布式的搭建(零基础)
大数据·hadoop·分布式
Kevinyu_1 天前
责任链模式
java·hadoop·责任链模式
yumgpkpm1 天前
腾讯云TBDS与CDH迁移常见问题有哪些?建议由CDH迁移到CMP 7.13 平台(类Cloudera CDP,如华为鲲鹏 ARM 版)
hive·hadoop·zookeeper·flink·spark·kafka·hbase
hexionly1 天前
数据仓库·架构,建模(二)
数据仓库
yumgpkpm3 天前
数据可视化AI、BI工具,开源适配 Cloudera CMP 7.3(或类 CDP 的 CMP 7.13 平台,如华为鲲鹏 ARM 版)值得推荐?
人工智能·hive·hadoop·信息可视化·kafka·开源·hbase
二进制_博客3 天前
使用datax将mysql数据抽取到hive分区表无数据
数据库·hive·mysql
干就完事了3 天前
Hive视图
数据仓库·hive·hadoop
Linux Huang3 天前
【Dinky】IDEA运行出现HistoryServer异常
java·hadoop·flink·intellij idea