Created
March 20, 2014 17:58
-
-
Save okram/9669964 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TinkerGraphVertexWriter extends VertexWriter { | |
GraphWriter writer; | |
public void initialize(final TaskAttemptContext context) { | |
this.writer = new GraphSONWriter.Builder().build(); | |
} | |
public void writeVertex(final Vertex giraphVertex) throws IOException { | |
//this.writer.writeVertex(System.out, ((GiraphVertex) giraphVertex).getGremlinVertex()); | |
System.out.println(((GiraphVertex) giraphVertex).getGremlinVertex() + ":" + ((GiraphVertex) giraphVertex).getGremlinVertex().<TraversalCounters>getProperty(TraversalVertexProgram.TRAVERSAL_TRACKER).get().getDoneObjectTracks()); | |
} | |
public void close(final TaskAttemptContext context) { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment