O'Reilly logo
  • Kai Zhang thinks this is interesting:

rdd.sortByKey()

From

Cover of Learning Spark

Note

It's wired that rdd.sortByKey (without Parentheses) will not work(for spark2.2 shell) here: scala> rdd.sortByKey <console>:27: error: missing argument list for method sortByKey in class OrderedRDDFunctions Unapplied methods are only converted to functions when a function type is expected. You can make this conversion explicit by writing sortByKey _ or sortByKey(_,_) instead of sortByKey. rdd.sortByKey ^