private void openJobBrowser() { if (allInstancesUp() == false) { JOptionPane.showMessageDialog(this, "Sorry, cluster is not (completely) up"); } try { EC2Agent agent = new EC2Agent(); Cluster cluster = agent.getRunningInstances(false); cluster.assignRoles(); if (cluster.getJobTracker() != null) { UtilUI.openBrowser(this, "http://" + cluster.getJobTracker().getDnsName() + ":50030"); } } catch (Exception e) { e.printStackTrace(System.out); } }
private boolean allInstancesUp() { EC2Agent agent = new EC2Agent(); Cluster cluster = agent.getRunningInstances(true); return cluster.size() == agent.getClusterSize() && cluster.getInitializedCount() == agent.getClusterSize(); }