/** * Creates a Graph from CSV input with edge values, but without vertex values. * @param vertexKey the type of the vertex IDs * @param edgeValue the type of the edge values * @return a Graph where the edges are read from an edges CSV file (with values). */ public <K, EV> Graph<K, NullValue, EV> edgeTypes(Class<K> vertexKey, Class<EV> edgeValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Tuple3<K, K, EV>> edges = edgeReader .types(vertexKey, vertexKey, edgeValue) .name(GraphCsvReader.class.getName()); return Graph.fromTupleDataSet(edges, executionContext); }
.name(GraphCsvReader.class.getName()); return Graph.fromTupleDataSet(vertices, edges, executionContext); return Graph.fromTupleDataSet(edges, (MapFunction<K, VV>) mapper, executionContext);
Graph<String, NullValue, Integer> userSongGraph = Graph.fromTupleDataSet(validTriplets, env);
/** * Creates a Graph from CSV input with edge values, but without vertex values. * @param vertexKey the type of the vertex IDs * @param edgeValue the type of the edge values * @return a Graph where the edges are read from an edges CSV file (with values). */ public <K, EV> Graph<K, NullValue, EV> edgeTypes(Class<K> vertexKey, Class<EV> edgeValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Tuple3<K, K, EV>> edges = edgeReader .types(vertexKey, vertexKey, edgeValue) .name(GraphCsvReader.class.getName()); return Graph.fromTupleDataSet(edges, executionContext); }
/** * Creates a Graph from CSV input with edge values, but without vertex values. * @param vertexKey the type of the vertex IDs * @param edgeValue the type of the edge values * @return a Graph where the edges are read from an edges CSV file (with values). */ public <K, EV> Graph<K, NullValue, EV> edgeTypes(Class<K> vertexKey, Class<EV> edgeValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Tuple3<K, K, EV>> edges = edgeReader .types(vertexKey, vertexKey, edgeValue) .name(GraphCsvReader.class.getName()); return Graph.fromTupleDataSet(edges, executionContext); }
/** * Creates a Graph from CSV input with edge values, but without vertex values. * @param vertexKey the type of the vertex IDs * @param edgeValue the type of the edge values * @return a Graph where the edges are read from an edges CSV file (with values). */ public <K, EV> Graph<K, NullValue, EV> edgeTypes(Class<K> vertexKey, Class<EV> edgeValue) { if (edgeReader == null) { throw new RuntimeException("The edge input file cannot be null!"); } DataSet<Tuple3<K, K, EV>> edges = edgeReader .types(vertexKey, vertexKey, edgeValue) .name(GraphCsvReader.class.getName()); return Graph.fromTupleDataSet(edges, executionContext); }
.name(GraphCsvReader.class.getName()); return Graph.fromTupleDataSet(vertices, edges, executionContext); return Graph.fromTupleDataSet(edges, (MapFunction<K, VV>) mapper, executionContext);
.name(GraphCsvReader.class.getName()); return Graph.fromTupleDataSet(vertices, edges, executionContext); return Graph.fromTupleDataSet(edges, (MapFunction<K, VV>) mapper, executionContext);
.name(GraphCsvReader.class.getName()); return Graph.fromTupleDataSet(vertices, edges, executionContext); return Graph.fromTupleDataSet(edges, (MapFunction<K, VV>) mapper, executionContext);