Skip to content

Instantly share code, notes, and snippets.

@kylekyle
Created June 1, 2015 02:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylekyle/07f5551ef76a0ae230fc to your computer and use it in GitHub Desktop.
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
# 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