Spring for Apache Hadoop

org.springframework.data.hadoop.hive
Class HiveRunner

java.lang.Object
  extended by org.springframework.data.hadoop.hive.HiveExecutor
      extended by org.springframework.data.hadoop.hive.HiveRunner
All Implemented Interfaces:
java.util.concurrent.Callable<java.util.List<java.lang.String>>, org.springframework.beans.factory.InitializingBean

public class HiveRunner
extends HiveExecutor
implements java.util.concurrent.Callable<java.util.List<java.lang.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

Constructor Summary
HiveRunner()
           
 
Method Summary
 void afterPropertiesSet()
           
 java.util.List<java.lang.String> 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 org.springframework.data.hadoop.hive.HiveExecutor
executeHiveScripts, setHiveClientFactory, setHiveTemplate, setScripts
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiveRunner

public HiveRunner()
Method Detail

afterPropertiesSet

public void afterPropertiesSet()
                        throws java.lang.Exception
Specified by:
afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
Overrides:
afterPropertiesSet in class HiveExecutor
Throws:
java.lang.Exception

call

public java.util.List<java.lang.String> call()
                                      throws java.lang.Exception
Specified by:
call in interface java.util.concurrent.Callable<java.util.List<java.lang.String>>
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 -

Spring for Apache Hadoop