You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/10/12 21:00:47 UTC
[1/2] incubator-tinkerpop git commit: Dropped the path visualization
feature.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 468952d35 -> 67bcde2bd
Dropped the path visualization feature.
This isn't a breaking change as the feature was never officially released. I was giving the code a second look today and there were some things that were some bad inefficiencies in there that I don't think are easily fixed given the way gephi works. This feature probably shouldn't make it into the wild.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/9c817295
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/9c817295
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/9c817295
Branch: refs/heads/master
Commit: 9c8172956b7cbbc74e6f28c6e7a15dfe06cb8265
Parents: 1355267
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Oct 12 14:39:00 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Oct 12 14:39:00 2015 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 -
docs/src/gremlin-applications.asciidoc | 7 ---
.../console/plugin/GephiRemoteAcceptor.groovy | 45 --------------------
.../GephiRemoteAcceptorIntegrateTest.java | 28 ------------
4 files changed, 81 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9c817295/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index aed12cc..249eb87 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -55,7 +55,6 @@ TinkerPop 3.1.0 (NOT OFFICIALLY RELEASED YET)
* `GraphStep` can now take a single argument `Collection` which is either elements or element ids (i.e. `g.V([1,2,3])` is supported now).
* Added `LoopsStep` to make the loop counter accessible within `repeat()`, `until()` and `emit()`.
* Gephi Plugin no longer requires manual insert of `store` steps to visualize a traversal.
-* Gephi Plugin visualizes `Path` objects.
* Added a `TinkerIoRegistry` that registers a custom serializer for Gryo that will serialize an entire `TinkerGraph` instance.
* Added configuration options to Gephi Plugin for setting the size of nodes visualized.
* Replaced `DedupBijectionStrategy` with the more effective `FilterRankingStrategy`.
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9c817295/docs/src/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/gremlin-applications.asciidoc b/docs/src/gremlin-applications.asciidoc
index 5635911..7cd0eba 100644
--- a/docs/src/gremlin-applications.asciidoc
+++ b/docs/src/gremlin-applications.asciidoc
@@ -1132,13 +1132,6 @@ NOTE: Issuing `:> graph` again will clear the Gephi workspace and then re-write
Now that the graph is visualized in Gephi, it is possible to link:https://gephi.github.io/users/tutorial-layouts/[apply a layout algorithm], change the size and/or color of vertices and edges, and display labels/properties of interest. Further information can be found in Gephi's tutorial on link:https://gephi.github.io/users/tutorial-visualization/[Visualization]. After applying the Fruchterman Reingold layout, increasing the node size, decreasing the edge scale, and displaying the id, name, and weight attributes the graph looks as displayed in the right image above.
-In addition to providing a way to pipe a `Graph` instance to Gephi, the plugin also enables methods for visualizing a `Path` and a `Traversal`. In both cases, the `Graph` underlying the `Path` and `Traversal` must be visualized in Gephi as defined above. To visualize a `Path`, simple get a `Path` object and `:submit` it:
-
-[source,groovy]
-gremlin> :> g.V(1).repeat(both().dedup()).until(hasId(3)).path().next()
-
-The above line of code will visualize the "shortest path" between vertex `1` and vertex `3`, highlighting vertex `1` first then stepping through the path to `3` highlighting each vertex found as it goes.
-
WARNING: On some platforms, Gephi may not properly refresh the edges in the "Overview" panel for `Path` visualizations. If this problem occurs, manually refreshing the "Overview" will allow the `Path` visualization to become fully realized (e.g. click the "Show Hulls" button).
Visualization of a `Traversal` has a different approach as the visualization occurs as the `Traversal` is executing, thus showing a real-time view of its execution. A `Traversal` must be "configured" to operate in this format and for that it requires use of the `visualTraversal` option on the `config` function of the `:remote` command:
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9c817295/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy
index 2e45727..1cd3584 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/plugin/GephiRemoteAcceptor.groovy
@@ -173,51 +173,6 @@ class GephiRemoteAcceptor implements RemoteAcceptor {
def graph = (Graph) o
def g = graph.traversal()
g.V().sideEffect { addVertexToGephi(g, it.get()) }.iterate()
- } else {
- // an individual Path needs a special case as it is an iterator and gets unrolled by
- // IteratorUtils.asIterator() if not wrapped in a list prior.
- final Iterator itty = (o instanceof Path) ? IteratorUtils.asIterator([o]) : IteratorUtils.asIterator(o)
- def first = true
- while (itty.hasNext()) {
- final Object current = itty.next();
- if (current instanceof Path) {
- // paths get returned as iterators - so basically any Iterator that has vertices in it will have
- // their path highlighted
- final Path path = (Path) current
- final List<Vertex> verticesInPath = path.stream().map { Pair pair -> pair.getValue0() }
- .filter { Object e -> e instanceof Vertex }.collect(Collectors.toList())
-
- for (int ix = 0; ix < verticesInPath.size(); ix++) {
- final Vertex v = (Vertex) verticesInPath.get(ix)
-
- // if this vertex has already been highlighted in gephi then no need to do it again,
- // just update the touch count in memory
- if (!vertexAttributes.containsKey(v.id().toString())) {
- // this is a new vertex visited so it needs to get highlighted in gephi
- visitVertexInGephi(v)
- if (ix > 0) {
- final Vertex previous = (Vertex) verticesInPath.get(ix - 1)
- v.edges(Direction.BOTH).findAll { Edge edge ->
- edge.bothVertices().any { Vertex vertex -> vertex == previous }
- }.each { Object edge ->
- visitEdgeInGephi((Edge) edge)
- }
- }
- }
-
- // need to increment the touch even though this may be the first time passed through
- // because the default for touch=1 when it is added to the graph
- touch(v)
- }
-
- if (itty.hasNext() || !first) {
- sleep(vizStepDelay)
- applyRelativeSizingInGephi()
- }
-
- first = false
- }
- }
}
traversalSubmittedForViz = false
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9c817295/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/GephiRemoteAcceptorIntegrateTest.java
----------------------------------------------------------------------
diff --git a/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/GephiRemoteAcceptorIntegrateTest.java b/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/GephiRemoteAcceptorIntegrateTest.java
index 79a7997..f49a77f 100644
--- a/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/GephiRemoteAcceptorIntegrateTest.java
+++ b/gremlin-console/src/test/java/org/apache/tinkerpop/gremlin/console/groovy/plugin/GephiRemoteAcceptorIntegrateTest.java
@@ -104,34 +104,6 @@ public class GephiRemoteAcceptorIntegrateTest {
}
@Test
- public void shouldSubmitPath() throws RemoteException {
- stubFor(post(urlPathEqualTo("/workspace0"))
- .withQueryParam("format", equalTo("JSON"))
- .withQueryParam("operation", equalTo("updateGraph"))
- .willReturn(aResponse()
- .withStatus(200)));
-
- acceptor.submit(Arrays.asList(
- "g = graph.traversal();g.V(1).repeat(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.__().both().dedup()).until(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.__().hasId(3)).path().next()"));
-
- wireMockRule.verify(5, postRequestedFor(urlPathEqualTo("/workspace0")));
- }
-
- @Test
- public void shouldSubmitMultiplePaths() throws RemoteException {
- stubFor(post(urlPathEqualTo("/workspace0"))
- .withQueryParam("format", equalTo("JSON"))
- .withQueryParam("operation", equalTo("updateGraph"))
- .willReturn(aResponse()
- .withStatus(200)));
-
- acceptor.submit(Arrays.asList(
- "g = graph.traversal();g.V(1).repeat(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.__().both().dedup()).until(org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.__.__().hasId(3)).path().toList()"));
-
- wireMockRule.verify(5, postRequestedFor(urlPathEqualTo("/workspace0")));
- }
-
- @Test
public void shouldSubmitTraversalAfterConfigWithDefaultG() throws RemoteException {
stubFor(post(urlPathEqualTo("/workspace0"))
.withQueryParam("format", equalTo("JSON"))
[2/2] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/master'
Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/master'
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/67bcde2b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/67bcde2b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/67bcde2b
Branch: refs/heads/master
Commit: 67bcde2bd9b47d8815a945444cfaadf14e66a1c7
Parents: 9c81729 468952d
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Mon Oct 12 15:00:33 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Mon Oct 12 15:00:33 2015 -0400
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
docs/src/the-graph.asciidoc | 4 +-
docs/src/the-traversal.asciidoc | 75 ++++++------
.../traversal/dsl/graph/GraphTraversal.java | 22 +++-
.../gremlin/process/traversal/dsl/graph/__.java | 8 ++
.../process/traversal/step/map/MapKeysStep.java | 48 --------
.../traversal/step/map/MapValuesStep.java | 48 --------
.../traversal/step/map/SelectColumnStep.java | 70 +++++++++++
.../traversal/step/map/GroovySelectTest.groovy | 34 +++++-
.../AbstractImportCustomizerProvider.java | 2 +
.../process/traversal/step/map/MapKeysTest.java | 1 +
.../traversal/step/map/MapValuesTest.java | 2 +-
.../process/traversal/step/map/SelectTest.java | 115 ++++++++++++++++++-
13 files changed, 282 insertions(+), 148 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/67bcde2b/CHANGELOG.asciidoc
----------------------------------------------------------------------