private static final Logger LOG = Logger.getLogger(OozieWorkflowBuilder.class);
protected static final ConfigurationStore CONFIG_STORE = ConfigurationStore.get();
protected Properties createAppProperties(String clusterName, Path bundlePath, String user) throws FalconException {
Cluster cluster = EntityUtil.getEntity(EntityType.CLUSTER, clusterName);
Properties properties = new Properties();
if (cluster.getProperties() != null) {
addClusterProperties(properties, cluster.getProperties()
.getProperties());
}
properties.setProperty(OozieWorkflowEngine.NAME_NODE,
ClusterHelper.getStorageUrl(cluster));
properties.setProperty(OozieWorkflowEngine.JOB_TRACKER,
ClusterHelper.getMREndPoint(cluster));
properties.setProperty(OozieClient.BUNDLE_APP_PATH,
"${" + OozieWorkflowEngine.NAME_NODE + "}" + bundlePath.toString());
properties.setProperty("colo.name", cluster.getColo());
properties.setProperty(OozieClient.USER_NAME, user);
properties.setProperty(OozieClient.USE_SYSTEM_LIBPATH, "true");
properties.setProperty("falcon.libpath", ClusterHelper.getLocation(cluster, "working") + "/lib");
LOG.info("Cluster: " + cluster.getName() + ", PROPS: " + properties);
return properties;
}