Package io.hgraphdb.giraph
Class HBaseVertexInputFormat
- java.lang.Object
-
- org.apache.giraph.conf.DefaultImmutableClassesGiraphConfigurable<I,V,E>
-
- org.apache.giraph.io.GiraphInputFormat<I,V,E>
-
- org.apache.giraph.io.VertexInputFormat<I,V,org.apache.hadoop.io.Writable>
-
- org.apache.giraph.io.VertexValueInputFormat<ObjectWritable,VertexValueWritable>
-
- io.hgraphdb.giraph.HBaseVertexInputFormat
-
- 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>
public class HBaseVertexInputFormat extends org.apache.giraph.io.VertexValueInputFormat<ObjectWritable,VertexValueWritable>
Base class that wraps an HBase TableInputFormat and underlying Scan object to help instantiate vertices from an HBase table. All the static TableInputFormat properties necessary to configure an HBase job are available.Setting conf.set(HBaseVertexInputFormat.VERTEX_INPUT_TABLE, "in_table"); from the job setup routine will properly delegate to the TableInputFormat instance. The Configurable interface prevents specific wrapper methods from having to be called.
Works with
HBaseVertexOutputFormat
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HBaseVertexInputFormat.HBaseVertexReader
Takes an instance of RecordReader that supports HBase row-key, result records.
-
Field Summary
Fields Modifier and Type Field Description protected static TableInputFormat
BASE_FORMAT
delegate HBase table input format
-
Constructor Summary
Constructors Constructor Description HBaseVertexInputFormat()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkInputSpecs(org.apache.hadoop.conf.Configuration configuration)
org.apache.giraph.io.VertexValueReader<ObjectWritable,VertexValueWritable>
createVertexValueReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
List<org.apache.hadoop.mapreduce.InputSplit>
getSplits(org.apache.hadoop.mapreduce.JobContext context, int minSplitCountHint)
-
-
-
Field Detail
-
BASE_FORMAT
protected static final TableInputFormat BASE_FORMAT
delegate HBase table input format
-
-
Method Detail
-
checkInputSpecs
public void checkInputSpecs(org.apache.hadoop.conf.Configuration configuration)
- Specified by:
checkInputSpecs
in classorg.apache.giraph.io.GiraphInputFormat<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
-
createVertexValueReader
public org.apache.giraph.io.VertexValueReader<ObjectWritable,VertexValueWritable> createVertexValueReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
- Specified by:
createVertexValueReader
in classorg.apache.giraph.io.VertexValueInputFormat<ObjectWritable,VertexValueWritable>
- Throws:
IOException
-
getSplits
public List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context, int minSplitCountHint) throws IOException, InterruptedException
- Specified by:
getSplits
in classorg.apache.giraph.io.GiraphInputFormat<ObjectWritable,VertexValueWritable,org.apache.hadoop.io.Writable>
- Throws:
IOException
InterruptedException
-
-