@Component
public class YarnJobLauncher
extends java.lang.Object
implements org.springframework.context.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(org.springframework.batch.core.Job job,
org.springframework.batch.core.JobParameters jobParameters) |
org.springframework.batch.core.explore.JobExplorer |
getJobExplorer() |
org.springframework.batch.core.launch.JobLauncher |
getJobLauncher()
Gets the job launcher.
|
java.lang.String |
getJobName()
Gets the enabled job name.
|
org.springframework.batch.core.configuration.JobRegistry |
getJobRegistry() |
java.util.Collection<org.springframework.batch.core.Job> |
getJobs()
Gets the jobs.
|
protected void |
launchJobFromProperties(java.util.Properties properties)
Launch jobs using
Properties. |
void |
run(java.util.Properties properties)
Run the jobs.
|
void |
run(java.lang.String... args)
Run the jobs.
|
void |
setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher) |
void |
setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer) |
void |
setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
Sets the job launcher.
|
void |
setJobName(java.lang.String jobName)
Sets the enabled job name.
|
void |
setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter converter) |
void |
setJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry) |
void |
setJobs(java.util.Collection<org.springframework.batch.core.Job> jobs)
Sets the jobs.
|
void |
setYarnBatchProperties(YarnBatchProperties yarnBatchProperties) |
public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAwarepublic void run(java.lang.String... args)
throws org.springframework.batch.core.JobExecutionException
args - the argsorg.springframework.batch.core.JobExecutionException - the job execution exceptionpublic void run(java.util.Properties properties)
throws org.springframework.batch.core.JobExecutionException
properties - the job propertiesorg.springframework.batch.core.JobExecutionException - the job execution exceptionpublic void setJobName(java.lang.String jobName)
PatternMatchUtils.simpleMatch(String, String) and multiple
patterns can be matched if delimited by a comma.jobName - the new job namepublic java.lang.String getJobName()
setJobName(String)@Autowired public void setJobLauncher(org.springframework.batch.core.launch.JobLauncher jobLauncher)
jobLauncher - the new job launcherpublic org.springframework.batch.core.launch.JobLauncher getJobLauncher()
@Autowired(required=false) public void setJobRegistry(org.springframework.batch.core.configuration.JobRegistry jobRegistry)
public org.springframework.batch.core.configuration.JobRegistry getJobRegistry()
@Autowired(required=false) public void setJobParametersConverter(org.springframework.batch.core.converter.JobParametersConverter converter)
@Autowired(required=false) public void setJobExplorer(org.springframework.batch.core.explore.JobExplorer jobExplorer)
public org.springframework.batch.core.explore.JobExplorer getJobExplorer()
@Autowired(required=false) public void setJobs(java.util.Collection<org.springframework.batch.core.Job> jobs)
jobs - the new jobspublic java.util.Collection<org.springframework.batch.core.Job> getJobs()
@Autowired(required=false) public void setYarnBatchProperties(YarnBatchProperties yarnBatchProperties)
protected void launchJobFromProperties(java.util.Properties properties)
throws org.springframework.batch.core.JobExecutionException
Properties.properties - the propertiesorg.springframework.batch.core.JobExecutionException - the job execution exceptionprotected void executeJob(org.springframework.batch.core.Job job,
org.springframework.batch.core.JobParameters jobParameters)
throws org.springframework.batch.core.JobExecutionException
org.springframework.batch.core.JobExecutionException