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(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(String id)
Specify configuration options as properties with a
DefaultLocalResourcesHdfsConfigurer
with an identifier. |
LocalResourcesCopyConfigurer withCopy() throws 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 chainingException - if error occurredLocalResourcesHdfsConfigurer withHdfs() throws 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 chainingException - if error occurredLocalResourcesHdfsConfigurer withHdfs(String id) throws Exception
DefaultLocalResourcesHdfsConfigurer
with an identifier.id - the identifierLocalResourcesHdfsConfigurer for chainingException - if error occurredwithHdfs()YarnResourceLocalizerConfigurer stagingDirectory(String stagingDirectory) throws Exception
stagingDirectory - the staging directoryYarnResourceLocalizerConfigurer for chainingException - if error occurred