public class ResourceAllocator
extends java.lang.Object
These are the steps for submitting a job
Modifier and Type | Field and Description |
---|---|
static java.util.logging.Logger |
LOG |
Constructor and Description |
---|
ResourceAllocator(Config config,
JobAPI.Job job) |
Modifier and Type | Method and Description |
---|---|
void |
clearTemporaryFiles(java.lang.String jobDirectory)
clear temporary files
|
static Config |
getDefaultConfig()
Returns the default configuration
|
static void |
killJob(java.lang.String jobID,
Config cnfg)
Kill the job
|
static Config |
loadConfig(java.util.Map<java.lang.String,java.lang.Object> cfg)
loadConfig from config files and also from environment variables
|
Twister2JobState |
resubmitJob()
Resubmit the job to the cluster
|
Twister2JobState |
submitJob()
Submit the job to the cluster
|
public ResourceAllocator(Config config, JobAPI.Job job)
public static Config loadConfig(java.util.Map<java.lang.String,java.lang.Object> cfg)
cfg
- the config values in this map will be put into returned Configpublic static Config getDefaultConfig()
public Twister2JobState submitJob()
public Twister2JobState resubmitJob()
public void clearTemporaryFiles(java.lang.String jobDirectory)
jobDirectory
- the name of the folder to be cleanedpublic static void killJob(java.lang.String jobID, Config cnfg)
jobID
- of the job to kill