Package io.hgraphdb.giraph.utils
Class InternalHBaseVertexRunner
- java.lang.Object
-
- io.hgraphdb.giraph.utils.InternalHBaseVertexRunner
-
public class InternalHBaseVertexRunner extends Object
A base class for running internal tests on a vertexExtending classes only have to invoke the run() method to test their vertex. All data is written to a local tmp directory that is removed afterwards. A local zookeeper instance is started in an extra thread and shutdown at the end.
Heavily inspired from Apache Mahout's MahoutTestCase
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Iterable<String>
run(org.apache.giraph.conf.GiraphConfiguration conf)
Attempts to run the vertex internally in the current JVM, reading from and writing to a temporary folder on local disk.static Iterable<String>
run(org.apache.giraph.conf.GiraphConfiguration conf, String checkpointsDir, File tmpDir)
Attempts to run the vertex internally in the current JVM, reading from and writing to a temporary folder on local disk.
-
-
-
Method Detail
-
run
public static Iterable<String> run(org.apache.giraph.conf.GiraphConfiguration conf) throws Exception
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.- Parameters:
conf
- GiraphClasses specifying which types to use- Returns:
- linewise output data, or null if job fails
- Throws:
Exception
- if anything goes wrong
-
run
public static Iterable<String> run(org.apache.giraph.conf.GiraphConfiguration conf, String checkpointsDir, File tmpDir) throws Exception
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.- Parameters:
conf
- GiraphClasses specifying which types to usecheckpointsDir
- if set, will use this folder for storing checkpoints.tmpDir
- file path for storing temporary files.- Returns:
- linewise output data, or null if job fails
- Throws:
Exception
- if anything goes wrong
-
-