[
https://issues.apache.org/jira/browse/TINKERPOP-962?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15135143#comment-15135143
]
ASF GitHub Bot commented on TINKERPOP-962:
------------------------------------------
Github user okram commented on the pull request:
https://github.com/apache/incubator-tinkerpop/pull/210#issuecomment-180594111
The different between no `GraphFilter` and `GraphFilter`.
```
Application ID Name Cores Memory per Node Submitted Time User
State Duration
app-20160205091408-0001 Apache TinkerPop's Spark-Gremlin 80
10.0 GB 2016/02/05 09:14:08 tinkerpop FINISHED 13 min
app-20160205090220-0000 Apache TinkerPop's Spark-Gremlin 80
10.0 GB 2016/02/05 09:02:20 tinkerpop FINISHED 6.8 min
```
> Provide "vertex query" selectivity when importing data in OLAP.
> ---------------------------------------------------------------
>
> Key: TINKERPOP-962
> URL: https://issues.apache.org/jira/browse/TINKERPOP-962
> Project: TinkerPop
> Issue Type: Improvement
> Components: process
> Affects Versions: 3.1.0-incubating
> Reporter: Marko A. Rodriguez
> Assignee: Marko A. Rodriguez
> Labels: breaking
> Fix For: 3.2.0-incubating
>
>
> Currently, when you do:
> {code}
> graph.compute().program(PageRankVertexProgram).submit()
> {code}
> We are pulling the entire {{graph}} into the OLAP engine. We should allow the
> user to limit the amount of data pulled via "vertex query"-type filter. For
> instance, we could support the following two new methods on {{GraphComputer}}.
> {code}
> graph.compute().program(PageRankVertexProgram).vertices(hasLabel('person')).edges(out,
> hasLabel('knows','friend').has('weight',gt(0.8)).submit()
> {code}
> The two methods would be defined as:
> {code}
> public interface GraphComputer {
> ...
> GraphComputer vertices(final Traversal<Vertex,Vertex> vertexFilter)
> GraphComputer edges(final Direction direction, final Traversal<Edge,Edge>
> edgeFilter)
> {code}
> If the user does NOT provide a {{vertices()}} (or {{edges()}}) call, then the
> {{Traversal}} is assumed to be {{IdentityTraversal}}. Finally, in terms of
> execution order, first {{vertices()}} is called and if "false" then don't
> call edges. Else, call edges on all the respective incoming and outgoing
> edges. Don't really like {{Direction}} there and perhaps its just:
> {code}
> GraphComputer edges(final Traversal<Vertex,Edge> edgeFilter)
> {code}
> And then all edges that pass through are added to OLAP vertex. You don't want
> {{both}}? Then its {{outE('knows',friend').has('weight',gt(0.8))}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)