private String getEdges(Vertex<Text, Text, NullWritable> vertex) {
        StringBuilder sb = new StringBuilder();
        for (Edge<Text, NullWritable> edge : vertex.getEdges()) {
            sb.append(sb.length() > 0 ? ", " : "");
            sb.append(edge.getTargetVertexId());
        }
        return sb.toString();
    }