protected abstract class GoraEdgeOutputFormat.GoraEdgeWriter extends EdgeWriter<I,V,E>
Modifier | Constructor and Description |
---|---|
protected |
GoraEdgeWriter() |
Modifier and Type | Method and Description |
---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Close this
EdgeWriter to future operations. |
protected abstract org.apache.gora.persistency.Persistent |
getGoraEdge(I srcId,
V srcValue,
Edge<I,E> edge)
Each edge needs to be transformed into a Gora object to be sent to
a specific data store.
|
protected abstract Object |
getGoraKey(I srcId,
V srcValue,
Edge<I,E> edge)
Gets the correct key from a computed vertex.
|
void |
initialize(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Use the context to setup writing the edges.
|
void |
writeEdge(I srcId,
V srcValue,
Edge<I,E> edge)
Writes the next vertex and associated data
|
getConf, setConf
public void initialize(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
EdgeWriter
initialize
in class EdgeWriter<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
context
- Context used to write the vertices.IOException
InterruptedException
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
EdgeWriter
EdgeWriter
to future operations.close
in class EdgeWriter<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
context
- the context of the taskIOException
InterruptedException
public void writeEdge(I srcId, V srcValue, Edge<I,E> edge) throws IOException, InterruptedException
EdgeWriter
writeEdge
in class EdgeWriter<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
srcId
- the vertex ID from which the edge originatessrcValue
- the vertex value; the vertex is the one from which
the edge originatesedge
- edge to be writtenIOException
InterruptedException
protected abstract org.apache.gora.persistency.Persistent getGoraEdge(I srcId, V srcValue, Edge<I,E> edge)
edge
- edge to be transformed into a Gora objectsrcId
- source vertex idsrcValue
- source vertex valueCopyright © 2011-2019 The Apache Software Foundation. All Rights Reserved.