Created
June 1, 2015 02:30
-
-
Save kylekyle/07f5551ef76a0ae230fc to your computer and use it in GitHub Desktop.
An implementation of the first example in the Spark Quick Guide in jRuby
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
# the first example in the Spark Quick Start Guide in jRuby | |
# https://spark.apache.org/docs/latest/quick-start.html | |
require './spark-assembly-1.4.0-SNAPSHOT-hadoop2.4.0.jar' | |
conf = org.apache.spark.SparkConf.new | |
conf.setAppName('ruby!').setMaster('local') | |
sc = org.apache.spark.SparkContext.new conf | |
textFile = sc.textFile('README.md', 1) | |
puts textFile.count |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment