sparksql读取hive数据源配置
来源:互联网 发布:scrollreveal.js 使用 编辑:程序博客网 时间:2024/04/29 04:35
1、将hive-site.xml内容添加到spark conf配置文件中,内容仅需要元数据连接信息即可
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property>
<name>hive.metastore.uris</name>
<value>thrift://master-centos:9083</value>
<description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description>
</property>
</configuration>
并分发到各个节点中
2、如hive元数据采用的是mysql,则需将mysql-connector-java-5.1.25-bin.jar放置 spark/lib下
3、修改 spark-defaults.conf 配置文件
spark-default.conf
spark.master spark://192.168.130.140:7077
spark.driver.memory 512m
spark.executor.memory 512m
spark.eventLog.enabled true
spark.eventLog.dir hdfs://192.168.130.140:8020/user/spark/logs (需提前在hadoop上创建好该目录)
并分发到各个节点中
4、启动hive metastore 服务
5、如需通过jdbc方式连接spark,则启动spark thriftserver服务
start-thriftserver.sh --master spark://192.168.130.140:7077 --executor-memory 1g --total-executor-cores 2 --executor-cores 1 --hiveconf hive.server2.thrift.port=10050 --conf spark.dynamicAllocation.enabled=false
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property>
<name>hive.metastore.uris</name>
<value>thrift://master-centos:9083</value>
<description>Thrift URI for the remote metastore. Used by metastore client to connect to remote metastore.</description>
</property>
</configuration>
并分发到各个节点中
2、如hive元数据采用的是mysql,则需将mysql-connector-java-5.1.25-bin.jar放置 spark/lib下
3、修改 spark-defaults.conf 配置文件
spark-default.conf
spark.master spark://192.168.130.140:7077
spark.driver.memory 512m
spark.executor.memory 512m
spark.eventLog.enabled true
spark.eventLog.dir hdfs://192.168.130.140:8020/user/spark/logs (需提前在hadoop上创建好该目录)
并分发到各个节点中
4、启动hive metastore 服务
5、如需通过jdbc方式连接spark,则启动spark thriftserver服务
start-thriftserver.sh --master spark://192.168.130.140:7077 --executor-memory 1g --total-executor-cores 2 --executor-cores 1 --hiveconf hive.server2.thrift.port=10050 --conf spark.dynamicAllocation.enabled=false
阅读全文
0 0
- sparksql读取hive数据源配置
- SparkSQL配置(HIVE作为数据源)
- sparksql json,hive数据源
- SparkSQL读取数据源
- SparkSQL读取HBase数据,通过自定义外部数据源(hbase的Hive外关联表)
- SparkSQL读取Hive中的数据
- SparkSQL对hive数据源进行操作
- sparkSQL读取hive分区表的问题追踪
- 第69课:SparkSQL通过Hive数据源实战学习笔记
- SparkSQL on Hive配置与实战
- SparkSQL之数据源
- sparksql各种数据源
- SparkSQL的数据源
- sparksql与hive整合
- sparksql与hive整合
- sparksql on hive实践
- Hive和SparkSQL区别
- intergrate sparkSQL with hive
- ZOJ 3329 期望DP 解题报告
- VIM基本使用
- PHP解析Delphi 窗体文件
- ES6 —(Class 的继承)
- banner使用
- sparksql读取hive数据源配置
- flask——web表单
- 面试题:根据Unix时间戳计算时间
- 贪心——圆桌聚餐
- Hadoop环境搭建,以及mapreduce的使用
- java基本数据类型
- jQuery基础
- B
- Caffe实战Day3-准备网络结构文件和训练文件(重点)