List<String> inputFeeds = new ArrayList<String>();
List<String> inputPaths = new ArrayList<String>();
List<String> inputFeedStorageTypes = new ArrayList<String>();
for (Input input : process.getInputs().getInputs()) {
Feed feed = EntityUtil.getEntity(EntityType.FEED, input.getFeed());
Storage storage = FeedHelper.createStorage(cluster, feed);
if (!input.isOptional()) {
if (coord.getDatasets() == null) {
coord.setDatasets(new DATASETS());
}
if (coord.getInputEvents() == null) {
coord.setInputEvents(new INPUTEVENTS());
}
SYNCDATASET syncdataset = createDataSet(feed, cluster, storage, input.getName(), LocationType.DATA);
coord.getDatasets().getDatasetOrAsyncDataset().add(syncdataset);
DATAIN datain = createDataIn(input);
coord.getInputEvents().getDataIn().add(datain);
}
String inputExpr = null;
if (storage.getType() == Storage.TYPE.FILESYSTEM) {
inputExpr = getELExpression("dataIn('" + input.getName() + "', '" + input.getPartition() + "')");
props.put(input.getName(), inputExpr);
} else if (storage.getType() == Storage.TYPE.TABLE) {
inputExpr = "${coord:dataIn('" + input.getName() + "')}";
propagateCatalogTableProperties(input, (CatalogStorage) storage, props);
}
inputFeeds.add(input.getName());
inputPaths.add(inputExpr);
inputFeedStorageTypes.add(storage.getType().name());
}
propagateLateDataProperties(inputFeeds, inputPaths, inputFeedStorageTypes, props);
}