public class HdfsScriptRunner extends Object implements ApplicationContextAware
These are :
| Name | Type | Description | 
|---|---|---|
| cfg | org.apache.hadoop.conf.Configuration | Hadoop Configuration (relies on 'hadoop-configuration' bean or singleton type match) | 
| cl | java.lang.ClassLoader | ClassLoader used for executing this script | 
| ctx | org.springframework.context.ApplicationContext | Enclosing application context | 
| ctxRL | org.springframework.io.support.ResourcePatternResolver | Enclosing application context ResourceLoader (same as ctx) | 
| distcp | org.springframework.data.hadoop.fs.DistributedCopyUtil | programmatic access to DistCp | 
| fs | org.apache.hadoop.fs.FileSystem | Hadoop File System (relies on 'hadoop-fs' bean or singleton type match, falls back to creating one based on 'cfg') | 
| fsh | org.springframework.data.hadoop.fs.FsShell | File System shell, exposing hadoop 'fs' commands as an API | 
| hdfsRL | org.springframework.data.hadoop.io.HdfsResourceLoader | HdfsResourceLoader (relies on 'hadoop-resource-loader' or singleton type match, falls back to creating one automatically based on 'cfg') | 
 Note that the above variables are added only if found (have a non-null value) and the keys are not bound already.
 To make the runner execute at startup, use setRunAtStartup(boolean).
HdfsResourceLoader, 
FsShell, 
ApplicationContext| Constructor and Description | 
|---|
| HdfsScriptRunner() | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet() | 
| Object | call() | 
| boolean | isRunAtStartup()Indicates whether the script gets executed once the factory bean initializes. | 
| protected void | postProcess(Map<String,Object> args)Method for post-processing arguments. | 
| void | setApplicationContext(ApplicationContext applicationContext) | 
| void | setArguments(Map<String,Object> arguments)Sets the arguments for evaluating this script. | 
| void | setBeanClassLoader(ClassLoader classLoader) | 
| void | setConfiguration(Configuration configuration)Sets the Hadoop configuration to use. | 
| void | setEvaluate(EvaluationPolicy evaluation)Sets the way the script is evaluated. | 
| void | setExtension(String extension)Sets the script extension. | 
| void | setLanguage(String language)Sets the script language. | 
| void | setPostAction(Collection<Callable<?>> actions)Actions to be invoked after running the action. | 
| void | setPreAction(Collection<Callable<?>> actions)Actions to be invoked before running the action. | 
| void | setRunAtStartup(boolean runAtStartup)Indicates whether to evaluate the script at startup (default) or not. | 
| void | setScriptSource(ScriptSource script)Sets the script source to evaluate. | 
protected void postProcess(Map<String,Object> args)
args - The arguments.public void afterPropertiesSet()
                        throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext in interface ApplicationContextAwareBeansExceptionpublic void setConfiguration(Configuration configuration)
configuration - The configuration to set.public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader in interface BeanClassLoaderAwarepublic void setScriptSource(ScriptSource script)
script - The script to evaluate.public void setLanguage(String language)
language - The script language.public void setExtension(String extension)
extension - The extension to set.public void setEvaluate(EvaluationPolicy evaluation)
evaluation - The evaluation.public void setArguments(Map<String,Object> arguments)
arguments - The arguments to set.public boolean isRunAtStartup()
public void setRunAtStartup(boolean runAtStartup)
runAtStartup - The runStartUp to set.public void setPreAction(Collection<Callable<?>> actions)
actions - The actions.public void setPostAction(Collection<Callable<?>> actions)
actions - The actions.