protected abstract class GoraVertexOutputFormat.GoraVertexWriter extends VertexWriter<I,V,E> implements org.apache.zookeeper.Watcher
Modifier | Constructor and Description |
---|---|
protected |
GoraVertexWriter() |
Modifier and Type | Method and Description |
---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Close this
VertexWriter to future operations. |
protected abstract Object |
getGoraKey(Vertex<I,V,E> vertex)
Gets the correct key from a computed vertex.
|
protected abstract org.apache.gora.persistency.Persistent |
getGoraVertex(Vertex<I,V,E> vertex)
Each vertex needs to be transformed into a Gora object to be sent to
a specific data store.
|
void |
initialize(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Use the context to setup writing the vertices.
|
void |
process(org.apache.zookeeper.WatchedEvent event) |
void |
writeVertex(Vertex<I,V,E> vertex)
Writes the next vertex and associated data
|
getConf, setConf
public void initialize(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
VertexWriter
initialize
in class VertexWriter<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
VertexWriter
VertexWriter
to future operations.close
in class VertexWriter<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 writeVertex(Vertex<I,V,E> vertex) throws IOException, InterruptedException
SimpleVertexWriter
writeVertex
in interface SimpleVertexWriter<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
vertex
- set the properties of this vertexIOException
InterruptedException
public void process(org.apache.zookeeper.WatchedEvent event)
process
in interface org.apache.zookeeper.Watcher
protected abstract org.apache.gora.persistency.Persistent getGoraVertex(Vertex<I,V,E> vertex)
vertex
- vertex to be transformed into a Gora objectCopyright © 2011-2019 The Apache Software Foundation. All Rights Reserved.