public class CoarseMesosSchedulerBackend extends CoarseGrainedSchedulerBackend implements org.apache.mesos.Scheduler, Logging
Unfortunately this has a bit of duplication from MesosSchedulerBackend, but it seems hard to remove this.
CoarseGrainedSchedulerBackend.DriverActor
Constructor and Description |
---|
CoarseMesosSchedulerBackend(TaskSchedulerImpl scheduler,
SparkContext sc,
String master) |
Modifier and Type | Method and Description |
---|---|
String |
appId() |
String |
applicationId()
Get an application ID associated with the job.
|
scala.collection.mutable.HashMap<Object,Object> |
coresByTaskId() |
org.apache.mesos.Protos.CommandInfo |
createCommand(org.apache.mesos.Protos.Offer offer,
int numCores) |
void |
disconnected(org.apache.mesos.SchedulerDriver d) |
org.apache.mesos.SchedulerDriver |
driver() |
void |
error(org.apache.mesos.SchedulerDriver d,
String message) |
void |
executorLost(org.apache.mesos.SchedulerDriver d,
org.apache.mesos.Protos.ExecutorID e,
org.apache.mesos.Protos.SlaveID s,
int status) |
int |
extraCoresPerSlave() |
scala.collection.mutable.HashMap<String,Object> |
failuresBySlaveId() |
void |
frameworkMessage(org.apache.mesos.SchedulerDriver d,
org.apache.mesos.Protos.ExecutorID e,
org.apache.mesos.Protos.SlaveID s,
byte[] b) |
boolean |
isRegistered() |
int |
MAX_SLAVE_FAILURES() |
int |
maxCores() |
int |
newMesosTaskId() |
int |
nextMesosTaskId() |
void |
offerRescinded(org.apache.mesos.SchedulerDriver d,
org.apache.mesos.Protos.OfferID o) |
void |
registered(org.apache.mesos.SchedulerDriver d,
org.apache.mesos.Protos.FrameworkID frameworkId,
org.apache.mesos.Protos.MasterInfo masterInfo) |
Object |
registeredLock() |
void |
reregistered(org.apache.mesos.SchedulerDriver d,
org.apache.mesos.Protos.MasterInfo masterInfo) |
void |
resourceOffers(org.apache.mesos.SchedulerDriver d,
java.util.List<org.apache.mesos.Protos.Offer> offers)
Method called by Mesos to offer resources on slaves.
|
scala.collection.mutable.HashSet<String> |
slaveIdsWithExecutors() |
void |
slaveLost(org.apache.mesos.SchedulerDriver d,
org.apache.mesos.Protos.SlaveID slaveId) |
void |
start() |
void |
statusUpdate(org.apache.mesos.SchedulerDriver d,
org.apache.mesos.Protos.TaskStatus status) |
void |
stop() |
scala.collection.mutable.HashMap<Object,String> |
taskIdToSlaveId() |
int |
totalCoresAcquired() |
void |
waitForRegister() |
ACTOR_NAME, actorSystem, conf, createTime, defaultParallelism, driverActor, isReady, killExecutors, killTask, maxRegisteredWaitingTime, minRegisteredRatio, numExistingExecutors, removeExecutor, requestExecutors, reviveOffers, stopExecutors, sufficientResourcesRegistered, taskIdsOnSlave, totalCoreCount, totalRegisteredExecutors
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
initializeIfNecessary, initializeLogging, isTraceEnabled, log_, log, logDebug, logDebug, logError, logError, logInfo, logInfo, logName, logTrace, logTrace, logWarning, logWarning
public CoarseMesosSchedulerBackend(TaskSchedulerImpl scheduler, SparkContext sc, String master)
public int MAX_SLAVE_FAILURES()
public boolean isRegistered()
public Object registeredLock()
public org.apache.mesos.SchedulerDriver driver()
public int maxCores()
public scala.collection.mutable.HashMap<Object,Object> coresByTaskId()
public int totalCoresAcquired()
public scala.collection.mutable.HashSet<String> slaveIdsWithExecutors()
public scala.collection.mutable.HashMap<Object,String> taskIdToSlaveId()
public scala.collection.mutable.HashMap<String,Object> failuresBySlaveId()
public int extraCoresPerSlave()
public int nextMesosTaskId()
public String appId()
appId
in interface SchedulerBackend
public int newMesosTaskId()
public void start()
start
in interface SchedulerBackend
start
in class CoarseGrainedSchedulerBackend
public org.apache.mesos.Protos.CommandInfo createCommand(org.apache.mesos.Protos.Offer offer, int numCores)
public void offerRescinded(org.apache.mesos.SchedulerDriver d, org.apache.mesos.Protos.OfferID o)
offerRescinded
in interface org.apache.mesos.Scheduler
public void registered(org.apache.mesos.SchedulerDriver d, org.apache.mesos.Protos.FrameworkID frameworkId, org.apache.mesos.Protos.MasterInfo masterInfo)
registered
in interface org.apache.mesos.Scheduler
public void waitForRegister()
public void disconnected(org.apache.mesos.SchedulerDriver d)
disconnected
in interface org.apache.mesos.Scheduler
public void reregistered(org.apache.mesos.SchedulerDriver d, org.apache.mesos.Protos.MasterInfo masterInfo)
reregistered
in interface org.apache.mesos.Scheduler
public void resourceOffers(org.apache.mesos.SchedulerDriver d, java.util.List<org.apache.mesos.Protos.Offer> offers)
resourceOffers
in interface org.apache.mesos.Scheduler
public void statusUpdate(org.apache.mesos.SchedulerDriver d, org.apache.mesos.Protos.TaskStatus status)
statusUpdate
in interface org.apache.mesos.Scheduler
public void error(org.apache.mesos.SchedulerDriver d, String message)
error
in interface org.apache.mesos.Scheduler
public void stop()
stop
in interface SchedulerBackend
stop
in class CoarseGrainedSchedulerBackend
public void frameworkMessage(org.apache.mesos.SchedulerDriver d, org.apache.mesos.Protos.ExecutorID e, org.apache.mesos.Protos.SlaveID s, byte[] b)
frameworkMessage
in interface org.apache.mesos.Scheduler
public void slaveLost(org.apache.mesos.SchedulerDriver d, org.apache.mesos.Protos.SlaveID slaveId)
slaveLost
in interface org.apache.mesos.Scheduler
public void executorLost(org.apache.mesos.SchedulerDriver d, org.apache.mesos.Protos.ExecutorID e, org.apache.mesos.Protos.SlaveID s, int status)
executorLost
in interface org.apache.mesos.Scheduler
public String applicationId()
SchedulerBackend
applicationId
in interface SchedulerBackend