Skip to content
Snippets Groups Projects
Commit 2243bbbc authored by Sören Henning's avatar Sören Henning
Browse files

Fix #19

parent 04a7c739
No related branches found
No related tags found
1 merge request!17Get impletemented stages and Java 8
......@@ -7,6 +7,8 @@ import java.io.File;
import java.util.ArrayList;
import java.util.List;
import com.tinkerpop.blueprints.Graph;
import kieker.analysis.stage.tracediagnosis.AllowedRecordsFilter;
import kieker.analysis.stage.tracediagnosis.BeginEndOfMonitoringDetector;
import kieker.analysis.stage.tracediagnosis.OperationCallHandlerComposite;
......@@ -73,7 +75,7 @@ public class TraceAnalysisConfiguration extends Configuration {
String graphFilesOutputDir = "example/event monitoring log/output"; // TODO Temp hard coded
TraceTraverserStage traceTraverserStage = new TraceTraverserStage();
final Distributor<NamedGraph> graphDistributor = new Distributor<>(new CopyByReferenceStrategy());
final Distributor<NamedGraph<Graph>> graphDistributor = new Distributor<>(new CopyByReferenceStrategy());
GraphMLWriter graphMLWriter = new GraphMLWriter(graphFilesOutputDir);
DotGraphWriter dotGraphWriter = new DotGraphWriter(graphFilesOutputDir);
......@@ -83,7 +85,7 @@ public class TraceAnalysisConfiguration extends Configuration {
super.connectPorts(graphDistributor.getNewOutputPort(), dotGraphWriter.getInputPort());
AggrTraceTraverserStage aggrTraceTraverser = new AggrTraceTraverserStage();
final Distributor<NamedGraph> graphDistributor2 = new Distributor<>(new CopyByReferenceStrategy());
final Distributor<NamedGraph<Graph>> graphDistributor2 = new Distributor<>(new CopyByReferenceStrategy());
GraphMLWriter graphMLWriter2 = new GraphMLWriter(graphFilesOutputDir);
DotGraphWriter dotGraphWriter2 = new DotGraphWriter(graphFilesOutputDir);
......@@ -92,6 +94,9 @@ public class TraceAnalysisConfiguration extends Configuration {
super.connectPorts(graphDistributor2.getNewOutputPort(), graphMLWriter2.getInputPort());
super.connectPorts(graphDistributor2.getNewOutputPort(), dotGraphWriter2.getInputPort());
// DependencyCreatorStage dependencyCreatorStage = new DependencyCreatorStage();
// super.connectPorts(aggregation.getOutputPort(), dependencyCreatorStage.getInputPort());
/*
*
*
......
......@@ -20,7 +20,7 @@ public class DependencyCreatorStage extends AbstractTransformation<AggregatedTra
// TODO Update Statistics
operationsDependency.printDependcies();
// operationsDependency.printDependcies();
// operationsDependency.printOperations();
this.getOutputPort().send(operationsDependency);
......
......@@ -19,7 +19,7 @@ import kieker.analysis.util.DotBuilder;
import teetime.framework.AbstractConsumerStage;
public class DotGraphWriter extends AbstractConsumerStage<NamedGraph> {
public class DotGraphWriter extends AbstractConsumerStage<NamedGraph<Graph>> {
private final String outputDir;
......@@ -28,8 +28,8 @@ public class DotGraphWriter extends AbstractConsumerStage<NamedGraph> {
}
@Override
protected void execute(final NamedGraph graph) {
final String dotGraph = createDotGraph(graph.getGraph());
protected void execute(final NamedGraph<Graph> graph) {
final String dotGraph = createDotGraph(graph);
final String fileName = outputDir + "/" + graph.getFileName() + ".dot";
try {
......
......@@ -2,11 +2,13 @@ package kieker.analysis.trace.graphoutput;
import java.io.IOException;
import com.tinkerpop.blueprints.Graph;
import kieker.analysis.trace.traversal.NamedGraph;
import teetime.framework.AbstractConsumerStage;
public class GraphMLWriter extends AbstractConsumerStage<NamedGraph> {
public class GraphMLWriter extends AbstractConsumerStage<NamedGraph<Graph>> {
private final String outputDir;
......@@ -15,11 +17,11 @@ public class GraphMLWriter extends AbstractConsumerStage<NamedGraph> {
}
@Override
protected void execute(final NamedGraph graph) {
protected void execute(final NamedGraph<Graph> graph) {
String outputFile = outputDir + "/" + graph.getFileName() + ".xml";
com.tinkerpop.blueprints.util.io.graphml.GraphMLWriter writer = new com.tinkerpop.blueprints.util.io.graphml.GraphMLWriter(graph.getGraph());
com.tinkerpop.blueprints.util.io.graphml.GraphMLWriter writer = new com.tinkerpop.blueprints.util.io.graphml.GraphMLWriter(graph);
writer.setNormalize(true);
try {
......
package kieker.analysis.trace.traversal;
import com.tinkerpop.blueprints.Graph;
import kieker.analysis.traceanalysisdomain.AggregatedOperationCall;
import kieker.analysis.traceanalysisdomain.AggregatedTrace;
import teetime.stage.basic.AbstractTransformation;
public class AggrTraceTraverserStage extends AbstractTransformation<AggregatedTrace, NamedGraph> {
public class AggrTraceTraverserStage extends AbstractTransformation<AggregatedTrace, NamedGraph<Graph>> {
@Override
protected void execute(final AggregatedTrace trace) {
......@@ -18,7 +20,7 @@ public class AggrTraceTraverserStage extends AbstractTransformation<AggregatedTr
final String name = "aggr-trace-" + trace.hashCode();
final NamedGraph graph = new NamedGraph(name, name, aggrTrace2Blueprint.getGraph());
final NamedGraph<Graph> graph = new NamedGraph<>(name, name, aggrTrace2Blueprint.getGraph());
this.getOutputPort().send(graph);
}
......
package kieker.analysis.trace.traversal;
import com.tinkerpop.blueprints.Graph;
import com.tinkerpop.blueprints.util.wrappers.wrapped.WrappedGraph;
public class NamedGraph {
public class NamedGraph<T extends Graph> extends WrappedGraph<T> {
private String name;
private String fileName;
private Graph graph;
public NamedGraph(final String name, final String fileName, final Graph graph) {
public NamedGraph(final String name, final String fileName, final T baseGraph) {
super(baseGraph);
this.name = name;
this.fileName = fileName;
this.graph = graph;
}
public String getName() {
......@@ -32,12 +31,4 @@ public class NamedGraph {
this.fileName = fileName;
}
public Graph getGraph() {
return graph;
}
public void setGraph(final Graph graph) {
this.graph = graph;
}
}
package kieker.analysis.trace.traversal;
import com.tinkerpop.blueprints.Graph;
import kieker.analysis.traceanalysisdomain.OperationCall;
import kieker.analysis.traceanalysisdomain.Trace;
import teetime.stage.basic.AbstractTransformation;
public class TraceTraverserStage extends AbstractTransformation<Trace, NamedGraph> {
public class TraceTraverserStage extends AbstractTransformation<Trace, NamedGraph<Graph>> {
@Override
protected void execute(final Trace trace) {
......@@ -18,7 +20,7 @@ public class TraceTraverserStage extends AbstractTransformation<Trace, NamedGrap
final String name = "trace-" + trace.hashCode();
final NamedGraph graph = new NamedGraph(name, name, traceToGraph.getGraph());
final NamedGraph<Graph> graph = new NamedGraph<>(name, name, traceToGraph.getGraph());
this.getOutputPort().send(graph);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment