Commit 851c7a59 authored by 王志伟's avatar 王志伟

统计话题pv

parent 658eb9d8
......@@ -323,10 +323,11 @@ object Repeated_content_recommendation_moreday {
.filter(x => x._2.size >1)
//打印结果
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(word=>(word,1)))
val temp=count_imp.take(10).foreach(println)
// exp_diary.show()
// 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