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/03/27 15:23:37 UTC

[1/3] incubator-tinkerpop git commit: Update docs for PartitionStrategy.

Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master dff3f2c6b -> 354afb67f


Update docs for PartitionStrategy.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/b18b700b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/b18b700b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/b18b700b

Branch: refs/heads/master
Commit: b18b700b869e2fca202e43c039d67576e54f2d13
Parents: 391c656
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 10:16:03 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 10:16:03 2015 -0400

----------------------------------------------------------------------
 docs/src/the-traversal.asciidoc        |  30 ++++++++++++++++++++++++++++
 docs/static/images/partition-graph.png | Bin 0 -> 57809 bytes
 2 files changed, 30 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b18b700b/docs/src/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-traversal.asciidoc b/docs/src/the-traversal.asciidoc
index 1868d80..4b398c9 100644
--- a/docs/src/the-traversal.asciidoc
+++ b/docs/src/the-traversal.asciidoc
@@ -1626,6 +1626,36 @@ The example above uses TinkerGraph which does not support transactions.  As ment
 
 CAUTION: `EventStrategy` is not meant for usage in tracking global mutations across separate processes.  In other words, an mutation in what JVM process is not raised as an event in a different JVM process.  In addition, events are not raised when mutations occur outside of the `Traversal` context.
 
+PartitionStrategy
+=================
+
+image::partition-graph.png[width=650]
+
+`PartitionStrategy` partitions the vertices and edges of a graph into `String` named partitions (i.e. buckets, subgraphs, etc.). The idea behind `PartitionStrategy` is presented in the image above where each element is in a single partition (represented by its color). Partitions can be read from, written to, and linked/joined by edges that span one or two partitions (e.g. a tail vertex in one partition and a head vertex in another).
+
+There are three primary variables in `PartitionStrategy`:
+
+. Partition Key - The property key that denotes a String value representing a partition.
+. Write Partition - A `String` denoting what partition all future written elements will be in.
+. Read Partitions - A `Set<String>` of partitions that can be read from.
+
+The best way to understand `PartitionStrategy` is via example.
+
+[gremlin-groovy]
+----
+graph = TinkerFactory.createModern()
+strategyA = PartitionStrategy.build().partitionKey("_partition").writePartition("a").addReadPartition("a").create()
+strategyB = PartitionStrategy.build().partitionKey("_partition").writePartition("b").addReadPartition("b").create()
+gA = GraphTraversalSource.build().with(strategyA).create(graph)
+gA.addV() // this vertex has a property of {_partition:"a"}
+gB = GraphTraversalSource.build().with(strategyB).create(graph)
+gB.addV() // this vertex has a property of {_partition:"b"}
+gA.V()
+gB.V()
+----
+
+By writing elements to particular partitions and then restricting read partitions, the developer is able to create multiple graphs within a single address space. Moreover, by supporting references between partitions, it is possible to merge those multiple graphs (i.e. join partitions).
+
 Domain Specific Languages
 -------------------------
 

http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/b18b700b/docs/static/images/partition-graph.png
----------------------------------------------------------------------
diff --git a/docs/static/images/partition-graph.png b/docs/static/images/partition-graph.png
new file mode 100644
index 0000000..718ba4f
Binary files /dev/null and b/docs/static/images/partition-graph.png differ


[3/3] 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/354afb67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/354afb67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/354afb67

Branch: refs/heads/master
Commit: 354afb67f7bdebbad1eaede431d4dd043ad9dcee
Parents: 9e26f9a dff3f2c
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 10:23:31 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 10:23:31 2015 -0400

----------------------------------------------------------------------
 DISCLAIMER.txt                                    |   7 +++++++
 .../gremlin/hadoop/HadoopGraphProvider.java       |   1 -
 .../process/computer/giraph/zookeeper-3.3.3.jar   | Bin 601677 -> 0 bytes
 3 files changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------



[2/3] incubator-tinkerpop git commit: Correct formatting to get comments to appear in docs for PartitionStrategy.

Posted by sp...@apache.org.
Correct formatting to get comments to appear in docs for PartitionStrategy.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/9e26f9a5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/9e26f9a5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/9e26f9a5

Branch: refs/heads/master
Commit: 9e26f9a5e39321de8bd0cce452fa14aa26dd3a64
Parents: b18b700
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Mar 27 10:22:57 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Mar 27 10:22:57 2015 -0400

----------------------------------------------------------------------
 docs/src/the-traversal.asciidoc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/9e26f9a5/docs/src/the-traversal.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/the-traversal.asciidoc b/docs/src/the-traversal.asciidoc
index 4b398c9..29084b2 100644
--- a/docs/src/the-traversal.asciidoc
+++ b/docs/src/the-traversal.asciidoc
@@ -1647,9 +1647,9 @@ graph = TinkerFactory.createModern()
 strategyA = PartitionStrategy.build().partitionKey("_partition").writePartition("a").addReadPartition("a").create()
 strategyB = PartitionStrategy.build().partitionKey("_partition").writePartition("b").addReadPartition("b").create()
 gA = GraphTraversalSource.build().with(strategyA).create(graph)
-gA.addV() // this vertex has a property of {_partition:"a"}
+gA.addV() //// this vertex has a property of {_partition:"a"}
 gB = GraphTraversalSource.build().with(strategyB).create(graph)
-gB.addV() // this vertex has a property of {_partition:"b"}
+gB.addV() //// this vertex has a property of {_partition:"b"}
 gA.V()
 gB.V()
 ----