This video recorded before Java 8 became widely used; in Java 8 there is much less difference between the Java and Scala version. Granted the Java is still more verbose (due to the need for typing and the lack of native tuple support) but it's not far off. Here's my rough translation: List wordCounts = sc.textFile("path") .flatMap(it -> Arrays.asList(it.split(" ")).iterator()) .mapToPair(word -> new Tuple2(word, 1)) .reduceByKey((a, b) -> a + b) .take(100);
that's a very good presentation... why the hell would those organizers 'cut' his speech ?? couldn't they just let him send his speech ? he was ending it anyways...what were they loosing?
So, is it better when you aspire to work for Big data corporations, to actually learn Scala? It seems way finer than java :X I know some Java, but holy shit! I would hate to code in Java for RDD-sets
Java 8 now has lamdbas, you'll find that in Java 8 you can write the code almost as succintly as the Scala version. See my separate comment for a rough translation.
Personally I think this is a very bad presentation. If I were doing a presentation such as this, I'd start with the most trivial example, which would start with a use case, and demo Apache Spark being used to satisfy that use case. For an "introduction", there are just far too many abstract concepts, that without having some a walkthrough of some code and how it works to reference, are far too abstruse for me.