org.springframework.yarn.boot.support
Class YarnJobLauncherCommandLineRunner
java.lang.Object
org.springframework.yarn.boot.support.YarnJobLauncherCommandLineRunner
- All Implemented Interfaces:
- Aware, org.springframework.boot.CommandLineRunner, ApplicationEventPublisherAware
@Component
public class YarnJobLauncherCommandLineRunner
- extends Object
- implements org.springframework.boot.CommandLineRunner, ApplicationEventPublisherAware
CommandLineRunner to 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
- Author:
- Dave Syer, Janne Valkealahti
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
YarnJobLauncherCommandLineRunner
public YarnJobLauncherCommandLineRunner()
setApplicationEventPublisher
public void setApplicationEventPublisher(ApplicationEventPublisher publisher)
- Specified by:
setApplicationEventPublisher in interface ApplicationEventPublisherAware
run
public void run(String... args)
throws JobExecutionException
- Specified by:
run in interface org.springframework.boot.CommandLineRunner
- Throws:
JobExecutionException
setJobName
public void setJobName(String jobName)
- Sets the enabled job name. Moreover this name can also be a simple
pattern supported by
PatternMatchUtils.simpleMatch(String, String) and multiple
patterns can be matched if delimited by a comma.
- Parameters:
jobName - the new job name
launchJobFromProperties
protected void launchJobFromProperties(Properties properties)
throws JobExecutionException
- Launch jobs using
Properties.
- Parameters:
properties - the properties
- Throws:
JobExecutionException - the job execution exception