Spring for Apache Hadoop

org.springframework.yarn.fs
Class LocalResourcesFactoryBean

java.lang.Object
  extended by org.springframework.yarn.fs.LocalResourcesFactoryBean
All Implemented Interfaces:
org.springframework.beans.factory.FactoryBean<ResourceLocalizer>, org.springframework.beans.factory.InitializingBean

public class LocalResourcesFactoryBean
extends java.lang.Object
implements org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.FactoryBean<ResourceLocalizer>

Factory bean building ResourceLocalizers objects.

Author:
Janne Valkealahti

Nested Class Summary
static class LocalResourcesFactoryBean.CopyEntry
          Helper class storing copy entries.
static class LocalResourcesFactoryBean.RawCopyEntry
          Helper class storing raw copy entries.
static class LocalResourcesFactoryBean.TransferEntry
          Helper class storing transfer entries.
 
Constructor Summary
LocalResourcesFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 ResourceLocalizer getObject()
           
 java.lang.Class<ResourceLocalizer> getObjectType()
           
 boolean isSingleton()
           
 void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
          Sets Yarn configuration for this factory.
 void setCopyEntries(java.util.Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries)
          Sets copy entries reference for this factory.
 void setHdfsEntries(java.util.Collection<LocalResourcesFactoryBean.TransferEntry> hdfsEntries)
          Sets hdfs entries reference for this factory.
 void setRawCopyEntries(java.util.Collection<LocalResourcesFactoryBean.RawCopyEntry> rawEntries)
           
 void setStagingDirectory(org.apache.hadoop.fs.Path stagingDirectory)
          Sets the staging directory.
 void setStagingDirectory(java.lang.String stagingDirectory)
          Sets the staging directory.
 void setType(org.apache.hadoop.yarn.api.records.LocalResourceType defaultType)
          Sets default LocalResourceType for entry.
 void setVisibility(org.apache.hadoop.yarn.api.records.LocalResourceVisibility defaultVisibility)
          Sets default LocalResourceVisibility for entry.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalResourcesFactoryBean

public LocalResourcesFactoryBean()
Method Detail

getObject

public ResourceLocalizer getObject()
                            throws java.lang.Exception
Specified by:
getObject in interface org.springframework.beans.factory.FactoryBean<ResourceLocalizer>
Throws:
java.lang.Exception

getObjectType

public java.lang.Class<ResourceLocalizer> getObjectType()
Specified by:
getObjectType in interface org.springframework.beans.factory.FactoryBean<ResourceLocalizer>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface org.springframework.beans.factory.FactoryBean<ResourceLocalizer>

afterPropertiesSet

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

setType

public void setType(org.apache.hadoop.yarn.api.records.LocalResourceType defaultType)
Sets default LocalResourceType for entry.

Parameters:
defaultType - the default LocalResourceType

setVisibility

public void setVisibility(org.apache.hadoop.yarn.api.records.LocalResourceVisibility defaultVisibility)
Sets default LocalResourceVisibility for entry.

Parameters:
defaultVisibility - the default LocalResourceVisibility

setHdfsEntries

public void setHdfsEntries(java.util.Collection<LocalResourcesFactoryBean.TransferEntry> hdfsEntries)
Sets hdfs entries reference for this factory.

Parameters:
hdfsEntries - Collection of hdfs entries

setCopyEntries

public void setCopyEntries(java.util.Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries)
Sets copy entries reference for this factory.

Parameters:
copyEntries - Collection of copy entries

setConfiguration

public void setConfiguration(org.apache.hadoop.conf.Configuration configuration)
Sets Yarn configuration for this factory.

Parameters:
configuration - Yarn configuration

setStagingDirectory

public void setStagingDirectory(java.lang.String stagingDirectory)
Sets the staging directory.

Parameters:
stagingDirectory - the new staging directory
See Also:
setStagingDirectory(Path)

setStagingDirectory

public void setStagingDirectory(org.apache.hadoop.fs.Path stagingDirectory)
Sets the staging directory.

Parameters:
stagingDirectory - the new staging directory

setRawCopyEntries

public void setRawCopyEntries(java.util.Collection<LocalResourcesFactoryBean.RawCopyEntry> rawEntries)

Spring for Apache Hadoop