spark整合hive

spark整合hive

启动hdfs

start-dfs.sh
 

启动spark

sbin/start-all.sh
 

添加hive-site.xml,core-site.xml,hdfs-site.xml

把hive-site.xml,core-site.xml,hdfs-site.xml拷贝到/opt/module/spark-2.1.1-bin-hadoop2.7/conf
 

启动spark-sql

bin/spark-sql --master spark://master:7077 --driver-class-path /opt/software/mysql-connector-java-5.1.43-bin.jar
spark-sql连hive
spark-sql>show databases;
spark-sql>use default;
spark-sql>show tables;
 
 
posted @ 2020-01-09 14:21  Striving_For_Dream  阅读(254)  评论(0编辑  收藏  举报
/*快速评论*/ #div_digg { position: fixed; bottom: 10px; right: 15px; border: 2px solid #ECD7B1; padding: 10px; width: 140px; background-color: #fff; border-radius: 5px 5px 5px 5px !important; box-shadow: 0 0 0 1px #5F5A4B, 1px 1px 6px 1px rgba(10, 10, 0, 0.5); }