Skip to content

Latest commit

 

History

History
26 lines (16 loc) · 594 Bytes

README.md

File metadata and controls

26 lines (16 loc) · 594 Bytes

sparkTutorial

Project source code for James Lee's Aparch Spark with Java course.

Check out the full list of DevOps and Big Data courses that James and Tao teach.

https://www.level-up.one/courses/

Transformation vs Actions

Transformations returns RDDs, whereas actions return some other data type.

Transformation

  JavaRDD<String> linesWithFriday = lines.filter(line -> line.contains("Friday"));

  JavaRDD<Integer> lengths = lines.map(line -> line.length());

Actions

  List<String> words = wordRdd.collect();

  String firstLine = lines.first();