Val sparkConf=new sparkConf (). SetAppName (" SparkKMeans ")
Val sc=new SparkContext (sparkConf)
Val lines=sc. TextFile (args (0))
Val data=https://bbs.csdn.net/topics/lines.map (parseVector _). The cache ()
Val K=args (1). ToInt
Val convergeDist=args (2). ToDouble