Github user fhueske commented on a diff in the pull request: https://github.com/apache/flink/pull/1205#discussion_r41377804 --- Diff: flink-staging/flink-gelly-scala/src/main/scala/org/apache/flink/graph/scala/Graph.scala --- @@ -126,6 +126,131 @@ object Graph { wrapGraph(jg.Graph.fromTupleDataSet[K, VV, EV](javaTupleEdges, mapper, env.getJavaEnv)) } + /** + * Creates a Graph with from a CSV file of vertices and a CSV file of edges + * + * @param pathVertices The file path containing the vertices. + * @param readVertices Defines whether the vertices have associated values. + * If set to false, the vertex input is ignored and vertices are created from the edges file. + * @param lineDelimiterVertices The string that separates lines in the vertices file. + * It defaults to newline. + * @param fieldDelimiterVertices The string that separates vertex Ids from vertex values + * in the vertices file. + * @param quoteCharacterVertices The character to use for quoted String parsing + * in the vertices file. Disabled by default. + * @param ignoreFirstLineVertices Whether the first line in the vertices file should be ignored. + * @param ignoreCommentsVertices Lines that start with the given String in the vertices file + * are ignored, disabled by default. + * @param lenientVertices Whether the parser should silently ignore malformed lines in the + * vertices file. + * @param includedFieldsVertices The fields in the vertices file that should be read. + * By default all fields are read. + * @param pathEdges The file path containing the edges. + * @param hasEdgeValues Defines whether the edges have associated values. True by default. + * @param lineDelimiterEdges The string that separates lines in the edges file. + * It defaults to newline. + * @param fieldDelimiterEdges The string that separates fileds in the edges file. + * @param quoteCharacterEdges The character to use for quoted String parsing + * in the edges file. Disabled by default. + * @param ignoreFirstLineEdges Whether the first line in the vertices file should be ignored. + * @param ignoreCommentsEdges Lines that start with the given String in the edges file + * are ignored, disabled by default. + * @param lenientEdges Whether the parser should silently ignore malformed lines in the + * edges file. + * @param includedFieldsEdges The fields in the edges file that should be read. + * By default all fields are read. + * + */ + // scalastyle:off + // This method exceeds the max allowed number of parameters --> + def fromCsvReader[K: TypeInformation : ClassTag, VV: TypeInformation : ClassTag, + EV: TypeInformation : ClassTag]( + pathVertices: String = null, --- End diff -- Should we change the order of the parameters and move the most common once first? This will allow to specify some parameters without names. How about: - pathEdges (mandatory) - readVertices - pathVertices - hasEdgeValues - ... (the others in the current order)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---