Open tonykang22 opened 1 year ago
// Spark SQL df.createOrReplaceTempView("historic_tweets") val points = spark.sql("select latitude, longitude from historic_tweets") // MLlib val kmeans = new KMeans().setK(10).setSeed(1L) val model = kmeans.fit(points) // Spark Streaming... TwitterUtils.createStream(ssc, None) .map(t => (model.predict(t.location), 1)) .reduceByKeyAndWindow(_+_, Seconds(60))
Spark Components / Libraries
MapReduce Limitations
Spark's Approach
Spark's Code Size
Meaning...
Combining Processing Types
Spark Components (Libraries)