[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
spark:spark-introduction [2014/11/03 20:35]
straka
spark:spark-introduction [2014/11/03 20:37]
straka
Line 111: Line 111:
   centers.map(center => (center-point).norm(2)).zipWithIndex.min._2   centers.map(center => (center-point).norm(2)).zipWithIndex.min._2
  
-val lines = sc.textFile("/net/projects/hadoop/examples/inputs/points-small/points.txt")+val lines = sc.textFile("/net/projects/hadoop/examples/inputs/points-small/points.txt", sc.defaultParallelism)
 val data = lines.map(line => Vector(line.split("\\s+").map(_.toDouble))).cache() val data = lines.map(line => Vector(line.split("\\s+").map(_.toDouble))).cache()
  

[ Back to the navigation ] [ Back to the content ]