九州编程
row_number方法,相当于groupTopN。分组排序应用非常广泛。package com.dt.sparkimport org.apache.spark.sql.hive.HiveContextimport org.apache.spark.{SparkContext, SparkConf}object SparkSQLWindowFunctionOps {def main(args:Array[String]) {val conf: SparkConf = new SparkConf().setAppName("SparkSQLWindowFunctionOps").setMaster("spark://Master:7077")val sc = new SparkContext(conf)val hiveContext = new HiveContext(sc) //构建SQL上下文!