protected void beforeConfigure(ClusterActionEvent event) throws IOException, InterruptedException {
ClusterSpec clusterSpec = event.getClusterSpec();
Cluster cluster = event.getCluster();
LOG.info("Authorizing firewall");
Instance instance = cluster.getInstanceMatching(role(ROLE));
InetAddress namenodePublicAddress = instance.getPublicAddress();
InetAddress jobtrackerPublicAddress = namenodePublicAddress;
ComputeServiceContext computeServiceContext =
ComputeServiceContextBuilder.build(clusterSpec);
FirewallSettings.authorizeIngress(computeServiceContext, instance, clusterSpec,