Hi Angel, Your x() functions returns an Any type, thus there is no Ordering[Any] defined in the scope and it doesn't make sense to define one. Basically it's the same as to order java Objects, which don't have any fields. So the problem is with your x() function, make sure it returns something meaningful.
Cheers, Alex. On Thu, Mar 3, 2016 at 8:39 AM, Angel Angel <areyouange...@gmail.com> wrote: > Hello Sir/Madam, > > I am try to sort the RDD using *sortByKey* function but i am getting the > following error. > > > My code is > 1) convert the rdd array into key value pair. > 2) after that sort by key > > but i am getting the error *No implicit Ordering defined for any * > > [image: Inline image 1] > > > > thanks >