Created
June 9, 2015 21:08
-
-
Save arahuja/a71b518e5f09725b9d86 to your computer and use it in GitHub Desktop.
This file contains 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
import org.apache.spark.{SparkContext, SparkConf} | |
object SimpleSparkApp extends App { | |
override def main(args: Array[String]) = { | |
val config: SparkConf = new SparkConf() | |
config.setMaster("local[4]") | |
config.setAppName("MySimpleSparkApp") | |
val sc = new SparkContext(config) | |
val rows = Seq( Seq("item-1-1", "item-1-2"), Seq("item-1-1", "item-2-2")) | |
val rdd = sc.parallelize(rows) | |
println(rdd.count()) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment