大数据全系列 教程
1869个小节阅读:467.8k
目录
408考研
JAVA全系列 教程
面向对象的程序设计语言
Python全系列 教程
Python3.x版本,未来主流的版本
人工智能 教程
顺势而为,AI创新未来
大厂算法 教程
算法,程序员自我提升必经之路
C++ 教程
一门通用计算机编程语言
微服务 教程
目前业界流行的框架组合
web前端全系列 教程
通向WEB技术世界的钥匙
大数据全系列 教程
站在云端操控万千数据
AIGC全能工具班
A A
White Night
具体配置步骤:
xxxxxxxxxx
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>
<!-- 让Spark知道表的数据存放在位置 -->
<property>
<name>hive.metastore.warehouse.dir</name>
<value>/user/hive_remote/warehouse</value>
</property>
<!--让Spark知道hive服务器端连接地址 -->
<property>
<name>hive.metastore.uris</name>
<value>thrift://node3:9083</value>
</property>
</configuration>
或者修改node4上的hive-site.xml
原内容:
xxxxxxxxxx
<property>
<name>metastore.thrift.uris</name>
<value>thrift://node3:9083</value>
</property>
修改后:
xxxxxxxxxx
<property>
<name>hive.metastore.uris</name>
<value>thrift://node3:9083</value>
</property>
从node4拷贝到node2上
xxxxxxxxxx
[root@node4 conf]# pwd
/opt/hive-3.1.2/conf
[root@node4 conf]# scp hive-site.xml node2:/opt/spark-3.2.1/conf
[root@node4 conf]# scp hive-site.xml node1:/opt/spark-3.2.1/conf
[root@node4 conf]# scp hive-site.xml node3:/opt/spark-3.2.1/conf
将core-site.xml
和 hdfs-site.xml
拷贝到 Spark的conf目录中
xxxxxxxxxx
[root@node2 conf]# cd /opt/hadoop-3.1.3/etc/hadoop/
[root@node2 hadoop]# cp core-site.xml hdfs-site.xml /opt/spark-3.2.1/conf/
将mysql的驱动jar包上传到node2的SPARK_HOME/jars文件夹下
如果node1和node3上也想作为Spark提交作业的客户端,需要将1-3在node3上也执行一遍,或者将对应文件scp到node1和node3上
启动hadoop集群,在node1上执行startha.sh
node3上启动Hive的MetaStore服务
xxxxxxxxxx
nohup hive --service metastore 2>&1 >> /var/log/hivems.log &