val conf = new SparkConf().setAppName("input").setMaster("local[*]")
val filter = new StopRecognition()
filter.insertStopNatures("f","b","p","d","w","v","c","u") //过滤掉标点val sparkContext = new SparkContext(conf)
val sqlContext = new SQLContext(sparkContext)
val url = "C:\\Users\\shuangmm\\Desktop\\data\\jobarea=010000&industrytype=01.json"val dataDF =sqlContext.read.format("json")
.option("header","true")
.option("inferSchema",true.toString)//这是自动推断属性列的数据类型。
.load(url)//.show(10)//文件的路径