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")