Spark SQL CLI 的配置和使用
关键字:【spark-sql 配置 HDFS 、spark sql cli 配置 HDFS、spark-sql 保存数据到 HDFS】
友情链接:
使用说明
Distributed SQL Engine - Spark 2.4.5 Documentation (apache.org)
The Spark SQL CLI is a convenient tool to run the Hive metastore service in local mode and execute queries input from the command line. Note that the Spark SQL CLI cannot talk to the Thrift JDBC server.
( Spark SQL CLI 客户端工具运行在本地,通过查询 Hive 的元数据来执行命令行。注意:Thrift JDBC server 是无法和 Spark SQL CLI 通信的 )
Spark SQL CLI 读取和存储数据在本地
① 环境准备
确保你已经搭建了 Hive 并且已经启动了 Hive Metastore 服务
② 准备 hive-site.xml 配置文件
Spark 连接 Hive Metastore 服务需要 hive-site.xml 配置文件,需要将 $HIVE_HOME/conf/hive-site.xml 配置文件发送到集群中所有 $SPARK_HOME/conf 配置目录下
hive-site.xml 文件示例
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>root</value>
</property>
<property>

最低0.47元/天 解锁文章
3685

被折叠的 条评论
为什么被折叠?



