@Override
            public void close() throws IOException {
                while (inPipe.available() > 0) {
                    try {
                        Thread.sleep(500);
                    } catch (InterruptedException e) {
                        // do nothing
                    }
                }
                super.close();
            }
Pipe the data from one graph to another graph.  It is important that the reader and writer utilize the
same format.

@param fromGraph the graph to take data from.
@param toGraph   the graph to take data to.
@param reader    reads from the graph written by the writer.
@param writer    writes the graph to be read by the reader.
@throws IOException thrown if there is an error in steam between the two graphs.
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/GraphMigrator.java