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, setSharedObject
build, getObject
public YarnResourceLocalizerBuilder()
protected ResourceLocalizer performBuild() throws java.lang.Exception
AbstractConfiguredAnnotationBuilder
performBuild
in class AbstractConfiguredAnnotationBuilder<ResourceLocalizer,YarnResourceLocalizerConfigurer,YarnResourceLocalizerBuilder>
java.lang.Exception
- on errorpublic LocalResourcesCopyConfigurer withCopy() throws java.lang.Exception
YarnResourceLocalizerConfigurer
DefaultLocalResourcesCopyConfigurer
.
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 YarnResourceLocalizerConfigurer
LocalResourcesCopyConfigurer
for chainingjava.lang.Exception
- if error occurredpublic LocalResourcesHdfsConfigurer withHdfs() throws java.lang.Exception
YarnResourceLocalizerConfigurer
DefaultLocalResourcesHdfsConfigurer
.
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 YarnResourceLocalizerConfigurer
LocalResourcesHdfsConfigurer
for chainingjava.lang.Exception
- if error occurredpublic LocalResourcesHdfsConfigurer withHdfs(java.lang.String id) throws java.lang.Exception
YarnResourceLocalizerConfigurer
DefaultLocalResourcesHdfsConfigurer
with an identifier.withHdfs
in interface YarnResourceLocalizerConfigurer
id
- the identifierLocalResourcesHdfsConfigurer
for chainingjava.lang.Exception
- if error occurredYarnResourceLocalizerConfigurer.withHdfs()
public YarnResourceLocalizerConfigurer stagingDirectory(java.lang.String stagingDirectory)
YarnResourceLocalizerConfigurer
stagingDirectory
in interface YarnResourceLocalizerConfigurer
stagingDirectory
- 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)