Skip to content

Instantly share code, notes, and snippets.

@okram
Created June 26, 2014 20:06
Show Gist options
  • Save okram/64cb6bb36376880d172e to your computer and use it in GitHub Desktop.
Save okram/64cb6bb36376880d172e to your computer and use it in GitHub Desktop.
public class GiraphGremlinGraphProvider extends AbstractGraphProvider {
@Override
public Map<String, Object> getBaseConfiguration(final String graphName) {
return new HashMap<String, Object>() {{
put("gremlin.graph", GiraphGraph.class.getName());
put("giraph.vertexInputFormatClass", "com.tinkerpop.gremlin.giraph.structure.io.kryo.KryoVertexInputFormat");
put("giraph.vertexOutputFormatClass", "com.tinkerpop.gremlin.giraph.structure.io.kryo.KryoVertexOutputFormat");
put("giraph.minWorkers", "1");
put("giraph.maxWorkers", "1");
put("giraph.SplitMasterWorker", "false");
//baseConfiguration.setProperty("giraph.localTestMode", "true");
put("gremlin.extraJobsCalculator", "com.tinkerpop.gremlin.giraph.process.TraversalExtraJobsCalculator");
put("giraph.zkJar", "/Users/marko/software/tinkerpop/tinkerpop3/giraph-gremlin/target/giraph-gremlin-3.0.0-SNAPSHOT-standalone/lib/zookeeper-3.3.3.jar");
put("gremlin.inputLocation", "data/tinkerpop-classic-vertices.gio");
put("gremlin.outputLocation", "giraph-gremlin/target/test-output");
}};
}
@Override
public void clear(final Graph g, final Configuration configuration) throws Exception {
if (g != null)
g.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment