2010-03-29 19:17:55 -04:00
|
|
|
package spark
|
|
|
|
|
|
|
|
// Scheduler trait, implemented by both NexusScheduler and LocalScheduler.
|
|
|
|
private trait Scheduler {
|
|
|
|
def start()
|
2011-05-19 15:47:09 -04:00
|
|
|
|
2010-03-29 19:17:55 -04:00
|
|
|
def waitForRegister()
|
2011-05-19 15:47:09 -04:00
|
|
|
|
|
|
|
// Run a function on some partitions of an RDD, returning an array of results.
|
|
|
|
def runJob[T, U](rdd: RDD[T], func: Iterator[T] => U, partitions: Seq[Int])
|
|
|
|
(implicit m: ClassManifest[U]): Array[U]
|
|
|
|
|
2010-03-29 19:17:55 -04:00
|
|
|
def stop()
|
2011-05-19 15:47:09 -04:00
|
|
|
|
2010-08-31 15:08:09 -04:00
|
|
|
def numCores(): Int
|
2010-03-29 19:17:55 -04:00
|
|
|
}
|