Spring for Apache Hadoop

org.springframework.yarn.boot.support
Class YarnJobLauncherCommandLineRunner

java.lang.Object
  extended by org.springframework.yarn.boot.support.YarnJobLauncherCommandLineRunner
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.boot.CommandLineRunner, org.springframework.context.ApplicationEventPublisherAware

@Component
public class YarnJobLauncherCommandLineRunner
extends java.lang.Object
implements org.springframework.boot.CommandLineRunner, org.springframework.context.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

Constructor Summary
YarnJobLauncherCommandLineRunner()
           
 
Method Summary
protected  void launchJobFromProperties(java.util.Properties properties)
          Launch jobs using Properties.
 void run(java.lang.String... args)
           
 void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
           
 void setJobName(java.lang.String jobName)
          Sets the enabled job name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

YarnJobLauncherCommandLineRunner

public YarnJobLauncherCommandLineRunner()
Method Detail

setApplicationEventPublisher

public void setApplicationEventPublisher(org.springframework.context.ApplicationEventPublisher publisher)
Specified by:
setApplicationEventPublisher in interface org.springframework.context.ApplicationEventPublisherAware

run

public void run(java.lang.String... args)
         throws org.springframework.batch.core.JobExecutionException
Specified by:
run in interface org.springframework.boot.CommandLineRunner
Throws:
org.springframework.batch.core.JobExecutionException

setJobName

public void setJobName(java.lang.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(java.util.Properties properties)
                                throws org.springframework.batch.core.JobExecutionException
Launch jobs using Properties.

Parameters:
properties - the properties
Throws:
org.springframework.batch.core.JobExecutionException - the job execution exception

Spring for Apache Hadoop