Merge branch 'tp31' into tp32
Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/fa2eebca Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/fa2eebca Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/fa2eebca Branch: refs/heads/TINKERPOP-1753 Commit: fa2eebca547cb008c55976657cc9d7ee8636b6e5 Parents: 354d59e 6144dd0 Author: Stephen Mallette <sp...@genoprime.com> Authored: Fri Aug 18 22:22:36 2017 -0400 Committer: Stephen Mallette <sp...@genoprime.com> Committed: Fri Aug 18 22:22:36 2017 -0400 ---------------------------------------------------------------------- .../gremlin/hadoop/structure/io/script/ScriptRecordReader.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/fa2eebca/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java ---------------------------------------------------------------------- diff --cc hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java index ea72f9a,5d9be00..f119baf --- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java +++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/script/ScriptRecordReader.java @@@ -105,16 -96,13 +105,16 @@@ public final class ScriptRecordReader e bindings.put(GRAPH, graph); bindings.put(LINE, this.lineRecordReader.getCurrentValue().toString()); bindings.put(FACTORY, factory); - final Vertex vertex = (Vertex) script.eval(bindings); - if (vertex != null) { - this.vertexWritable.set(vertex); - return true; + final StarGraph.StarVertex sv = (StarGraph.StarVertex) script.eval(bindings); + if (sv != null) { + final Optional<StarGraph.StarVertex> vertex = sv.applyGraphFilter(this.graphFilter); + if (vertex.isPresent()) { + this.vertexWritable.set(vertex.get()); + return true; + } } } catch (final ScriptException e) { - throw new IOException(e.getMessage(), e); + throw new IOException(e.getMessage()); } } }