Methods to deal with persisting values to a Grakn graph during OLAP computations. Each spark executor is thread
bound and responsible for a subset of the vertices in the graph. Therefore, an instance of the graph can be held in
each executor and the mutations from multiple vertices committed as batches. The need to delete relations in a
separate iterations from when new relations are added can also be facilitated.
Each vertex program should instatiate the
BulkResourceMutate class at the start of an iteration and call
the
close method at the end of each iteration. Additionally
cleanup must be called in a
separate iteration from
putValue to ensure that the graph remains sound.