}
@Override
protected void afterConfigure(ClusterActionEvent event) throws IOException {
ClusterSpec clusterSpec = event.getClusterSpec();
Cluster cluster = event.getCluster();
Instance resourceManager = cluster.getInstanceMatching(role(ROLE));
LOG.info("Resource manager web UI available at http://{}:{}",
resourceManager.getPublicHostName(), RESOURCE_MANAGER_WEB_UI_PORT);
Properties mrConfig = createClientSideMapReduceProperties(clusterSpec);
createClientSideMapReduceSiteFile(clusterSpec, mrConfig);
Properties yarnConfig = createClientSideYarnProperties(clusterSpec, resourceManager);
createClientSideYarnSiteFile(clusterSpec, yarnConfig);
Properties combined = new Properties();
combined.putAll(cluster.getConfiguration());
combined.putAll(mrConfig);
combined.putAll(yarnConfig);
event.setCluster(new Cluster(cluster.getInstances(), combined));
}