}
protected abstract Map<String, String> getEntityProperties();
public boolean map(Cluster cluster, Path bundlePath) throws FalconException {
BUNDLEAPP bundleApp = new BUNDLEAPP();
bundleApp.setName(EntityUtil.getWorkflowName(entity).toString());
// all the properties are set prior to bundle and coordinators creation
List<COORDINATORAPP> coordinators = getCoordinators(cluster, bundlePath);
if (coordinators.size() == 0) {
return false;
}
for (COORDINATORAPP coordinatorapp : coordinators) {
Path coordPath = getCoordPath(bundlePath, coordinatorapp.getName());
String coordXmlName = marshal(cluster, coordinatorapp, coordPath,
EntityUtil.getWorkflowNameSuffix(coordinatorapp.getName(), entity));
createLogsDir(cluster, coordPath); //create logs dir
// copy falcon libs to the workflow dir
copySharedLibs(cluster, coordinatorapp);
// add the coordinator to the bundle
COORDINATOR bundleCoord = new COORDINATOR();
bundleCoord.setName(coordinatorapp.getName());
bundleCoord.setAppPath(getStoragePath(coordPath) + "/" + coordXmlName);
bundleApp.getCoordinator().add(bundleCoord);
}
marshal(cluster, bundleApp, bundlePath); // write the bundle
return true;
}