Chapter 3. Some fundamentals
This chapter covers
- Scala philosophy, functional programming, and basics like class declarations
- Spark RDDs and common RDD operations, serialization, and Hello World with sbt
- Graph terminology
Using GraphX requires some basic knowledge of Spark, Scala, and graphs. This chapter covers the basics of all three—enough to get you through this book in case you’re not up to speed on one or more of them.
Scala is a complex language, and this book ostensibly requires no Scala knowledge (though it would be helpful). The bare basics of Scala are covered in the first section of this chapter, and Scala tips are sprinkled throughout the remainder of the book to help beginning and intermediate Scala programmers.
The second section of this chapter is a tiny crash course on Spark—for a more thorough treatment, see Spark In Action (Manning, 2016). The functional programming philosophy of Scala is carried over into Spark, but beyond that, Spark is not nearly as tricky as Scala, and there are fewer Spark tips in the rest of the book than Scala tips.
Finally, regarding graphs, in this book we don’t delve into pure “graph theory” involving mathematical proofs—for example, about vertices and edges. We do, however, frequently refer to structural properties of graphs, and for that reason some helpful terminology is defined in this chapter.