Spark SQL CLI 的配置和使用

关键字:【spark-sql 配置 HDFS 、spark sql cli 配置 HDFS、spark-sql 保存数据到 HDFS】

友情链接:

环境搭建-Spark on YARN

Hive 安装 以及使用

Hadoop 介绍及集群搭建

Hive 的SQL基本操作

使用说明

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>
      
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值