public interface YarnResourceLocalizerConfigurer
YarnResourceLocalizerBuilder
used from
a SpringYarnConfigurerAdapter
.
Typically configuration is used as shown below.
@Configuration @EnableYarn static class Config extends SpringYarnConfigurerAdapter { @Override public void configure(YarnResourceLocalizerConfigure localizer) throws Exception { localizer .withCopy() .copy("foo.jar", "/tmp", true) .and() .withHdfs() .hdfs("/tmp/foo.jar"); } }
Modifier and Type | Method and Description |
---|---|
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. |
LocalResourcesCopyConfigurer withCopy() throws java.lang.Exception
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>
LocalResourcesCopyConfigurer
for chainingjava.lang.Exception
- if error occurredLocalResourcesHdfsConfigurer withHdfs() throws java.lang.Exception
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>
LocalResourcesHdfsConfigurer
for chainingjava.lang.Exception
- if error occurredLocalResourcesHdfsConfigurer withHdfs(java.lang.String id) throws java.lang.Exception
DefaultLocalResourcesHdfsConfigurer
with an identifier.id
- the identifierLocalResourcesHdfsConfigurer
for chainingjava.lang.Exception
- if error occurredwithHdfs()
YarnResourceLocalizerConfigurer stagingDirectory(java.lang.String stagingDirectory) throws java.lang.Exception
stagingDirectory
- the staging directoryYarnResourceLocalizerConfigurer
for chainingjava.lang.Exception
- if error occurred