Commit 9287012b authored by 王志伟's avatar 王志伟

增加

parent fa392c00
...@@ -83,12 +83,12 @@ object Search_keywords_count { ...@@ -83,12 +83,12 @@ object Search_keywords_count {
) )
search_count.show() search_count.show()
val get_result =search_keywords.rdd.map((_, 1)).reduceByKey(_ + _) // val get_result =search_keywords.rdd.map((_, 1)).reduceByKey(_ + _)
.sortBy(_._2,false) // .sortBy(_._2,false)
val temp=get_result.collect() // val temp=get_result.collect()
for (i <- 0 until temp.length ) { // for (i <- 0 until temp.length ) {
println(temp(i)) // println(temp(i))
} // }
} }
......
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