|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.data.hadoop.mapreduce.ToolExecutor
public abstract class ToolExecutor
Customized executor for Tool
.
Constructor Summary | |
---|---|
ToolExecutor()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
protected java.lang.ClassLoader |
createClassLoaderForJar(org.springframework.core.io.Resource jar,
java.lang.ClassLoader parentCL,
org.apache.hadoop.conf.Configuration cfg)
|
protected java.lang.Integer |
invokeTargetObject(org.apache.hadoop.conf.Configuration cfg,
org.apache.hadoop.util.Tool target,
java.lang.Class<org.apache.hadoop.util.Tool> targetClass,
java.lang.String[] args)
|
protected java.lang.Class<org.apache.hadoop.util.Tool> |
loadClass(java.lang.String className,
java.lang.ClassLoader cl)
|
protected void |
postExecution(org.apache.hadoop.conf.Configuration cfg)
|
protected void |
preExecution(org.apache.hadoop.conf.Configuration cfg)
|
protected org.apache.hadoop.conf.Configuration |
resolveConfiguration()
|
protected java.lang.Class<T> |
resolveTargetClass(org.apache.hadoop.conf.Configuration cfg)
|
protected T |
resolveTargetObject(java.lang.Class<T> type)
|
protected int |
runCode()
|
void |
setArchives(org.springframework.core.io.Resource... archives)
Sets the archives to be unarchive to the map reduce cluster. |
void |
setArguments(java.lang.String... arguments)
Sets the arguments. |
void |
setBeanClassLoader(java.lang.ClassLoader classLoader)
|
void |
setCloseFs(boolean closeFs)
Indicates whether or not to close the Hadoop file-systems resulting from the custom code execution. |
void |
setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets the configuration. |
void |
setFiles(org.springframework.core.io.Resource... files)
Sets the files to be copied to the map reduce cluster. |
void |
setJar(org.springframework.core.io.Resource jar)
Sets the target code jar. |
void |
setLibs(org.springframework.core.io.Resource... libJars)
Sets the jar files to include in the classpath. |
void |
setProperties(java.util.Properties properties)
Sets the properties. |
void |
setTool(org.apache.hadoop.util.Tool tool)
Sets the tool. |
void |
setToolClass(java.lang.String toolClassName)
Sets the tool class by name. |
void |
setUser(java.lang.String user)
Sets the user impersonation (optional) for running this job. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ToolExecutor()
Method Detail |
---|
protected java.lang.Integer invokeTargetObject(org.apache.hadoop.conf.Configuration cfg, org.apache.hadoop.util.Tool target, java.lang.Class<org.apache.hadoop.util.Tool> targetClass, java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
protected java.lang.Class<org.apache.hadoop.util.Tool> loadClass(java.lang.String className, java.lang.ClassLoader cl)
public void setTool(org.apache.hadoop.util.Tool tool)
tool
- The tool to set.public void setToolClass(java.lang.String toolClassName)
toolClassName
- the new tool classpublic void afterPropertiesSet() throws java.lang.Exception
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
java.lang.Exception
protected int runCode() throws java.lang.Exception
java.lang.Exception
protected org.apache.hadoop.conf.Configuration resolveConfiguration() throws java.lang.Exception
java.lang.Exception
protected java.lang.Class<T> resolveTargetClass(org.apache.hadoop.conf.Configuration cfg) throws java.lang.Exception
java.lang.Exception
protected T resolveTargetObject(java.lang.Class<T> type)
protected java.lang.ClassLoader createClassLoaderForJar(org.springframework.core.io.Resource jar, java.lang.ClassLoader parentCL, org.apache.hadoop.conf.Configuration cfg)
protected void preExecution(org.apache.hadoop.conf.Configuration cfg)
protected void postExecution(org.apache.hadoop.conf.Configuration cfg)
public void setJar(org.springframework.core.io.Resource jar)
jar
- public void setArguments(java.lang.String... arguments)
arguments
- The arguments to set.public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
configuration
- The configuration to set.public void setProperties(java.util.Properties properties)
properties
- The properties to set.public void setBeanClassLoader(java.lang.ClassLoader classLoader)
setBeanClassLoader
in interface org.springframework.beans.factory.BeanClassLoaderAware
public void setCloseFs(boolean closeFs)
closeFs
- the new close fspublic void setLibs(org.springframework.core.io.Resource... libJars)
mydir/*.jar
), which the
Spring container will automatically resolve.
libJars
- The jar files to include in the classpath.public void setFiles(org.springframework.core.io.Resource... files)
mydir/*.txt
), which the
Spring container will automatically resolve.
files
- The files to copy.public void setArchives(org.springframework.core.io.Resource... archives)
mydir/*.zip
), which the
Spring container will automatically resolve.
archives
- The archives to unarchive on the compute machines.public void setUser(java.lang.String user)
user
- user/group information
|
Spring for Apache Hadoop | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |