Skip to content

Instantly share code, notes, and snippets.

@oza
Last active August 29, 2015 14:08
Show Gist options
  • Save oza/0c27cd5e036fd119f530 to your computer and use it in GitHub Desktop.
Save oza/0c27cd5e036fd119f530 to your computer and use it in GitHub Desktop.
// scala> conf.get("spark.shuffle.manager")
// res3: String = org.apache.spark.shuffle.sort.SortShuffleManager
new scala.testing.Benchmark {
def run() {
sc.textFile("hdfs:///user/ozawa/wordCountInput20GB")
.flatMap(line => line.split(" "))
.map(word => (word, 1))
.sortByKey(true, 37)
.saveAsTextFile("hdfs:///user/ozawa/outs/sort/3");
}
}.runBenchmark(1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment