public final class YarnResourceLocalizerBuilder extends AbstractConfiguredAnnotationBuilder<ResourceLocalizer,YarnResourceLocalizerConfigurer,YarnResourceLocalizerBuilder> implements YarnResourceLocalizerConfigurer
| Constructor and Description |
|---|
YarnResourceLocalizerBuilder()
Instantiates a new yarn resource localizer builder.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configuration(org.apache.hadoop.conf.Configuration configuration) |
YarnResourceLocalizerConfigurer |
defaultLocalResourceType(org.apache.hadoop.yarn.api.records.LocalResourceType type) |
YarnResourceLocalizerConfigurer |
defaultLocalResourceVisibility(org.apache.hadoop.yarn.api.records.LocalResourceVisibility visibility) |
protected ResourceLocalizer |
performBuild()
Subclasses must implement this method to build the object that is being returned.
|
void |
setCopyEntries(java.util.Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries) |
void |
setHdfsEntries(java.util.Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries) |
void |
setHdfsEntries(java.lang.String id,
java.util.Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries) |
void |
setRawCopyEntries(java.util.Collection<LocalResourcesFactoryBean.RawCopyEntry> rawEntries) |
YarnResourceLocalizerConfigurer |
stagingDirectory(java.lang.String stagingDirectory)
Specify a staging directory.
|
LocalResourcesCopyConfigurer |
withCopy()
Specify configuration options as properties with a
DefaultLocalResourcesCopyConfigurer. |
LocalResourcesHdfsConfigurer |
withHdfs()
Specify configuration options as properties with a
DefaultLocalResourcesHdfsConfigurer. |
LocalResourcesHdfsConfigurer |
withHdfs(java.lang.String id)
Specify configuration options as properties with a
DefaultLocalResourcesHdfsConfigurer
with an identifier. |
apply, apply, beforeConfigureMains, beforeConfigurePosts, beforeInit, doBuild, getConfigurer, getConfigurers, getOrApply, getOrBuild, getSharedObject, getSharedObjects, objectPostProcessor, postProcess, removeConfigurer, removeConfigurers, setSharedObjectbuild, getObjectpublic YarnResourceLocalizerBuilder()
protected ResourceLocalizer performBuild() throws java.lang.Exception
AbstractConfiguredAnnotationBuilderperformBuild in class AbstractConfiguredAnnotationBuilder<ResourceLocalizer,YarnResourceLocalizerConfigurer,YarnResourceLocalizerBuilder>java.lang.Exceptionpublic LocalResourcesCopyConfigurer withCopy() throws java.lang.Exception
YarnResourceLocalizerConfigurerDefaultLocalResourcesCopyConfigurer.
public void configure(YarnResourceLocalizerConfigure localizer) throws Exception {
localizer
.withCopy()
.copy("foo.jar", "/tmp", true);
}
<yarn:localresources> <:hdfs path="/tmp/foo.jar" staging="false"/> </yarn:localresources>
withCopy in interface YarnResourceLocalizerConfigurerLocalResourcesCopyConfigurer for chainingjava.lang.Exception - if error occurredpublic LocalResourcesHdfsConfigurer withHdfs() throws java.lang.Exception
YarnResourceLocalizerConfigurerDefaultLocalResourcesHdfsConfigurer.
public void configure(YarnResourceLocalizerConfigure localizer) throws Exception {
localizer
.withHdfs()
.hdfs("/tmp/foo.jar");
}
<yarn:localresources> <:hdfs path="/tmp/foo.jar" staging="false"/> </yarn:localresources>
withHdfs in interface YarnResourceLocalizerConfigurerLocalResourcesHdfsConfigurer for chainingjava.lang.Exception - if error occurredpublic LocalResourcesHdfsConfigurer withHdfs(java.lang.String id) throws java.lang.Exception
YarnResourceLocalizerConfigurerDefaultLocalResourcesHdfsConfigurer
with an identifier.withHdfs in interface YarnResourceLocalizerConfigurerid - the identifierLocalResourcesHdfsConfigurer for chainingjava.lang.Exception - if error occurredYarnResourceLocalizerConfigurer.withHdfs()public YarnResourceLocalizerConfigurer stagingDirectory(java.lang.String stagingDirectory)
YarnResourceLocalizerConfigurerstagingDirectory in interface YarnResourceLocalizerConfigurerstagingDirectory - the staging directoryYarnResourceLocalizerConfigurer for chainingpublic void configuration(org.apache.hadoop.conf.Configuration configuration)
public YarnResourceLocalizerConfigurer defaultLocalResourceType(org.apache.hadoop.yarn.api.records.LocalResourceType type)
public YarnResourceLocalizerConfigurer defaultLocalResourceVisibility(org.apache.hadoop.yarn.api.records.LocalResourceVisibility visibility)
public void setCopyEntries(java.util.Collection<LocalResourcesFactoryBean.CopyEntry> copyEntries)
public void setHdfsEntries(java.util.Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries)
public void setHdfsEntries(java.lang.String id,
java.util.Collection<LocalResourcesFactoryBean.TransferEntry> transferEntries)
public void setRawCopyEntries(java.util.Collection<LocalResourcesFactoryBean.RawCopyEntry> rawEntries)