Package io.hgraphdb.giraph
Class HBaseVertexOutputFormat.HBaseVertexWriter
- java.lang.Object
-
- org.apache.giraph.conf.DefaultImmutableClassesGiraphConfigurable<I,V,E>
-
- org.apache.giraph.io.VertexWriter<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
-
- io.hgraphdb.giraph.HBaseVertexOutputFormat.HBaseVertexWriter
-
- All Implemented Interfaces:
org.apache.giraph.conf.GiraphConfigurationSettable<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
,org.apache.giraph.conf.ImmutableClassesGiraphConfigurable<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
,org.apache.giraph.io.SimpleVertexWriter<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
- Enclosing class:
- HBaseVertexOutputFormat
public abstract static class HBaseVertexOutputFormat.HBaseVertexWriter extends org.apache.giraph.io.VertexWriter<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
ConstructorSimple class which takes an instance of RecordWriter over Writable objects. Subclasses are expected to implement writeVertex()
-
-
Constructor Summary
Constructors Constructor Description HBaseVertexWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
Sets up base table output format and creates a record writer.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
closeorg.apache.hadoop.mapreduce.TaskAttemptContext
getContext()
getContextHBaseBulkLoader
getWriter()
Get the writervoid
initialize(org.apache.hadoop.mapreduce.TaskAttemptContext context)
initializeabstract void
writeVertex(HBaseBulkLoader writer, HBaseVertex vertex, org.apache.hadoop.io.Writable value)
void
writeVertex(org.apache.giraph.graph.Vertex<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable> vertex)
-
-
-
Method Detail
-
initialize
public void initialize(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
initialize- Specified by:
initialize
in classorg.apache.giraph.io.VertexWriter<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
- Parameters:
context
- Context used to write the vertices.- Throws:
IOException
-
close
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
close- Specified by:
close
in classorg.apache.giraph.io.VertexWriter<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
- Parameters:
context
- the context of the task- Throws:
IOException
InterruptedException
-
getWriter
public HBaseBulkLoader getWriter()
Get the writer- Returns:
- Bulk loader to be used for writing.
-
getContext
public org.apache.hadoop.mapreduce.TaskAttemptContext getContext()
getContext- Returns:
- Context passed to initialize.
-
writeVertex
public void writeVertex(org.apache.giraph.graph.Vertex<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable> vertex) throws IOException, InterruptedException
- Throws:
IOException
InterruptedException
-
writeVertex
public abstract void writeVertex(HBaseBulkLoader writer, HBaseVertex vertex, org.apache.hadoop.io.Writable value)
-
-