(十二)Spark Core求IP訪問次數的TopN

需求:求IP訪問次數的TopN 1) 獲取ip => (ip,1) 2)reduceByKey(+) 3)排序 sortBythis object test { def main(args: Array[String]): Unit = { val sparkConf = new SparkConf().setAppName("test").setMaster("local[2]")
相關文章
相關標籤/搜索