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.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 setLocal(java.lang.String defaultLocal)
          Sets default local hdfs base address for entry.
 void setRemote(java.lang.String defaultRemote)
          Sets default remote hdfs base address for entry.
 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

setLocal

public void setLocal(java.lang.String defaultLocal)
Sets default local hdfs base address for entry.

Parameters:
defaultLocal - hdfs base address

setRemote

public void setRemote(java.lang.String defaultRemote)
Sets default remote hdfs base address for entry.

Parameters:
defaultRemote - hdfs base address

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

Spring for Apache Hadoop