|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.scripting.HdfsScriptFactoryBean
public class HdfsScriptFactoryBean
Hadoop-customized factory that exposes Hadoop specific variables to scripting languages. The instances exposes are reused from the enclosing context (using naming conventions or autowiring strategies) or created on demand (in case of lightweight objects).
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') |
HdfsResourceLoader
,
FsShell
,
ApplicationContext
Constructor Summary | |
---|---|
HdfsScriptFactoryBean()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
Object |
getObject()
|
Class<Object> |
getObjectType()
|
boolean |
isRunAtStartup()
Indicates whether the script gets executed once the factory bean initializes. |
boolean |
isSingleton()
|
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 |
setRunAtStartup(boolean runAtStartup)
Indicates whether to evaluate the script at startup (default) or not. |
void |
setScriptSource(ScriptSource script)
Sets the script source to evaluate. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HdfsScriptFactoryBean()
Method Detail |
---|
protected void postProcess(Map<String,Object> args)
public void afterPropertiesSet()
afterPropertiesSet
in interface InitializingBean
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException
setApplicationContext
in interface ApplicationContextAware
BeansException
public void setConfiguration(Configuration configuration)
configuration
- The configuration to set.public Object getObject()
getObject
in interface FactoryBean<Object>
public Class<Object> getObjectType()
getObjectType
in interface FactoryBean<Object>
public boolean isSingleton()
isSingleton
in interface FactoryBean<Object>
public void setBeanClassLoader(ClassLoader classLoader)
setBeanClassLoader
in interface BeanClassLoaderAware
public 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
- 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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |