-
-
Save alegrm/087f1f2ffe449566fa5c8d6ff21e36b8 to your computer and use it in GitHub Desktop.
Execute Apache Spark in a Scala IDE worksheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.apache.spark.graphx | |
| import org.apache.spark.SparkContext | |
| import org.apache.spark.SparkContext._ | |
| import org.apache.spark.SparkConf | |
| import org.apache.spark.rdd.RDD | |
| import org.apache.spark._ | |
| object repl { | |
| val sc = new SparkContext("local", "test") //> sc : org.apache.spark.SparkContext = org.apache.spark.SparkContext@3724af13 | |
| //| | |
| val vertices = sc.parallelize(1L to 5L) //> vertices : org.apache.spark.rdd.RDD[Long] = ParallelCollectionRDD[0] at par | |
| //| allelize at org.apache.spark.graphx.repl.scala:15 | |
| println(vertices.count) //> 5 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment