com.intel.hadoop.graphbuilder.graph.simplegraph
Class SimpleGraphOutput

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

public class SimpleGraphOutput
extends java.lang.Object
implements GraphOutput

Controls the output of a SimpleGraph or a SimpleSubGraph. It outputs the graph into 3 parts: edge data, adjacency list and a metafile sotring the number of edges in the partition or subpartition. The output directory is organized as follows:

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


Constructor Summary
SimpleGraphOutput()
           
 
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

SimpleGraphOutput

public SimpleGraphOutput()
Method Detail

init

public 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 void write(Graph g,
                  EdgeFormatter formatter,
                  org.apache.hadoop.mapred.OutputCollector out,
                  org.apache.hadoop.mapred.Reporter reporter)
           throws java.io.IOException
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.io.IOException

writeAndClear

public void writeAndClear(Graph g,
                          EdgeFormatter formatter,
                          org.apache.hadoop.mapred.OutputCollector out,
                          org.apache.hadoop.mapred.Reporter reporter)
                   throws java.io.IOException
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

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