Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
3.0.2-incubating
-
None
Description
This is another trivial "bulker" that is vendor agnostic. For any Graph that provides a GraphComputer, BulkDumpingMapReduce is executed as such:
g.compute().mapReduce(BulkDumpingMapReduce.build().output('dir/').writer(GraphSONWriter.class).create()).submit()
The implementation is:
public BulkDumpingMapReduce implements MapReduce { public void map(vertex, emitter) { StringBufferThingy vertexString = new StringBufferThingy() graphSONWriter.write(vertex,stringBufferStreamThingy); emitter.emit(vertexString.toString()); } }
NOTES:
- MapReduce generates a key/value pair result set. Thus, MapReduce.generateResult() would need to clip off the key and write the value to the output location.