第57课 spark sql on hive实战

来源:互联网 发布:什么是网络教育 编辑:程序博客网 时间:2024/04/24 14:43


/* * *王家林老师授课 http://weibo.com/ilovepains */    

第57课 spark sql on hive实战


1、配置

/usr/local/spark-1.6.0-bin-hadoop2.6/conf


hive-site.xml 使用hive的元数据






<configuration>


<property>


<name>hive.metastore.uris</name>


<value>thrift://master:9083</value>


<description>Thrift URI for the remote metastore. Used bymetastore client to connect to remote metastore.</description>


</property>


</configuration>









hive --service metastore >metastore.log 2>& 1&


2、[root@master bin]#./spark-shell --master spark://master:7077 







scala> val hiveContext =new org.apache.spark.sql.hive.HiveContext(sc)




0 0
原创粉丝点击