Package org.springframework.yarn.config.annotation.configurers

Examples of org.springframework.yarn.config.annotation.configurers.LocalResourcesHdfsConfigurer


        .stagingDirectory(syp.getStagingDir())
        .withCopy()
          .copy(StringUtils.toStringArray(sycp.getFiles()), applicationDir, applicationDir == null)
          .raw(unescapeMapKeys(syclp.getRawFileContents()), applicationDir);

      LocalResourcesHdfsConfigurer withHdfs = localizer.withHdfs();
      for (Entry e : localResourcesSelector.select(applicationDir != null ? applicationDir : "/")) {
        withHdfs.hdfs(e.getPath(), e.getType(), applicationDir == null);
      }
    }
View Full Code Here


    @Override
    public void configure(YarnResourceLocalizerConfigurer localizer) throws Exception {
      String applicationDir = SpringYarnBootUtils.resolveApplicationdir(syp);
      localizer
        .stagingDirectory(syp.getStagingDir());
      LocalResourcesHdfsConfigurer withHdfs = localizer.withHdfs();
      for (Entry e : localResourcesSelector.select(applicationDir != null ? applicationDir : "/")) {
        withHdfs.hdfs(e.getPath(), e.getType(), applicationDir == null);
      }

      if (syap.getContainercluster() != null && localResourcesSelector instanceof MultiLocalResourcesSelector && syap.getContainercluster().getClusters() != null) {
        MultiLocalResourcesSelector selector = ((MultiLocalResourcesSelector)localResourcesSelector);
        for (java.util.Map.Entry<String, ContainerClustersProperties> entry : syap.getContainercluster().getClusters().entrySet()) {
          withHdfs = localizer.withHdfs(entry.getKey());
          for (Entry e : selector.select(entry.getKey(), applicationDir != null ? applicationDir : "/")) {
            withHdfs.hdfs(e.getPath(), e.getType(), applicationDir == null);
          }
        }
      }
    }
View Full Code Here

TOP

Related Classes of org.springframework.yarn.config.annotation.configurers.LocalResourcesHdfsConfigurer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.