You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by ok...@apache.org on 2016/01/05 23:54:47 UTC
[15/50] incubator-tinkerpop git commit: Fixed broken links in Getting
Started tutorial.
Fixed broken links in Getting Started tutorial.
Links were broken to the reference docs after we restructured the docs directories for TINKERPOP-928.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/114d8671
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/114d8671
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/114d8671
Branch: refs/heads/TINKERPOP-1033
Commit: 114d867194cf123c5c29c3145ccb448224d985b0
Parents: 3be83ff
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 22 06:44:48 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 22 06:44:48 2015 -0500
----------------------------------------------------------------------
.../tutorials/getting-started/index.asciidoc | 52 ++++++++++----------
1 file changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/114d8671/docs/src/tutorials/getting-started/index.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/tutorials/getting-started/index.asciidoc b/docs/src/tutorials/getting-started/index.asciidoc
index 5cf61af..df9f59c 100644
--- a/docs/src/tutorials/getting-started/index.asciidoc
+++ b/docs/src/tutorials/getting-started/index.asciidoc
@@ -24,7 +24,7 @@ link:http://tinkerpop.apache.org[Apache TinkerPop] is an open source Graph Compu
represents a large collection of capabilities and technologies and, in its wider ecosystem, an additionally extended
world of link:http://tinkerpop.apache.org/#graph-systems[third-party contributed] graph libraries and
systems. TinkerPop's ecosystem can appear complex to newcomers of all experience, especially when glancing at the
-link:http://tinkerpop.apache.org/docs/x.y.z/index.html[reference documentation] for the first time.
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/[reference documentation] for the first time.
So, where do you get started with TinkerPop? How do you dive in quickly and get productive? Well - Gremlin, the
most recognizable citizen of The TinkerPop, is here to help with this thirty minute tutorial. That's right - in just
@@ -45,7 +45,7 @@ Gremlin helps you navigate the vertices and edges of a graph. He is essentially
databases, as link:http://sql2gremlin.com/[SQL] is the query language to relational databases. To tell Gremlin how
he should "traverse" the graph (i.e. what you want your query to do) you need a way to provide him commands in the
language he understands - and, of course, that language is called "Gremlin". For this task, you need one of
-TinkerPop's most important tools: link:http://tinkerpop.apache.org/docs/x.y.z/#gremlin-console[The Gremlin Console].
+TinkerPop's most important tools: link:http://tinkerpop.apache.org/docs/x.y.z/reference/#gremlin-console[The Gremlin Console].
Download the console, unpackage it and start it:
@@ -74,10 +74,10 @@ You will find yourself using it for a variety of TinkerPop-related activities, s
graphs, working out complex traversals, etc.
To get Gremlin to traverse a graph, you need a `Graph` instance, which holds the
-link:http://tinkerpop.apache.org/docs/x.y.z/#_the_graph_structure[structure] and data of the
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_the_graph_structure[structure] and data of the
graph. TinkerPop is a graph abstraction layer over different graph databases and different graph processors, so there
are many `Graph` instances you can choose from to instantiate in the console. The best `Graph` instance to start with
-however is link:http://tinkerpop.apache.org/docs/x.y.z/#tinkergraph-gremlin[TinkerGraph]. TinkerGraph
+however is link:http://tinkerpop.apache.org/docs/x.y.z/reference/#tinkergraph-gremlin[TinkerGraph]. TinkerGraph
is a fast, in-memory graph database with a small handful of configuration options, making it a good choice for beginners.
TIP: TinkerGraph is not just a toy for beginners. It is useful in analyzing subgraphs taken from a large graph,
@@ -85,7 +85,7 @@ working with a small static graph that doesn't change much, writing unit tests a
can fit in memory.
TIP: Resist the temptation to "get started" with more complex databases like link:http://thinkaurelius.github.io/titan/[Titan]
-or to delve into how to get link:http://tinkerpop.apache.org/docs/x.y.zg/#gremlin-server[Gremlin Server]
+or to delve into how to get link:http://tinkerpop.apache.org/docs/x.y.z/reference/#gremlin-server[Gremlin Server]
working properly. Focusing on the basics, presented in this guide, builds a good foundation for all the other things
TinkerPop offers.
@@ -109,8 +109,8 @@ g = graph.traversal()
The first command creates a `Graph` instance named `graph`, which thus provides a reference to the data you want
Gremlin to traverse. Unfortunately, just having `graph` doesn't provide Gremlin enough context to do his job. You
also need something called a `TraversalSource`, which is generated by the second command. The `TraversalSource`
-provides additional information to Gremlin (such as the link:http://tinkerpop.apache.org/docs/x.y.z/#traversalstrategy[traversal strategies]
-to apply and the link:http://tinkerpop.apache.org/docs/x.y.z/#graphcomputer[traversal engine] to use) which
+provides additional information to Gremlin (such as the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#traversalstrategy[traversal strategies]
+to apply and the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#graphcomputer[traversal engine] to use) which
provides him guidance on how to execute his trip around the `Graph`.
With your `TraversalSource` `g` available it is now possible to ask Gremlin to traverse the `Graph`:
@@ -212,7 +212,7 @@ Graph Traversal - Staying Simple
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Now that Gremlin knows where the graph data is, you can ask him to get you some data from it by doing a traversal,
-which you can think of as executing some link:http://tinkerpop.apache.org/docs/x.y.z/#_the_graph_process[process]
+which you can think of as executing some link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_the_graph_process[process]
over the structure of the graph. We can form our question in English and then translate it to Gremlin. For this
initial example, let's ask Gremlin: "What software has Marko created?"
@@ -224,12 +224,12 @@ To answer this question, we would want Gremlin to:
The English-based steps above largely translate to Gremlin's position in the graph and to the steps we need to take
to ask him to answer our question. By stringing these steps together, we form a `Traversal` or the sequence of programmatic
-link:http://tinkerpop.apache.org/docs/x.y.z/#graph-traversal-steps[steps] Gremlin needs to perform
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#graph-traversal-steps[steps] Gremlin needs to perform
in order to get you an answer.
Let's start with finding "marko". This operation is a filtering step as it searches the full set of vertices to match
those that have the "name" property value of "marko". This can be done with the
-link:http://tinkerpop.apache.org/docs/x.y.z/#has-step[has()] step as follows:
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#has-step[has()] step as follows:
[gremlin-groovy,modern]
----
@@ -254,7 +254,7 @@ traversals will remain unchanged however, as the indices will be used transparen
Now that Gremlin has found "marko", he can now consider the next step in the traversal where we ask him to "walk"
along "created" edges to "software" vertices. As described earlier, edges have direction, so we have to tell Gremlin
what direction to follow. In this case, we want him to traverse on outgoing edges from the "marko" vertex. For this,
-we use the link:http://tinkerpop.apache.org/docs/x.y.z/#vertex-steps[outE] step.
+we use the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#vertex-steps[outE] step.
[gremlin-groovy,modern]
----
@@ -325,14 +325,14 @@ earlier).
NOTE: The fully qualified name for `P` is `org.apache.tinkerpop.gremlin.process.traversal.P`.
If we wanted to ask Gremlin the average age of "vadas" and "marko" we could use the
-link:http://tinkerpop.apache.org/docs/x.y.z/#mean-step[mean()] step as follows:
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#mean-step[mean()] step as follows:
[gremlin-groovy,modern]
----
g.V().has('name',within('vadas','marko')).values('age').mean()
----
-Another method of filtering is seen in the use of the link:http://tinkerpop.apache.org/docs/x.y.z/#where-step[where]
+Another method of filtering is seen in the use of the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#where-step[where]
step. We know how to find the "software" that "marko" created:
[gremlin-groovy,modern]
@@ -361,7 +361,7 @@ g.V().has('name','marko').as('exclude').out('created').in('created').where(neq('
----
We made two additions to the traversal to make it exclude "marko" from the results. First, we added the
-link:http://tinkerpop.apache.org/docs/x.y.z/#as-step[as()] step. The `as()` step is not really a "step",
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#as-step[as()] step. The `as()` step is not really a "step",
but a "step modulator" - something that adds features to a step or the traversal. Here, the `as('exclude')` labels
the `has()` step with the name "exclude" and all values that pass through that step are held in that label for later
use. In this case, the "marko" vertex is the only vertex to pass through that point, so it is held in "exclude".
@@ -372,7 +372,7 @@ on the list of "marko" collaborators. The `where()` specifies that the "person"
not equal (i.e. `neq()`) the contents of the "exclude" label. As it just contains the "marko" vertex, the `where()`
filters out the "marko" that we get when we traverse back _in_ on the "created" edges.
-You will find many uses of `as()`. Here it is in combination with link:http://tinkerpop.apache.org/docs/x.y.z/#select-step[select]:
+You will find many uses of `as()`. Here it is in combination with link:http://tinkerpop.apache.org/docs/x.y.z/reference/#select-step[select]:
[gremlin-groovy,modern]
----
@@ -383,8 +383,8 @@ In the above example, we tell Gremlin to iterate through all vertices and traver
will label each vertex in that path with "a", "b" and "c", respectively. We can then use `select` to extract the
contents of that label.
-Another common but important step is the link:http://tinkerpop.apache.org/docs/x.y.z/#group-step[group()]
-step and its related step modulator called link:http://tinkerpop.apache.org/docs/x.y.z/#by-step[by()]. If
+Another common but important step is the link:http://tinkerpop.apache.org/docs/x.y.z/reference/#group-step[group()]
+step and its related step modulator called link:http://tinkerpop.apache.org/docs/x.y.z/reference/#by-step[by()]. If
we wanted to ask Gremlin to group all the vertices in the graph by their vertex label we could do:
[gremlin-groovy,modern]
@@ -439,7 +439,7 @@ link:http://giraph.apache.org/[Giraph]. The scope of this tutorial does not perm
executed to run in distributed fashion over Spark or Hadoop. The changes required to the code to do this are not
in the traversal itself, but in the definition of the `TraversalSource`. You can again see why we encourage, graph
operations to be executed through that class as opposed to just using `Graph`. You can read more about these
-features in this section on link:http://tinkerpop.apache.org/docs/x.y.z/#hadoop-gremlin[hadoop-gremlin].
+features in this section on link:http://tinkerpop.apache.org/docs/x.y.z/reference/#hadoop-gremlin[hadoop-gremlin].
TIP: To maintain an abstraction over `Graph` creation use `GraphFactory.open()` to construct new instances. See
the documentation for individual `Graph` implementations to learn about the configuration options to provide.
@@ -494,21 +494,21 @@ to any data source you require and Groovy tends to have nice libraries that can
link:http://thinkaurelius.com/2013/02/04/polyglot-persistence-and-query-with-gremlin/[quite enjoyable].
WARNING: Take care if using a `Graph` implementation that supports
-link:http://tinkerpop.apache.org/docs/x.y.z/#transactions[transactions]. As TinkerGraph does not, there is
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#transactions[transactions]. As TinkerGraph does not, there is
no need to `commit()`. If your `Graph` does support transactions, intermediate commits during load will need to be
applied.
To load larger data sets you should read about the
-link:http://tinkerpop.apache.org/docs/x.y.z/#bulkloadervertexprogram[BulkLoaderVertexProgram] (BLVP), which
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#bulkloadervertexprogram[BulkLoaderVertexProgram] (BLVP), which
provides a generalized method for loading graphs of virtually any size.
Gremlin Server
~~~~~~~~~~~~~~
-image:gremlin-server-protocol.png[width=325,float=right] link:http://tinkerpop.apache.org/docs/x.y.z/#gremlin-server[Gremlin Server]
+image:gremlin-server-protocol.png[width=325,float=right] link:http://tinkerpop.apache.org/docs/x.y.z/reference/#gremlin-server[Gremlin Server]
provides a way to remotely execute Gremlin scripts against one or more `Graph` instances hosted within it. It does
-this by exposing different endpoints, such as link:http://tinkerpop.apache.org/docs/x.y.z/#_connecting_via_rest[REST]
-and link:http://tinkerpop.apache.org/docs/x.y.z/#_connecting_via_java[websockets], which allow a request
+this by exposing different endpoints, such as link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_rest[REST]
+and link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_java[websockets], which allow a request
containing a Gremlin script to be processed with results returned.
[source,text]
@@ -552,13 +552,13 @@ $ curl -X POST -d "{\"gremlin\":\"g.V(x).out().values('name')\", \"language\":\"
IMPORTANT: Take careful note of the use of "bindings" in the arguments on the request. These are variables that are
applied to the script on execution and is essentially a way to parameterize your scripts. This "parameterization" is
-critical to link:http://tinkerpop.apache.org/docs/x.y.z/#_best_practices[performance]. Whenever
+critical to link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_best_practices[performance]. Whenever
possible, parameterize your queries.
As mentioned earlier, Gremlin Server can also be configured with a websockets endpoint. This endpoint has an
-embedded link:http://tinkerpop.apache.org/docs/x.y.z/#_developing_a_driver[subprotocol] that allow a
+embedded link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_developing_a_driver[subprotocol] that allow a
compliant driver to communicate with it. TinkerPop supplies a
-link:http://tinkerpop.apache.org/docs/x.y.z/#_connecting_via_java[reference driver] written in Java, but
+link:http://tinkerpop.apache.org/docs/x.y.z/reference/#_connecting_via_java[reference driver] written in Java, but
there are drivers developed by third-parties for other link:http://tinkerpop.apache.org/#graph-libraries[languages]
such as Python, Javascript, etc. Gremlin Server therefore represents the method by which non-JVM languages can
interact with TinkerPop.