public final class Twister2Job
extends java.lang.Object
Twister2Job
. This class can be used to configure a job along with its
resource. Every job should have a name and a IWorker
class.
Twister2JobBuilder
is used for creating and configuring the job object.Modifier and Type | Class and Description |
---|---|
static class |
Twister2Job.Twister2JobBuilder
Builder class for creating the job.
|
Modifier and Type | Method and Description |
---|---|
java.util.ArrayList<JobAPI.ComputeResource> |
getComputeResources() |
JobConfig |
getConfig() |
java.lang.String |
getJobName() |
int |
getNumberOfWorkers() |
java.lang.String |
getWorkerClass() |
static Twister2Job |
loadTwister2Job(Config config,
JobConfig jobConfig) |
static Twister2Job.Twister2JobBuilder |
newBuilder() |
JobAPI.Job |
serialize()
Converts the job into a protobuf format.
|
void |
setJobID(java.lang.String id)
we only allow job jobName to be updated through this interface
|
void |
setJobName(java.lang.String jobName)
we only allow job jobName to be updated through this interface
|
void |
setUserName(java.lang.String userName)
we set userName through this interface
Users do not set it, we set it later on in Twister2Submitter
|
public JobAPI.Job serialize()
public void setJobName(java.lang.String jobName)
public void setJobID(java.lang.String id)
public void setUserName(java.lang.String userName)
public java.lang.String getJobName()
public java.lang.String getWorkerClass()
public java.util.ArrayList<JobAPI.ComputeResource> getComputeResources()
public int getNumberOfWorkers()
public JobConfig getConfig()
public static Twister2Job loadTwister2Job(Config config, JobConfig jobConfig)
public static Twister2Job.Twister2JobBuilder newBuilder()