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 InitializingBean, 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)
           
 void setPigServer(PigServer pig)
          Sets the pig server instance used by this tasklet.
 void setScripts(Collection<PigScript> scripts)
          Sets the pig scripts to be executed by this tasklet.
 
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

afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

execute

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

setScripts

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

Parameters:
scripts - The scripts to set.

setPigServer

public void setPigServer(PigServer pig)
Sets the pig server instance used by this tasklet.

Parameters:
pig - The pig to set.