Package org.springframework.yarn.fs.LocalResourcesFactoryBean

Examples of org.springframework.yarn.fs.LocalResourcesFactoryBean.TransferEntry


    CopyEntry entry = new CopyEntry("classpath:/test-site-1.xml", dir, false);
    copyEntries.add(entry);
    factory.setCopyEntries(copyEntries);

    List<TransferEntry> transferEntries = new ArrayList<TransferEntry>();
    TransferEntry tEntry = new TransferEntry(null, null, dir + "/test-site-1.xml", false);
    transferEntries.add(tEntry);
    factory.setHdfsEntries(transferEntries);

    factory.afterPropertiesSet();
    SmartResourceLocalizer localizer = (SmartResourceLocalizer) factory.getObject();
View Full Code Here


    CopyEntry entry = new CopyEntry("classpath:/test-site-1.xml", null, true);
    copyEntries.add(entry);
    factory.setCopyEntries(copyEntries);

    List<TransferEntry> transferEntries = new ArrayList<TransferEntry>();
    TransferEntry tEntry = new TransferEntry(null, null, "/test-site-1.xml", true);
    transferEntries.add(tEntry);
    factory.setHdfsEntries(transferEntries);

    factory.afterPropertiesSet();
    SmartResourceLocalizer localizer = (SmartResourceLocalizer) factory.getObject();
View Full Code Here

    CopyEntry entry = new CopyEntry("classpath:/test-site-1.xml", null, true);
    copyEntries.add(entry);
    factory.setCopyEntries(copyEntries);

    List<TransferEntry> transferEntries = new ArrayList<TransferEntry>();
    TransferEntry tEntry = new TransferEntry(null, null, "/test-site-1.xml", true);
    transferEntries.add(tEntry);
    factory.setHdfsEntries(transferEntries);
    factory.afterPropertiesSet();

    SmartResourceLocalizer localizer = (SmartResourceLocalizer) factory.getObject();
View Full Code Here

    CopyEntry entry = new CopyEntry("classpath:/test-site-1.xml", null, true);
    copyEntries.add(entry);
    factory.setCopyEntries(copyEntries);

    List<TransferEntry> transferEntries = new ArrayList<TransferEntry>();
    TransferEntry tEntry = new TransferEntry(null, null, "/test-site-1.xml", true);
    transferEntries.add(tEntry);
    factory.setHdfsEntries(transferEntries);
    factory.afterPropertiesSet();

    SmartResourceLocalizer localizer = (SmartResourceLocalizer) factory.getObject();
View Full Code Here

  }

  @Override
  public LocalResourcesHdfsConfigurer hdfs(String path) {
    if (StringUtils.hasText(path)) {
      hdfsEntries.add(new TransferEntry(null, null, path, false));
    }
    return this;
  }
View Full Code Here

  }

  @Override
  public LocalResourcesHdfsConfigurer hdfs(String path, LocalResourceType type) {
    if (StringUtils.hasText(path)) {
      hdfsEntries.add(new TransferEntry(type, null, path, false));
    }
    return this;
  }
View Full Code Here

  }

  @Override
  public LocalResourcesHdfsConfigurer hdfs(String path, LocalResourceType type, boolean staging) {
    if (StringUtils.hasText(path)) {
      hdfsEntries.add(new TransferEntry(type, null, path, staging));
    }
    return this;
  }
View Full Code Here

    Collection<TransferEntry> hdfsEntries = TestUtils.readField("hdfsEntries", defaultLocalResourcesFactoryBean);
    assertNotNull(hdfsEntries);
    assertThat(hdfsEntries.size(), is(1));

    TransferEntry entry = (TransferEntry) hdfsEntries.toArray()[0];
    String path = TestUtils.readField("path", entry);
    assertThat(path, is("/tmp/foo.jar"));
    LocalResourceType type = TestUtils.readField("type", entry);
    assertThat(type, is(LocalResourceType.FILE));
    LocalResourceVisibility visibility = TestUtils.readField("visibility", entry);
View Full Code Here

    Collection<TransferEntry> hdfsEntries = TestUtils.readField("hdfsEntries", localResourcesFactoryBeanWithGlobal);
    assertNotNull(hdfsEntries);
    assertThat(hdfsEntries.size(), is(1));

    TransferEntry entry = (TransferEntry) hdfsEntries.toArray()[0];
    String path = TestUtils.readField("path", entry);
    assertThat(path, is("/tmp/foo.jar"));
    LocalResourceType type = TestUtils.readField("type", entry);
    assertThat(type, is(LocalResourceType.ARCHIVE));
    LocalResourceVisibility visibility = TestUtils.readField("visibility", entry);
View Full Code Here

    Collection<TransferEntry> hdfsEntries = TestUtils.readField("hdfsEntries", localResourcesFactoryBeanWithMixed);
    assertNotNull(hdfsEntries);
    assertThat(hdfsEntries.size(), is(3));

    TransferEntry entry = (TransferEntry) hdfsEntries.toArray()[0];
    String path = TestUtils.readField("path", entry);
    assertThat(path, is("/tmp/foo.jar"));
    LocalResourceType type = TestUtils.readField("type", entry);
    assertThat(type, is(LocalResourceType.FILE));
    LocalResourceVisibility visibility = TestUtils.readField("visibility", entry);
View Full Code Here

TOP

Related Classes of org.springframework.yarn.fs.LocalResourcesFactoryBean.TransferEntry

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.