This is an automated email from the ASF dual-hosted git repository.

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git


The following commit(s) were added to refs/heads/master by this push:
     new 0c342c21eb Add a configuration and submission example to the 
CloneVertexProgram section
0c342c21eb is described below

commit 0c342c21eb8220afa776e587f98e5bb300526aae
Author: Stephen Mallette <[email protected]>
AuthorDate: Thu Sep 10 19:35:17 2026 +0000

    Add a configuration and submission example to the CloneVertexProgram section
    
    The CloneVertexProgram section named the available InputFormat and
    OutputFormat classes but gave no indication of how to configure and run
    the program. It now identifies the modules the classes reside in, shows
    the gremlin.hadoop.graphReader and gremlin.hadoop.graphWriter properties
    that select the formats, and provides a short example that submits the
    program through a GraphComputer, while still linking to the
    SparkGraphComputer section for a complete distributed run.
    
    Assisted-by: Kiro:claude-opus-4.8
---
 docs/src/reference/the-graphcomputer.asciidoc | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/docs/src/reference/the-graphcomputer.asciidoc 
b/docs/src/reference/the-graphcomputer.asciidoc
index 0d730e5c89..293eaeaa68 100644
--- a/docs/src/reference/the-graphcomputer.asciidoc
+++ b/docs/src/reference/the-graphcomputer.asciidoc
@@ -523,7 +523,32 @@ any graph `InputFormat` to any graph `OutputFormat`. 
TinkerPop provides the foll
 ** `GryoInputFormat`
 ** `ScriptInputFormat`).
 
-An <<clonevertexprogramusingspark,example>> is provided in the 
SparkGraphComputer section.
+The `CloneVertexProgram` itself resides in `gremlin-core`
+(`org.apache.tinkerpop.gremlin.process.computer.clone.CloneVertexProgram`), 
while the `InputFormat` and
+`OutputFormat` implementations listed above are provided by `hadoop-gremlin` 
under the
+`org.apache.tinkerpop.gremlin.hadoop.structure.io` package. A clone is 
configured on a `HadoopGraph` by
+declaring the reader and writer formats together with their input and output 
locations, after which the
+program is submitted through a `GraphComputer`. The following illustrates a 
copy of a graph read with
+`GryoInputFormat` and written as GraphSON with `GraphSONOutputFormat`:
+
+[source,groovy]
+----
+graph = GraphFactory.open('conf/hadoop/hadoop-gryo.properties')                
     <1>
+graph.configuration().setProperty('gremlin.hadoop.graphReader',
+    'org.apache.tinkerpop.gremlin.hadoop.structure.io.gryo.GryoInputFormat')   
     <2>
+graph.configuration().setProperty('gremlin.hadoop.graphWriter',
+    
'org.apache.tinkerpop.gremlin.hadoop.structure.io.graphson.GraphSONOutputFormat')
+graph.compute(SparkGraphComputer).
+    program(CloneVertexProgram.build().create()).submit().get()                
     <3>
+----
+
+<1> Open a `HadoopGraph` from a configuration that defines the 
`gremlin.hadoop.inputLocation` and
+`gremlin.hadoop.outputLocation` properties.
+<2> The `gremlin.hadoop.graphReader` and `gremlin.hadoop.graphWriter` 
properties name the `InputFormat` and
+`OutputFormat` classes to copy between.
+<3> Any `GraphComputer` implementation may execute the program. 
`SparkGraphComputer` is used here.
+
+An <<clonevertexprogramusingspark,example>> that runs end to end is provided 
in the SparkGraphComputer section.
 
 Graph Providers should consider writing their own `OutputFormat` and 
`InputFormat` which would allow bulk loading and
 export capabilities through this `VertexProgram`. This topic is discussed 
further in the

Reply via email to