@Component public class YarnJobLauncher extends Object implements ApplicationEventPublisherAware
launch Spring Batch jobs.
Runs all jobs in the surrounding context by default. Can also be used to
launch a specific job by providing a jobName| Constructor and Description |
|---|
YarnJobLauncher() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
executeJob(Job job,
JobParameters jobParameters) |
JobExplorer |
getJobExplorer() |
JobLauncher |
getJobLauncher()
Gets the job launcher.
|
String |
getJobName()
Gets the enabled job name.
|
JobRegistry |
getJobRegistry() |
Collection<Job> |
getJobs()
Gets the jobs.
|
protected void |
launchJobFromProperties(Properties properties)
Launch jobs using
Properties. |
void |
run(Properties properties)
Run the jobs.
|
void |
run(String... args)
Run the jobs.
|
void |
setApplicationEventPublisher(ApplicationEventPublisher publisher) |
void |
setJobExplorer(JobExplorer jobExplorer) |
void |
setJobLauncher(JobLauncher jobLauncher)
Sets the job launcher.
|
void |
setJobName(String jobName)
Sets the enabled job name.
|
void |
setJobParametersConverter(JobParametersConverter converter) |
void |
setJobRegistry(JobRegistry jobRegistry) |
void |
setJobs(Collection<Job> jobs)
Sets the jobs.
|
void |
setYarnBatchProperties(YarnBatchProperties yarnBatchProperties) |
public void setApplicationEventPublisher(ApplicationEventPublisher publisher)
setApplicationEventPublisher in interface ApplicationEventPublisherAwarepublic void run(String... args) throws JobExecutionException
args - the argsJobExecutionException - the job execution exceptionpublic void run(Properties properties) throws JobExecutionException
properties - the job propertiesJobExecutionException - the job execution exceptionpublic void setJobName(String jobName)
PatternMatchUtils.simpleMatch(String, String) and multiple
patterns can be matched if delimited by a comma.jobName - the new job namepublic String getJobName()
setJobName(String)@Autowired public void setJobLauncher(JobLauncher jobLauncher)
jobLauncher - the new job launcherpublic JobLauncher getJobLauncher()
@Autowired(required=false) public void setJobRegistry(JobRegistry jobRegistry)
public JobRegistry getJobRegistry()
@Autowired(required=false) public void setJobParametersConverter(JobParametersConverter converter)
@Autowired(required=false) public void setJobExplorer(JobExplorer jobExplorer)
public JobExplorer getJobExplorer()
@Autowired(required=false) public void setJobs(Collection<Job> jobs)
jobs - the new jobspublic Collection<Job> getJobs()
@Autowired(required=false) public void setYarnBatchProperties(YarnBatchProperties yarnBatchProperties)
protected void launchJobFromProperties(Properties properties) throws JobExecutionException
Properties.properties - the propertiesJobExecutionException - the job execution exceptionprotected void executeJob(Job job, JobParameters jobParameters) throws JobExecutionException
JobExecutionException