org.springframework.data.hadoop.pig
Class PigTasklet

java.lang.Object
  extended by org.springframework.data.hadoop.pig.PigTasklet
All Implemented Interfaces:
Tasklet, InitializingBean

public class PigTasklet
extends Object
implements Tasklet

Pig tasklet. Note the same PigServer is shared between invocations.

Author:
Costin Leau

Constructor Summary
PigTasklet()
           
 
Method Summary
 void afterPropertiesSet()
           
 RepeatStatus execute(StepContribution contribution, ChunkContext chunkContext)
           
protected  List<ExecJob> executePigScripts()
           
 void setPigFactory(PigServerFactory pigFactory)
          Sets the pig server instance used by this class.
 void setPigTemplate(PigOperations pigTemplate)
          Sets the pig template used by this class.
 void setScripts(Collection<PigScript> scripts)
          Sets the pig scripts to be executed by this class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PigTasklet

public PigTasklet()
Method Detail

execute

public RepeatStatus execute(StepContribution contribution,
                            ChunkContext chunkContext)
                     throws Exception
Specified by:
execute in interface Tasklet
Throws:
Exception

afterPropertiesSet

public void afterPropertiesSet()
                        throws Exception
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

executePigScripts

protected List<ExecJob> executePigScripts()

setScripts

public void setScripts(Collection<PigScript> scripts)
Sets the pig scripts to be executed by this class.

Parameters:
scripts - The scripts to set.

setPigFactory

public void setPigFactory(PigServerFactory pigFactory)
Sets the pig server instance used by this class.

Parameters:
pigFactory - The pigFactory to set.

setPigTemplate

public void setPigTemplate(PigOperations pigTemplate)
Sets the pig template used by this class.

Parameters:
pigTemplate -