hive spark mysql

个人spark hive架构的问题,是没有把hive/conf/hive.site.xml 放到spark/conf目录下sql

ln -s  hive/conf/hive.site.xml /spark/conf/架构

问题解决。以前有在hive.site.xmlspa

<property>
    <name>hive.metastore.uris</name> 
    <value>thrift://启动spark所在ip:9083</value>
</property>
<property> 
     <name>hive.execution.engine</name>
     <value>spark</value>
     <description>set hive engine</description>
</property>
 
又执行了hive --servce metastore &  //后台运行
 
用jps  里面有hive的服务 run.jar  ** 必需要启动hive服务  **
 
用spark-submit 提交任务 
 

 

ok 
 代码里面  不用书写.config("spark.sql.warehouse.dir", warehouseLocation) 不用配置 由于读取hive-site.xml文件
相关文章
相关标签/搜索