Skip to content
Permalink
Browse files

[#1438] Improve GDL error handling (#1473)

fixes #1438
  • Loading branch information
galpha committed Jan 21, 2020
1 parent b936844 commit a32d88c846cf205813c099138c2fe22651abe753
@@ -27,6 +27,7 @@
import org.gradoop.common.model.impl.id.GradoopIdSet;
import org.gradoop.common.model.impl.properties.Properties;
import org.s1ck.gdl.GDLHandler;
import org.s1ck.gdl.exceptions.BailSyntaxErrorStrategy;
import org.s1ck.gdl.model.Graph;
import org.s1ck.gdl.model.GraphElement;

@@ -139,6 +140,7 @@ private AsciiGraphLoader(GDLHandler gdlHandler,
.setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL)
.setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL)
.setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL)
.setErrorStrategy(new BailSyntaxErrorStrategy())
.buildFromString(asciiGraph),
elementFactoryProvider);
}
@@ -164,6 +166,7 @@ private AsciiGraphLoader(GDLHandler gdlHandler,
.setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL)
.setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL)
.setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL)
.setErrorStrategy(new BailSyntaxErrorStrategy())
.buildFromFile(fileName),
elementFactoryProvider);
}
@@ -189,6 +192,7 @@ private AsciiGraphLoader(GDLHandler gdlHandler,
.setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL)
.setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL)
.setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL)
.setErrorStrategy(new BailSyntaxErrorStrategy())
.buildFromStream(inputStream),
elementFactoryProvider);
}
@@ -22,6 +22,7 @@
import org.gradoop.flink.model.impl.operators.matching.common.query.predicates.CNF;
import org.gradoop.flink.model.impl.operators.matching.common.query.predicates.QueryPredicate;
import org.s1ck.gdl.GDLHandler;
import org.s1ck.gdl.exceptions.BailSyntaxErrorStrategy;
import org.s1ck.gdl.model.Edge;
import org.s1ck.gdl.model.GraphElement;
import org.s1ck.gdl.model.Vertex;
@@ -101,6 +102,7 @@ public QueryHandler(String gdlString) {
.setDefaultGraphLabel(GradoopConstants.DEFAULT_GRAPH_LABEL)
.setDefaultVertexLabel(GradoopConstants.DEFAULT_VERTEX_LABEL)
.setDefaultEdgeLabel(GradoopConstants.DEFAULT_EDGE_LABEL)
.setErrorStrategy(new BailSyntaxErrorStrategy())
.buildFromString(gdlString);
edgeCache = gdlHandler.getEdgeCache(true, true);
vertexCache = gdlHandler.getVertexCache(true, true);
@@ -159,7 +159,7 @@
<dep.commons-cli.version>1.4</dep.commons-cli.version>
<dep.commons-lang.version>2.6</dep.commons-lang.version>
<dep.flink.version>1.7.2</dep.flink.version>
<dep.gdl.version>0.3</dep.gdl.version>
<dep.gdl.version>0.3.2</dep.gdl.version>
<dep.guava.version>11.0.2</dep.guava.version>
<dep.hbase.version>1.4.3</dep.hbase.version>
<dep.javafastpfor.version>0.1.10</dep.javafastpfor.version>

0 comments on commit a32d88c

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