Example Code(JAVA):
Cluster cluster = Cluster.open(yml.getFile());
DriverRemoteConnection driver = DriverRemoteConnection.using(cluster, "graph_traversal");
GraphTraversalSource allGraph = AnonymousTraversalSource.traversal().withRemote(driver);
// Using Io --> generate a file in server-side
allGraph.Io("File.json").write().iterate()
// Using GraphSONWriter
GraphSONMapper mapper = GraphSONMapper.build().addRegistry(JanusGraphIoRegistry.instance()).version(GraphSONVersion.V3_0).create();
GraphSONWriter writer = GraphSONWriter.build().mapper(mapper).create();
ByteArrayOutputStream output = new ByteArrayOutputStream();
// output --> "" (Empty)
writer.writeGraph(output, allGraph.getGraph());
// output --> "~" (Only Vertex Ids)
writer.writeVertices(output, allGraph.V());
I'm trying to export a Graph as GraphSON with remote server. But IO step doesn't provide a functionality for remote-export. With GraphSonWriter, It doesn't write the contents properly. How can I export a graph in GraphSON format with remote-server environment?
Thank you.