Spark环境搭建

val conf = new SparkConf().setAppName("UserCF").setMaster("local[2]")
val spark=SparkSession.builder().enableHiveSupport().config(conf).getOrCreate()
val df = spark.sql("select user_id, item_id, rating from badou.udata limit 1000")

 

posted @ 2018-09-15 08:25  再见、梦想  阅读(109)  评论(0编辑  收藏  举报