org.apache.tinkerpop.gremlin.structure.io

## Class GraphMigrator

- java.lang.Object
- - org.apache.tinkerpop.gremlin.structure.io.GraphMigrator

-     public final class GraphMigrator
      extends Object

  `GraphMigrator` takes the data in one graph and pipes it to another graph. Uses the `GryoReader` and `GryoWriter` by default. Note that this utility is meant as a convenience for "small" graph migrations.
  Author:
    Alex Averbuch (alex.averbuch@gmail.com), Stephen Mallette (http://stephen.genoprime.com)

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `migrateGraph(Graph fromGraph, Graph toGraph)` Use Gryo to pipe the data from one graph to another graph.
    `static void` | `migrateGraph(Graph fromGraph, Graph toGraph, GraphReader reader, GraphWriter writer)` Pipe the data from one graph to another graph.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### migrateGraph

          public static void migrateGraph(Graph fromGraph,
                                          Graph toGraph)
                                   throws IOException

      Use Gryo to pipe the data from one graph to another graph. Uses readers and writers generated from each `Graph` via the `Graph.io(Io.Builder)` method.
      Throws:
        `IOException`

    - #### migrateGraph

          public static void migrateGraph(Graph fromGraph,
                                          Graph toGraph,
                                          GraphReader reader,
                                          GraphWriter writer)
                                   throws IOException

      Pipe the data from one graph to another graph. It is important that the reader and writer utilize the same format.
      Parameters:
        `fromGraph` - the graph to take data from.
        `toGraph` - the graph to take data to.
        `reader` - reads from the graph written by the writer.
        `writer` - writes the graph to be read by the reader.
      Throws:
        `IOException` - thrown if there is an error in steam between the two graphs.

Copyright © 2013–2022 Apache Software Foundation. All rights reserved.