public class GraphJob extends BSPJob
BSPJob.JobState| Modifier and Type | Field and Description |
|---|---|
static String |
AGGREGATOR_CLASS_ATTR |
static String |
VERTEX_CLASS_ATTR |
static String |
VERTEX_EDGE_VALUE_CLASS_ATTR |
static String |
VERTEX_GRAPH_INPUT_READER |
static String |
VERTEX_GRAPH_RUNTIME_PARTIONING |
static String |
VERTEX_ID_CLASS_ATTR |
static String |
VERTEX_MESSAGE_COMBINER_CLASS_ATTR |
static String |
VERTEX_VALUE_CLASS_ATTR |
COMBINER_CLASS_ATTR, conf, INPUT_FORMAT_CLASS_ATTR, OUTPUT_FORMAT_CLASS_ATTR, WORK_CLASS_ATTR, WORKING_DIR| Constructor and Description |
|---|
GraphJob(HamaConfiguration conf,
Class<?> exampleClass)
Creates a new Graph Job with the given configuration and an exampleClass.
|
| Modifier and Type | Method and Description |
|---|---|
Class<? extends Vertex<? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable>> |
getVertexClass() |
void |
setAggregatorClass(Class<? extends Aggregator>... cls)
Sets multiple aggregators for the job.
|
void |
setAggregatorClass(Class<? extends Aggregator> cls)
Set the aggregator for the job.
|
void |
setCombinerClass(Class<? extends Combiner<? extends org.apache.hadoop.io.Writable>> cls) |
void |
setEdgeValueClass(Class<? extends org.apache.hadoop.io.Writable> cls)
Set the Edge value class for the job.
|
void |
setMaxIteration(int maxIteration)
Sets how many iterations the algorithm should perform, -1 for deactivated
is default value.
|
void |
setPartitioner(Class<? extends Partitioner> theClass) |
void |
setVertexClass(Class<? extends Vertex<? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable>> cls)
Set the Vertex class for the job.
|
void |
setVertexIDClass(Class<? extends org.apache.hadoop.io.Writable> cls)
Set the Vertex ID class for the job.
|
void |
setVertexInputReaderClass(Class<? extends VertexInputReader<?,?,?,?,?>> cls)
Sets the input reader for parsing the input to vertices.
|
void |
setVertexValueClass(Class<? extends org.apache.hadoop.io.Writable> cls)
Set the Vertex value class for the job.
|
void |
submit() |
ensureState, failTask, getBspClass, getCombinerClass, getInputFormat, getInputKeyClass, getInputValueClass, getNumBspTask, getOutputFormat, getOutputKeyClass, getOutputValueClass, getPartitioner, isComplete, isSuccessful, killJob, killTask, progress, set, setBspClass, setCheckPointFlag, setCheckPointInterval, setCompressionCodec, setInputFormat, setInputKeyClass, setInputPath, setInputValueClass, setJar, setJarByClass, setJobName, setNumBspTask, setOutputFormat, setOutputKeyClass, setOutputPath, setOutputValueClass, setSupersteps, setUser, setWorkingDirectory, waitForCompletionget, getConf, getInt, getJar, getJobID, getJobName, getLocalPath, getUser, getWorkingDirectory, writeXmlpublic static final String VERTEX_CLASS_ATTR
public static final String VERTEX_ID_CLASS_ATTR
public static final String VERTEX_VALUE_CLASS_ATTR
public static final String VERTEX_EDGE_VALUE_CLASS_ATTR
public static final String AGGREGATOR_CLASS_ATTR
public static final String VERTEX_MESSAGE_COMBINER_CLASS_ATTR
public static final String VERTEX_GRAPH_RUNTIME_PARTIONING
public static final String VERTEX_GRAPH_INPUT_READER
public GraphJob(HamaConfiguration conf, Class<?> exampleClass) throws IOException
Text, the
vertex value class to IntWritable and the edge value class to
IntWritable.IOExceptionpublic void setVertexClass(Class<? extends Vertex<? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable>> cls) throws IllegalStateException
IllegalStateExceptionpublic void setVertexIDClass(Class<? extends org.apache.hadoop.io.Writable> cls) throws IllegalStateException
IllegalStateExceptionpublic void setVertexValueClass(Class<? extends org.apache.hadoop.io.Writable> cls) throws IllegalStateException
IllegalStateExceptionpublic void setEdgeValueClass(Class<? extends org.apache.hadoop.io.Writable> cls) throws IllegalStateException
IllegalStateExceptionpublic void setAggregatorClass(Class<? extends Aggregator> cls)
public void setAggregatorClass(Class<? extends Aggregator>... cls)
public void setVertexInputReaderClass(Class<? extends VertexInputReader<?,?,?,?,?>> cls)
public Class<? extends Vertex<? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable,? extends org.apache.hadoop.io.Writable>> getVertexClass()
public void setPartitioner(Class<? extends Partitioner> theClass)
setPartitioner in class BSPJobpublic void setCombinerClass(Class<? extends Combiner<? extends org.apache.hadoop.io.Writable>> cls)
setCombinerClass in class BSPJobpublic void setMaxIteration(int maxIteration)
public void submit()
throws IOException,
InterruptedException
submit in class BSPJobIOExceptionInterruptedExceptionCopyright © 2008-2012 The Apache Software Foundation. All Rights Reserved.