private static Logger LOG = Logger.getLogger(OozieWorkflowBuilder.class);
protected static final ConfigurationStore configStore = ConfigurationStore.get();
protected Properties createAppProperties(String clusterName, Path bundlePath, String user) throws IvoryException {
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("ivory.libpath", ClusterHelper.getLocation(cluster, "working") + "/lib");
LOG.info("Cluster: " + cluster.getName() + ", PROPS: " + properties);
return properties;
}