Package com.skytix.velocity
Class VelocityMesosScheduler
- java.lang.Object
-
- com.skytix.velocity.VelocityMesosScheduler
-
- All Implemented Interfaces:
MesosScheduler,java.io.Closeable,java.lang.AutoCloseable
public class VelocityMesosScheduler extends java.lang.Object implements MesosScheduler
-
-
Constructor Summary
Constructors Constructor Description VelocityMesosScheduler(VelocitySchedulerConfig aSchedulerConfig)VelocityMesosScheduler(VelocitySchedulerConfig aSchedulerConfig, io.micrometer.core.instrument.MeterRegistry aMeterRegistry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()voiddrainAndClose()voiddrainAndTeardown()Wait till all tasks have been completed and then send a teardown call to the Master.java.util.Map<java.lang.String,VelocityTask>getActiveTasksById()java.time.LocalDateTimegetLastHeartbeat()intgetNumActiveTasks()intgetNumQueuedTasks()java.util.Map<java.lang.String,VelocityTask>getQueuedTasksById()VelocityTaskgetTaskById(java.lang.String aTaskId)VelocityTasklaunch(TaskDefinition aTaskDefinition)
-
-
-
Constructor Detail
-
VelocityMesosScheduler
public VelocityMesosScheduler(VelocitySchedulerConfig aSchedulerConfig)
-
VelocityMesosScheduler
public VelocityMesosScheduler(VelocitySchedulerConfig aSchedulerConfig, io.micrometer.core.instrument.MeterRegistry aMeterRegistry)
-
-
Method Detail
-
launch
public VelocityTask launch(TaskDefinition aTaskDefinition) throws VelocityTaskException
- Specified by:
launchin interfaceMesosScheduler- Throws:
VelocityTaskException
-
getNumQueuedTasks
public int getNumQueuedTasks()
-
getNumActiveTasks
public int getNumActiveTasks()
-
getActiveTasksById
public java.util.Map<java.lang.String,VelocityTask> getActiveTasksById()
-
getQueuedTasksById
public java.util.Map<java.lang.String,VelocityTask> getQueuedTasksById()
-
getTaskById
public VelocityTask getTaskById(java.lang.String aTaskId)
-
getLastHeartbeat
public java.time.LocalDateTime getLastHeartbeat()
-
drainAndTeardown
public void drainAndTeardown() throws java.lang.ExceptionWait till all tasks have been completed and then send a teardown call to the Master.- Throws:
java.lang.Exception
-
drainAndClose
public void drainAndClose() throws java.lang.Exception- Throws:
java.lang.Exception
-
close
public void close() throws java.io.IOException- Specified by:
closein interfacejava.lang.AutoCloseable- Specified by:
closein interfacejava.io.Closeable- Throws:
java.io.IOException
-
-