11. Ratings Histogram Walkthrough
UNDERSTANDING THE RATINGS COUNTER CODE
Activity
Import What We Need
package com.sundogsoftware.spark
import org.apache.spark._
import org.apache.spark.SparkContext._
import org.apache.log4j._Set Up Our Context
val sc = new SparkContext("local[*]", "RatingsCounter")
// local[*], the [*] means that you are actually using all the cpu to process all the cores to do all the distributed processingLoad The Data
Extract (Map) The Data We Care About
Perform An Action: Count By Value
Sort and Display The Results
It's Just That Easy.
Last updated