org.springframework.data.hadoop.batch.mapreduce
Class ToolTasklet
java.lang.Object
org.springframework.data.hadoop.mapreduce.ToolExecutor
org.springframework.data.hadoop.batch.mapreduce.ToolTasklet
- All Implemented Interfaces:
- Tasklet, Aware, BeanClassLoaderAware, InitializingBean
public class ToolTasklet
- extends org.springframework.data.hadoop.mapreduce.ToolExecutor
- implements Tasklet, InitializingBean
Tasklet for executing Hadoop Tools.
- Author:
- Costin Leau
| Methods inherited from class org.springframework.data.hadoop.mapreduce.ToolExecutor |
invokeTargetObject, loadClass, setTool, setToolClass |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ToolTasklet
public ToolTasklet()
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- Overrides:
afterPropertiesSet in class org.springframework.data.hadoop.mapreduce.ToolExecutor
- Throws:
Exception
setSystemProcessExitCodeMapper
public void setSystemProcessExitCodeMapper(SystemProcessExitCodeMapper systemProcessExitCodeMapper)
- Parameters:
systemProcessExitCodeMapper - maps system process return value to
ExitStatus returned by Tasklet.
SimpleSystemProcessExitCodeMapper is used by default.
runCode
protected int runCode()
throws Exception
- Throws:
Exception
resolveConfiguration
protected Configuration resolveConfiguration()
throws Exception
- Throws:
Exception
resolveTargetClass
protected Class<T> resolveTargetClass(Configuration arg0)
throws Exception
- Throws:
Exception
resolveTargetObject
protected T resolveTargetObject(Class<T> arg0)
createClassLoaderForJar
protected ClassLoader createClassLoaderForJar(Resource arg0,
ClassLoader arg1,
Configuration arg2)
preExecution
protected void preExecution(Configuration arg0)
postExecution
protected void postExecution(Configuration arg0)