Hi David, Can you try val rddToSave = file.map(l => l.split("\\|")).map(r => (r(34)+"-"+r(3), (r(4), r(10), r(12)))) ?
That should work. Liquan On Wed, Sep 24, 2014 at 1:29 AM, david <david...@free.fr> wrote: > Hi, > > Does anybody know how to use sortbykey in scala on a RDD like : > > val rddToSave = file.map(l => l.split("\\|")).map(r => (r(34)+"-"+r(3), > r(4), r(10), r(12))) > > besauce, i received ann error "sortByKey is not a member of > ord.apache.spark.rdd.RDD[(String,String,String,String)]. > > What i try do do is sort on the first element. > > > Thank's > > > > > > > > -- > View this message in context: > http://apache-spark-user-list.1001560.n3.nabble.com/sortByKey-trouble-tp14989.html > Sent from the Apache Spark User List mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@spark.apache.org > For additional commands, e-mail: user-h...@spark.apache.org > > -- Liquan Pei Department of Physics University of Massachusetts Amherst