Package org.springframework.xd.test.fixtures

Examples of org.springframework.xd.test.fixtures.SimpleFileSource


   * @return new SimpleFileSource
   */
  public SimpleFileSource file(String dir, String fileName) {
    Assert.notNull(dir, "dir should not be null");
    Assert.hasText(fileName, "fileName should not be empty nor null");
    return new SimpleFileSource(dir, fileName);
  }
View Full Code Here


    String data = UUID.randomUUID().toString();
    String jobName = "tfphj" + UUID.randomUUID().toString();
    String sourceFileName = UUID.randomUUID().toString() + ".out";
    String sourceDir = "/tmp/xd/" + FilePollHdfsJob.DEFAULT_FILE_NAME;

    SimpleFileSource fileSource = sources.file(sourceDir, sourceFileName).reference(true);
    job(jobName, jobs.filePollHdfsJob(DEFAULT_NAMES).toDSL(), true);
    stream(fileSource + XD_TAP_DELIMITER + " queue:job:" + jobName);
    //Since the job may be on a different container you will have to copy the file to the job's container.
    setupDataFiles(getContainerHostForJob(jobName), sourceDir, sourceFileName, data);
    //Copy file to source container instance.
View Full Code Here

TOP

Related Classes of org.springframework.xd.test.fixtures.SimpleFileSource

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.