com.intel.hadoop.graphbuilder.job
Class AbstractPartitionJob<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable,EdgeData extends org.apache.hadoop.io.Writable>

java.lang.Object
  extended by com.intel.hadoop.graphbuilder.job.AbstractPartitionJob<VidType,VertexData,EdgeData>
Type Parameters:
VidType -
VertexData -
EdgeData -
Direct Known Subclasses:
PartitionJobTest.Job

public abstract class AbstractPartitionJob<VidType extends org.apache.hadoop.io.WritableComparable<VidType>,VertexData extends org.apache.hadoop.io.Writable,EdgeData extends org.apache.hadoop.io.Writable>
extends java.lang.Object

An abstract wrapper class for running the Partitioning Job. User needs to override 3 methods: vidClass(), vdataClass(), and edataClass() to generate the right parsers for parsing the input data. BasicGraphParser is used, and can be replaced by overriding the method.

See an example in PartitionJobTest.

Input directories contains hybrid of edge and vertex data. Output directories:

See Also:
BasicGraphParser, GraphParser, PartitionJobTest

Constructor Summary
AbstractPartitionJob()
           
 
Method Summary
abstract  java.lang.Class edataClass()
           
 java.lang.Class graphParserClass()
           
 boolean run(int nparts, java.lang.String[] inputs, java.lang.String output)
          Running the partitioning job with nparts partitions.
abstract  java.lang.Class vdataClass()
           
abstract  java.lang.Class vidClass()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractPartitionJob

public AbstractPartitionJob()
Method Detail

vidClass

public abstract java.lang.Class vidClass()
Returns:
the class of vertex id type

vdataClass

public abstract java.lang.Class vdataClass()
Returns:
the class of vertex data type

edataClass

public abstract java.lang.Class edataClass()
Returns:
the class of edge data type

graphParserClass

public java.lang.Class graphParserClass()
Returns:
the class of graph parser type

run

public boolean run(int nparts,
                   java.lang.String[] inputs,
                   java.lang.String output)
            throws javassist.NotFoundException,
                   javassist.CannotCompileException
Running the partitioning job with nparts partitions. Reads input from inputs, and outputs to output directory.

Parameters:
nparts -
inputs -
output -
Returns:
Throws:
javassist.NotFoundException
javassist.CannotCompileException