New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[#876] added print for logical graph and graph collection #913
Conversation
String graphString = encoder.graphToGDLString(); | ||
System.out.println(graphString); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary white space
public void write(LogicalGraph logicalGraph) throws IOException { | ||
write(logicalGraph, false); | ||
} | ||
/** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
white space between 'end of method' and 'java doc comment' -> same below
@Test | ||
public void testWrite() throws Exception { | ||
String gdlPath = GDLDataSinkTest.class | ||
.getResource("/data/text/socialgraph.gdl") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use getSocialNetworkLoader to receive a already contained social network graph
/** | ||
* Contains classes related to the input and output of data in the gdl format. | ||
*/ | ||
package org.gradoop.flink.io.impl.text; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor comment: It only provides classes related to the output, right? Also wouldn't gdl
instead of text
be a better name for the package? (The javadoc mentions the format, so it should okay.)
/** | ||
* Prints the GDL formatted graph to the standard output. | ||
*/ | ||
public void print() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing @throws
Javadoc comment
dc7e016
to
7a68cde
Compare
@@ -71,9 +71,9 @@ public void write(LogicalGraph graph, boolean overwrite) throws IOException { | |||
} | |||
|
|||
@Override | |||
public void write(GraphCollection graphCollection, boolean overWrite) throws IOException { | |||
public void write(GraphCollection graphCollection, boolean overwrite) throws IOException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you changed this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
consistency with the other methods
/** | ||
* A data sink that writes a graph or graph collection to a gdl formatted string. | ||
* It is executed with a parallelism of 1, and therefore limited to smaller graphs. | ||
* Shared elements in graph collections are converted to multiple elements in the resulting gdl. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Shared element in graph collections are printed multiple times but share a unique identifier.
e.g.
v0 with label "Person" contained in graph g0 and g1
v1 with label "Person" contained only in graph g1
Resulting GDLString: "
g0[
v0_Person_0
]
g1[
v0_Person_0
v1_Person_1
]
"v0_Person_0 refers to the same materialized vertex contained in two graphs."
} | ||
|
||
/** | ||
* Returns the gdl formatted vertice including the properties and the label on first occurrence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo "vertex"
@@ -21,7 +21,7 @@ | |||
|
|||
/** | |||
* string representation of a vertex | |||
* @param <V> graph head type | |||
* @param <V> vertex type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WhiteSpace between JDoc comment and @param
tag
@@ -21,7 +21,7 @@ | |||
|
|||
/** | |||
* string representation of a vertex | |||
* @param <V> graph head type | |||
* @param <V> vertex type | |||
*/ | |||
public interface VertexToString<V extends Vertex> | |||
extends FlatMapFunction<V, VertexString> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extends can be inline with interface definition
7a68cde
to
c46323a
Compare
### Release 0.4.1 * [#877] added support for property value null (#908) fixes #877 * [#856] property pushdown hbase (#906) fixes #856 * [#864] Change examples to use csv (#905) fixes #864 * [#494] Add Set support to PropertyValue (#916) fixes #494 * [#888] Minor changes to Tuple-related functions. (#912) fixes #888 * [#779] Add code coverage for Gradoop (#914) fixes #779 * [#702] Add support for graphs without edges to TLFDataSource (#921) fixes #702 * [#909] Remove Flink dependency for store instance (#918) fixes #909 * [#876] added print for logical graph and graph collection (#913) fixes #876 * [#857] logical predicate chaining hbase (#920) fixes #857 * [#926] added argLine to maven properties (fix ide testing bug) (#929) fixes #926 * [#794] include new benchmark classes (#904) fixes #794 * [#312] example program for aggregation (#925) fixes #312 * [#901] Add SamplingConstants, AggregationConstants (#934) fixed #901 * [#935] Add tests for containment functions (#941) fixes #935 * [#900] Refactor sampling tests. (#907) fixes #900 * [#936] Generalized RollUp and DrillDown (#939) fixes #936 * [#947] Fix PageRank wrapper and add a test. (#949) fixes #947 * [#942] graph density computation for sampling evaluation (#946) fixes #942 * [#954] prepare minor release (#955) fixes #954
### Release 0.4.1 * [dbs-leipzig#877] added support for property value null (dbs-leipzig#908) fixes dbs-leipzig#877 * [dbs-leipzig#856] property pushdown hbase (dbs-leipzig#906) fixes dbs-leipzig#856 * [dbs-leipzig#864] Change examples to use csv (dbs-leipzig#905) fixes dbs-leipzig#864 * [dbs-leipzig#494] Add Set support to PropertyValue (dbs-leipzig#916) fixes dbs-leipzig#494 * [dbs-leipzig#888] Minor changes to Tuple-related functions. (dbs-leipzig#912) fixes dbs-leipzig#888 * [dbs-leipzig#779] Add code coverage for Gradoop (dbs-leipzig#914) fixes dbs-leipzig#779 * [dbs-leipzig#702] Add support for graphs without edges to TLFDataSource (dbs-leipzig#921) fixes dbs-leipzig#702 * [dbs-leipzig#909] Remove Flink dependency for store instance (dbs-leipzig#918) fixes dbs-leipzig#909 * [dbs-leipzig#876] added print for logical graph and graph collection (dbs-leipzig#913) fixes dbs-leipzig#876 * [dbs-leipzig#857] logical predicate chaining hbase (dbs-leipzig#920) fixes dbs-leipzig#857 * [dbs-leipzig#926] added argLine to maven properties (fix ide testing bug) (dbs-leipzig#929) fixes dbs-leipzig#926 * [dbs-leipzig#794] include new benchmark classes (dbs-leipzig#904) fixes dbs-leipzig#794 * [dbs-leipzig#312] example program for aggregation (dbs-leipzig#925) fixes dbs-leipzig#312 * [dbs-leipzig#901] Add SamplingConstants, AggregationConstants (dbs-leipzig#934) fixed dbs-leipzig#901 * [dbs-leipzig#935] Add tests for containment functions (dbs-leipzig#941) fixes dbs-leipzig#935 * [dbs-leipzig#900] Refactor sampling tests. (dbs-leipzig#907) fixes dbs-leipzig#900 * [dbs-leipzig#936] Generalized RollUp and DrillDown (dbs-leipzig#939) fixes dbs-leipzig#936 * [dbs-leipzig#947] Fix PageRank wrapper and add a test. (dbs-leipzig#949) fixes dbs-leipzig#947 * [dbs-leipzig#942] graph density computation for sampling evaluation (dbs-leipzig#946) fixes dbs-leipzig#942 * [dbs-leipzig#954] prepare minor release (dbs-leipzig#955) fixes dbs-leipzig#954
Added
print()
toLogicalGraph
andGraphCollection
to print a GDL formatted string to the console.