RoutingTable routingTable = clusterState.routingTable();
PrintWriter writer = new PrintWriter(dump.createFileWriter("cluster.txt"));
writer.println("===== CLUSTER NODES ======");
writer.print(nodes.prettyPrint());
writer.println("===== ROUTING TABLE ======");
writer.print(routingTable.prettyPrint());
writer.close();