Commit 8a32d8ad authored by 王志伟's avatar 王志伟

统计话题pv

parent a11d9c7e
...@@ -326,7 +326,7 @@ object Repeated_content_recommendation_moreday { ...@@ -326,7 +326,7 @@ object Repeated_content_recommendation_moreday {
val temp=exp_diary.take(10).foreach(println) val temp=exp_diary.take(10).foreach(println)
//统计每个用户重复日记个数 //统计每个用户重复日记个数
val count_imp=exp_diary.map(_._2).map(row=>row.map((_, 1)).reduceByKey(_ + _)) // val count_imp=exp_diary.map(_._2).map(row=>row.map((_, 1)).reduceByKey(_ + _))
// exp_diary.show() // exp_diary.show()
// exp_diary.createOrReplaceTempView("exp_diary") // exp_diary.createOrReplaceTempView("exp_diary")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment