diff options
author | Matei Zaharia <matei@eecs.berkeley.edu> | 2011-02-26 23:15:33 -0800 |
---|---|---|
committer | Matei Zaharia <matei@eecs.berkeley.edu> | 2011-02-26 23:15:33 -0800 |
commit | 309367c4772e1793bf7fe58fc2ed2fca2f7bf657 (patch) | |
tree | 205e0e88e30f4a823e01779f68a3df5a63f8d1af /examples/src/main/scala | |
parent | dc24aecd8fc8b5d9b19c10e8301dbe1107412c8a (diff) | |
download | spark-309367c4772e1793bf7fe58fc2ed2fca2f7bf657.tar.gz spark-309367c4772e1793bf7fe58fc2ed2fca2f7bf657.tar.bz2 spark-309367c4772e1793bf7fe58fc2ed2fca2f7bf657.zip |
Initial work towards new RDD design
Diffstat (limited to 'examples/src/main/scala')
-rw-r--r-- | examples/src/main/scala/spark/examples/CpuHog.scala | 26 | ||||
-rw-r--r-- | examples/src/main/scala/spark/examples/SleepJob.scala | 21 |
2 files changed, 0 insertions, 47 deletions
diff --git a/examples/src/main/scala/spark/examples/CpuHog.scala b/examples/src/main/scala/spark/examples/CpuHog.scala deleted file mode 100644 index 94b3709850..0000000000 --- a/examples/src/main/scala/spark/examples/CpuHog.scala +++ /dev/null @@ -1,26 +0,0 @@ -package spark.examples - -import spark._ - -object CpuHog { - def main(args: Array[String]) { - if (args.length != 3) { - System.err.println("Usage: CpuHog <master> <tasks> <threads_per_task>"); - System.exit(1) - } - val sc = new SparkContext(args(0), "CPU hog") - val tasks = args(1).toInt - val threads = args(2).toInt - def task { - for (i <- 0 until threads-1) { - new Thread() { - override def run { - while(true) {} - } - }.start() - } - while(true) {} - } - sc.runTasks(Array.make(tasks, () => task)) - } -} diff --git a/examples/src/main/scala/spark/examples/SleepJob.scala b/examples/src/main/scala/spark/examples/SleepJob.scala deleted file mode 100644 index 02673a5f88..0000000000 --- a/examples/src/main/scala/spark/examples/SleepJob.scala +++ /dev/null @@ -1,21 +0,0 @@ -package spark.examples - -import spark._ - -object SleepJob { - def main(args: Array[String]) { - if (args.length != 3) { - System.err.println("Usage: SleepJob <master> <tasks> <task_duration>"); - System.exit(1) - } - val sc = new SparkContext(args(0), "Sleep job") - val tasks = args(1).toInt - val duration = args(2).toInt - def task { - val start = System.currentTimeMillis - while (System.currentTimeMillis - start < duration * 1000L) - Thread.sleep(200) - } - sc.runTasks(Array.make(tasks, () => task)) - } -} |