com.intel.hadoop.graphbuilder.graph.glgraph
Class GLGraphOutput

java.lang.Object
  extended by com.intel.hadoop.graphbuilder.graph.glgraph.GLGraphOutput
All Implemented Interfaces:
GraphOutput

public class GLGraphOutput
extends java.lang.Object
implements GraphOutput

Controls the output of a GLGraph. It outputs the graph into three parts: vid2lvid map, edge data, and (CSC,CSR) adjacency structure. The output directory is organized as follows:

The actual output of each part is controlled by the GraphFormatter.


Constructor Summary
GLGraphOutput()
          Default constructor.
 
Method Summary
 void close()
          Close the output.
 void configure(org.apache.hadoop.mapred.JobConf conf)
          Configure this GraphOutput using JobConf.
 void init(org.apache.hadoop.mapred.JobConf conf)
          Set the OutputFormat in the JobConf.
 void write(Graph g, EdgeFormatter formatter, org.apache.hadoop.mapred.OutputCollector out, org.apache.hadoop.mapred.Reporter reporter)
          Write out the graph to the OutputCollector.
 void writeAndClear(Graph g, EdgeFormatter formatter, org.apache.hadoop.mapred.OutputCollector out, org.apache.hadoop.mapred.Reporter reporter)
          Write out the graph and clearing the fields written to free up memory.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GLGraphOutput

public GLGraphOutput()
Default constructor.

Method Detail

init

public final void init(org.apache.hadoop.mapred.JobConf conf)
Description copied from interface: GraphOutput
Set the OutputFormat in the JobConf.

Specified by:
init in interface GraphOutput

configure

public void configure(org.apache.hadoop.mapred.JobConf conf)
Description copied from interface: GraphOutput
Configure this GraphOutput using JobConf.

Specified by:
configure in interface GraphOutput

write

public final void write(Graph g,
                        EdgeFormatter formatter,
                        org.apache.hadoop.mapred.OutputCollector out,
                        org.apache.hadoop.mapred.Reporter reporter)
                 throws java.lang.Exception
Description copied from interface: GraphOutput
Write out the graph to the OutputCollector.

Specified by:
write in interface GraphOutput
Parameters:
g - the graph to output.
formatter - formatter for the graph string representation.
Throws:
java.lang.Exception

writeAndClear

public final void writeAndClear(Graph g,
                                EdgeFormatter formatter,
                                org.apache.hadoop.mapred.OutputCollector out,
                                org.apache.hadoop.mapred.Reporter reporter)
                         throws java.lang.Exception
Description copied from interface: GraphOutput
Write out the graph and clearing the fields written to free up memory.

Specified by:
writeAndClear in interface GraphOutput
Parameters:
g - the graph to output.
formatter - formatter of the graph string representation.
Throws:
java.io.IOException
java.lang.Exception

close

public void close()
           throws java.io.IOException
Description copied from interface: GraphOutput
Close the output.

Specified by:
close in interface GraphOutput
Throws:
java.io.IOException