public class SlurmScheduler extends java.lang.Object implements IScheduler
Constructor and Description |
---|
SlurmScheduler() |
SlurmScheduler(java.lang.String workingDirectory) |
Modifier and Type | Method and Description |
---|---|
void |
close()
This is to for disposing or cleaning up any internal state accumulated by
the scheduler
|
protected SlurmController |
getController()
Get a SlurmControl basing on the config and runtime
|
protected java.lang.String[] |
getExecutorCommand(PackingPlan packing) |
protected java.lang.String |
getHeronSlurmPath() |
protected java.lang.String |
getJobIdFilePath() |
java.util.List<java.lang.String> |
getJobLinks()
This method will be called after onScheduler
It is responsible to return links to topology's customized ui pages.
|
void |
initialize(Config mConfig,
Config mRuntime)
This will initialize scheduler using config file.
|
boolean |
onKill(Scheduler.KillTopologyRequest request)
Called by SchedulerServer when it receives a http request to kill topology,
while the http request body would be the protobuf Scheduler.KillTopologyRequest.
|
boolean |
onRestart(Scheduler.RestartTopologyRequest request)
Called by SchedulerServer when it receives a http request to restart topology,
while the http request body would be the protobuf Scheduler.RestartTopologyRequest.
|
boolean |
onSchedule(PackingPlan packing)
This method will be called after initialize.
|
public SlurmScheduler()
public SlurmScheduler(java.lang.String workingDirectory)
public void initialize(Config mConfig, Config mRuntime)
IScheduler
initialize
in interface IScheduler
protected SlurmController getController()
public void close()
IScheduler
Closes this stream and releases any system resources associated with it. If the stream is already closed then invoking this method has no effect.
close
in interface IScheduler
close
in interface java.lang.AutoCloseable
public boolean onSchedule(PackingPlan packing)
IScheduler
onSchedule
in interface IScheduler
packing
- Initial mapping suggested by running packing algorithm.public java.util.List<java.lang.String> getJobLinks()
IScheduler
getJobLinks
in interface IScheduler
public boolean onKill(Scheduler.KillTopologyRequest request)
IScheduler
onKill
in interface IScheduler
request
- The KillTopologyRequest sent from local heron-clipublic boolean onRestart(Scheduler.RestartTopologyRequest request)
IScheduler
onRestart
in interface IScheduler
request
- The RestartTopologyRequest sent from local heron-cliprotected java.lang.String getJobIdFilePath()
protected java.lang.String getHeronSlurmPath()
protected java.lang.String[] getExecutorCommand(PackingPlan packing)