@Override
public void run(Nimbus.Iface nimbus) throws Exception {
List<TopologySummary> topologies = nimbus.getClusterInfo().get_topologies();
if (topologies == null || topologies.isEmpty()) {
System.out.println("No topologies running.");
} else {
System.out.printf(MSG_FORMAT, "Topology_name", "Status", "Num_tasks", "Num_workers", "Uptime_secs", "Topology_Id", "Owner");
System.out.println("----------------------------------------------------------------------------------------");
for (TopologySummary topology : topologies) {
System.out.printf(MSG_FORMAT, topology.get_name(), topology.get_status(),
topology.get_num_tasks(), topology.get_num_workers(),
topology.get_uptime_secs(), topology.get_id(),
topology.get_owner());
}
}
}
});