/** * Attempts to run the vertex internally in the current JVM, reading from and * writing to a temporary folder on local disk. Will start its own zookeeper * instance. * * @param conf GiraphClasses specifying which types to use * @return linewise output data, or null if job fails * @throws Exception if anything goes wrong */ public static Iterable<String> run( GiraphConfiguration conf) throws Exception { // Prepare input file, output folder and temporary folders File tmpDir = FileUtils.createTestDir(conf.getComputationName()); try { return run(conf, null, tmpDir); } finally { FileUtils.delete(tmpDir); } }
/** * Attempts to run the vertex internally in the current JVM, * reading from an in-memory graph. Will start its own zookeeper * instance. * * @param <I> Vertex ID * @param <V> Vertex Value * @param <E> Edge Value * @param conf GiraphClasses specifying which types to use * @param graph input graph * @throws Exception if anything goes wrong */ public static <I extends WritableComparable, V extends Writable, E extends Writable> void run( GiraphConfiguration conf, TestGraph<I, V, E> graph) throws Exception { // Prepare temporary folders File tmpDir = FileUtils.createTestDir(conf.getComputationName()); try { run(conf, graph, tmpDir, null); } finally { FileUtils.delete(tmpDir); } }
/** * Attempts to run the vertex internally in the current JVM, reading from and * writing to a temporary folder on local disk. Will start its own zookeeper * instance. * * * @param conf GiraphClasses specifying which types to use * @param vertexInputData linewise vertex input data * @param edgeInputData linewise edge input data * @return linewise output data, or null if job fails * @throws Exception if anything goes wrong */ public static Iterable<String> run( GiraphConfiguration conf, String[] vertexInputData, String[] edgeInputData) throws Exception { // Prepare input file, output folder and temporary folders File tmpDir = FileUtils.createTestDir(conf.getComputationName()); try { return run(conf, vertexInputData, edgeInputData, null, tmpDir); } finally { FileUtils.delete(tmpDir); } }
/** * Attempts to run the vertex internally in the current JVM, reading and * writing to an in-memory graph. Will start its own zookeeper * instance. * * @param <I> Vertex ID * @param <V> Vertex Value * @param <E> Edge Value * @param conf GiraphClasses specifying which types to use * @param graph input graph * @return Output graph * @throws Exception if anything goes wrong */ public static <I extends WritableComparable, V extends Writable, E extends Writable> TestGraph<I, V, E> runWithInMemoryOutput( GiraphConfiguration conf, TestGraph<I, V, E> graph) throws Exception { // Prepare temporary folders File tmpDir = FileUtils.createTestDir(conf.getComputationName()); try { return runWithInMemoryOutput(conf, graph, tmpDir, null); } finally { FileUtils.delete(tmpDir); } }
GiraphJob job = new GiraphJob(conf, conf.getComputationName());
GiraphJob job = new GiraphJob(conf, conf.getComputationName());
GiraphJob job = new GiraphJob(conf, conf.getComputationName());