Skip to content
Permalink
Browse files

[#1111] added print operator to TemporalGraph and TemporalGraphCollec…

…tion + also added a missing log4j config in gradoop-temporal tests (#1377)

fixes #1111
  • Loading branch information...
ChrizZz110 authored and galpha committed Sep 2, 2019
1 parent 837e6d7 commit 62feb813b60f85b89ee9bcadad3d84d2c660602d
@@ -18,6 +18,7 @@
import org.apache.flink.api.java.DataSet;
import org.apache.flink.api.java.tuple.Tuple2;
import org.apache.flink.util.Preconditions;
import org.gradoop.flink.io.impl.gdl.GDLConsoleOutput;
import org.gradoop.flink.model.api.epgm.BaseGraph;
import org.gradoop.flink.model.api.epgm.BaseGraphCollectionFactory;
import org.gradoop.flink.model.api.epgm.BaseGraphFactory;
@@ -244,4 +245,13 @@ public static TemporalGraph fromLogicalGraph(LogicalGraph logicalGraph) {
return TemporalGradoopConfig.fromGradoopFlinkConfig(logicalGraph.getConfig()).getTemporalGraphFactory()
.fromNonTemporalGraph(logicalGraph);
}

/**
* Prints the GDL formatted graph to the standard output.
*
* @throws Exception forwarded from dataset print
*/
public void print() throws Exception {
GDLConsoleOutput.print(this);
}
}
@@ -17,6 +17,7 @@

import org.apache.flink.api.java.DataSet;
import org.apache.flink.util.Preconditions;
import org.gradoop.flink.io.impl.gdl.GDLConsoleOutput;
import org.gradoop.flink.model.api.epgm.BaseGraphCollection;
import org.gradoop.flink.model.api.epgm.BaseGraphCollectionFactory;
import org.gradoop.flink.model.api.epgm.BaseGraphFactory;
@@ -247,4 +248,13 @@ public static TemporalGraphCollection fromGraphCollection(GraphCollection graphC
return TemporalGradoopConfig.fromGradoopFlinkConfig(graphCollection.getConfig())
.getTemporalGraphCollectionFactory().fromNonTemporalGraphCollection(graphCollection);
}

/**
* Prints the GDL formatted graph collection to the standard output.
*
* @throws Exception forwarded from dataset print
*/
public void print() throws Exception {
GDLConsoleOutput.print(this);
}
}
@@ -0,0 +1,11 @@
# Set root logger level to OFF to not flood build logs
# set manually to INFO for debugging purposes
log4j.rootLogger=OFF, testlogger

log4j.category.org.gradoop=OFF

# A1 is set to be a ConsoleAppender.
log4j.appender.testlogger=org.apache.log4j.ConsoleAppender
log4j.appender.testlogger.target=System.out
log4j.appender.testlogger.layout=org.apache.log4j.PatternLayout
log4j.appender.testlogger.layout.ConversionPattern=%d{HH:mm:ss,SSS} [%t] %-5p %c{1} %x - %m%n

0 comments on commit 62feb81

Please sign in to comment.
You can’t perform that action at this time.