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.