flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-2785) Implement Graph's fromCsvReader in Gelly-Scala
Date Tue, 06 Oct 2015 16:04:26 GMT

    [ https://issues.apache.org/jira/browse/FLINK-2785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14945256#comment-14945256

ASF GitHub Bot commented on FLINK-2785:

Github user fhueske commented on a diff in the pull request:

    --- Diff: docs/libs/gelly_guide.md ---
    @@ -194,6 +194,27 @@ val edgeTuples = env.readCsvFile[String, String, Double]("path/to/edge/input")
     val graph = Graph.fromTupleDataSet(vertexTuples, edgeTuples, env)
     {% endhighlight %}
    +* from a CSV file of Edge data and an optional CSV file of Vertex data. In this case,
Gelly will convert each row from the Edge CSV file to an `Edge`, where the first field will
be the source ID, the second field will be the target ID and the third field (if present)
will be the edge value. Equivalently, each row from the optional Vertex CSV file will be converted
to a `Vertex`, where the first field will be the vertex ID and the second field (if present)
will be the vertex value.
    +If the vertices have no associated value, set the `vertexValue` parameter to `false`.
If the edges have no associated value, set the `edgeValue` parameter to `false`.
    +{% highlight scala %}
    +val env = ExecutionEnvironment.getExecutionEnvironment
    +// create a Graph with String Vertex IDs, Long Vertex values and Double Edge values
    +val graph = Graph.fromCsvReader[String, Long, Double](
    +		pathVertices = "path/to/vertex/input",
    +		pathEdges = "path/to/edge/input",
    +		env = env)
    +// create a Graph with neither Vertex nor Edge values
    +val simpleGraph = Graph.fromCsvReader[Long, NullValue, NullVale](
    +		vertexValue = false,
    --- End diff --
    Is it necessary to set `vertexValue` to false if no vertex path is specified?

> Implement Graph's fromCsvReader in Gelly-Scala
> ----------------------------------------------
>                 Key: FLINK-2785
>                 URL: https://issues.apache.org/jira/browse/FLINK-2785
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Gelly
>            Reporter: Vasia Kalavri
>            Assignee: Vasia Kalavri
>            Priority: Minor
> Graphs's {{fromCsvReader}} method is currently missing from the Gelly Scala API. It cannot
be implemented as a simple wrapper over the Java method, because the Java method returns a
{{GraphCsvReader}}, which in return creates a Graph after specifying types with appropriate
methods. The Scala version of the method can be more nicely implemented using the {{ScalaCsvInputFormat}}.

This message was sent by Atlassian JIRA

View raw message