public static < K > Graph < K , NullValue , NullValue > fromTuple2DataSet ( DataSet < Tuple2 < K , K > > edges , ExecutionEnvironment context ) { DataSet < Edge < K , NullValue > > edgeDataSet = edges . map ( new Tuple2ToEdgeMap <> ( ) ) . name ( "To Edge" ) ; return fromDataSet ( edgeDataSet , context ) ; }
Creates a graph from a DataSet of Tuple2 objects for edges . Each Tuple2 will become one Edge where the source ID will be the first field of the Tuple2 and the target ID will be the second field of the Tuple2 .