org.springframework.yarn.config.annotation.builders
Class YarnResourceLocalizerBuilder
java.lang.Object
org.springframework.data.hadoop.config.common.annotation.AbstractAnnotationBuilder<O>
org.springframework.data.hadoop.config.common.annotation.AbstractConfiguredAnnotationBuilder<ResourceLocalizer,YarnResourceLocalizerConfigurer,YarnResourceLocalizerBuilder>
org.springframework.yarn.config.annotation.builders.YarnResourceLocalizerBuilder
- All Implemented Interfaces:
- org.springframework.data.hadoop.config.common.annotation.AnnotationBuilder<ResourceLocalizer>, YarnResourceLocalizerConfigurer
public final class YarnResourceLocalizerBuilder
- extends org.springframework.data.hadoop.config.common.annotation.AbstractConfiguredAnnotationBuilder<ResourceLocalizer,YarnResourceLocalizerConfigurer,YarnResourceLocalizerBuilder>
- implements YarnResourceLocalizerConfigurer
AnnotationBuilder for ResourceLocalizer.
- Author:
- Janne Valkealahti
| Methods inherited from class org.springframework.data.hadoop.config.common.annotation.AbstractConfiguredAnnotationBuilder |
apply, apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObject |
| Methods inherited from class org.springframework.data.hadoop.config.common.annotation.AbstractAnnotationBuilder |
build, getObject |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
YarnResourceLocalizerBuilder
public YarnResourceLocalizerBuilder()
- Instantiates a new yarn resource localizer builder.
performBuild
protected ResourceLocalizer performBuild()
throws Exception
- Specified by:
performBuild in class org.springframework.data.hadoop.config.common.annotation.AbstractConfiguredAnnotationBuilder<ResourceLocalizer,YarnResourceLocalizerConfigurer,YarnResourceLocalizerBuilder>
- Throws:
Exception
withCopy
public LocalResourcesCopyConfigurer withCopy()
throws Exception
- Description copied from interface:
YarnResourceLocalizerConfigurer
- Specify configuration options as properties with a
DefaultLocalResourcesCopyConfigurer.
JavaConfig:
public void configure(YarnResourceLocalizerConfigure localizer) throws Exception {
localizer
.withCopy()
.copy("foo.jar", "/tmp", true);
}
XML:
<yarn:localresources>
<:hdfs path="/tmp/foo.jar" staging="false"/>
</yarn:localresources>
- Specified by:
withCopy in interface YarnResourceLocalizerConfigurer
- Returns:
LocalResourcesCopyConfigurer for chaining
- Throws:
Exception - if error occurred
withHdfs
public LocalResourcesHdfsConfigurer withHdfs()
throws Exception
- Description copied from interface:
YarnResourceLocalizerConfigurer
- Specify configuration options as properties with a
DefaultLocalResourcesCopyConfigurer.
JavaConfig:
public void configure(YarnResourceLocalizerConfigure localizer) throws Exception {
localizer
.withHdfs()
.hdfs("/tmp/foo.jar");
}
XML:
<yarn:localresources>
<:hdfs path="/tmp/foo.jar" staging="false"/>
</yarn:localresources>
- Specified by:
withHdfs in interface YarnResourceLocalizerConfigurer
- Returns:
LocalResourcesCopyConfigurer for chaining
- Throws:
Exception - if error occurred
stagingDirectory
public YarnResourceLocalizerConfigurer stagingDirectory(String stagingDirectory)
- Specified by:
stagingDirectory in interface YarnResourceLocalizerConfigurer
configuration
public void configuration(Configuration configuration)
defaultLocalResourceType
public YarnResourceLocalizerConfigurer defaultLocalResourceType(LocalResourceType type)
defaultLocalResourceVisibility
public YarnResourceLocalizerConfigurer defaultLocalResourceVisibility(LocalResourceVisibility visibility)
setCopyEntries
public void setCopyEntries(Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries)
setHdfsEntries
public void setHdfsEntries(Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries)
setRawCopyEntries
public void setRawCopyEntries(Collection<LocalResourcesFactoryBean.RawCopyEntry> rawEntries)