Commit dcdd112f authored by 王志伟's avatar 王志伟

过滤异常数据

parent f941af5e
......@@ -81,7 +81,7 @@ object Search_keywords_count {
)
search_count.show()
val get_result =search_keywords.rdd.map(row=>catch_error(row.toString())).map((_, 1)).reduceByKey(_ + _)
val get_result =search_keywords.rdd.map((_, 1)).reduceByKey(_ + _)
.sortBy(_._2,false)
val temp=get_result.collect()
for (i <- 0 until temp.length ) {
......
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