org.springframework.data.hadoop.hive
Class HiveRunner
java.lang.Object
org.springframework.data.hadoop.hive.HiveExecutor
org.springframework.data.hadoop.hive.HiveRunner
- All Implemented Interfaces:
- Callable<List<String>>, InitializingBean
public class HiveRunner
- extends HiveExecutor
- implements Callable<List<String>>
Basic runner for Hive scripts inside a Spring environment. For more advanced functionality, consider using Spring Batch and the HiveTasklet.
To make the runner execute at startup, use setRunAtStartup(boolean).
- Author:
- Costin Leau
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HiveRunner
public HiveRunner()
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Specified by:
afterPropertiesSet in interface InitializingBean- Overrides:
afterPropertiesSet in class HiveExecutor
- Throws:
Exception
call
public List<String> call()
throws Exception
- Specified by:
call in interface Callable<List<String>>
- Throws:
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(Collection<Callable<?>> actions)
- Actions to be invoked before running the action.
- Parameters:
actions - actions
setPostAction
public void setPostAction(Collection<Callable<?>> actions)
- Actions to be invoked after running the action.
- Parameters:
actions - actions