aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/scala/spark/Job.scala
blob: 6abbcbce5153adca58792f29c3e7cca8c6691903 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package spark

import mesos._

/**
 * Class representing a parallel job in MesosScheduler. Schedules the
 * job by implementing various callbacks.
 */
abstract class Job(jobId: Int) {
  def slaveOffer(s: SlaveOffer, availableCpus: Int, availableMem: Int)
    : Option[TaskDescription]

  def statusUpdate(t: TaskStatus): Unit

  def error(code: Int, message: String): Unit

  def getId(): Int = jobId
}