org.springframework.data.hadoop.pig
Class PigRunner
java.lang.Object
org.springframework.data.hadoop.pig.PigExecutor
org.springframework.data.hadoop.pig.PigRunner
- All Implemented Interfaces:
- java.util.concurrent.Callable<java.util.List<org.apache.pig.backend.executionengine.ExecJob>>, org.springframework.beans.factory.InitializingBean
public class PigRunner
- extends PigExecutor
- implements java.util.concurrent.Callable<java.util.List<org.apache.pig.backend.executionengine.ExecJob>>
Basic runner of Pig scripts inside a Spring environment. For more advanced functionality, consider using Spring Batch and the PigTasklet.
To make the runner execute at startup, use setRunAtStartup(boolean)
.
- Author:
- Costin Leau
Method Summary |
void |
afterPropertiesSet()
|
java.util.List<org.apache.pig.backend.executionengine.ExecJob> |
call()
|
void |
setPostAction(java.util.Collection<java.util.concurrent.Callable<?>> actions)
Actions to be invoked after running the action. |
void |
setPreAction(java.util.Collection<java.util.concurrent.Callable<?>> actions)
Actions to be invoked before running the action. |
void |
setRunAtStartup(boolean runAtStartup)
Indicates whether the scripts should run at container startup or not (the default). |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PigRunner
public PigRunner()
afterPropertiesSet
public void afterPropertiesSet()
throws java.lang.Exception
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Overrides:
afterPropertiesSet
in class PigExecutor
- Throws:
java.lang.Exception
call
public java.util.List<org.apache.pig.backend.executionengine.ExecJob> call()
throws java.lang.Exception
- Specified by:
call
in interface java.util.concurrent.Callable<java.util.List<org.apache.pig.backend.executionengine.ExecJob>>
- Throws:
java.lang.Exception
setRunAtStartup
public void setRunAtStartup(boolean runAtStartup)
- Indicates whether the scripts should run at container startup or not (the default).
- Parameters:
runAtStartup
- The runAtStartup to set.
setPreAction
public void setPreAction(java.util.Collection<java.util.concurrent.Callable<?>> actions)
- Actions to be invoked before running the action.
- Parameters:
actions
-
setPostAction
public void setPostAction(java.util.Collection<java.util.concurrent.Callable<?>> actions)
- Actions to be invoked after running the action.
- Parameters:
actions
-