دنبال کننده ها

۱۳۹۶ آبان ۱۰, چهارشنبه

scala - I am trying to create an RDD out of an existing RDD and save that newly created RDD as a textFile

[ad_1]



Below is the code I am using over the empjoined RDD I created. empJoined is an RDD of TYPE RDD[String, (String, String))] that contains an array(employerID, (SAL, NAME)).



I want to save the names that belong to a specific salary in a different text files with their salary names on it



empjoined.map(x => x._2).groupByKey().map(x => (x._1,x._2.toSeq)).foreachcase(x,y) => sc.makeRDD(y).saveAsTextFile("/testingout1/output1"+x)




[ad_2]

لینک منبع