Package io.hgraphdb.giraph
Class HBaseEdgeInputFormat
- java.lang.Object
-
- org.apache.giraph.conf.DefaultImmutableClassesGiraphConfigurable<I,V,E>
-
- org.apache.giraph.io.GiraphInputFormat<I,org.apache.hadoop.io.Writable,E>
-
- org.apache.giraph.io.EdgeInputFormat<ObjectWritable,EdgeValueWritable>
-
- io.hgraphdb.giraph.HBaseEdgeInputFormat
-
- All Implemented Interfaces:
org.apache.giraph.conf.GiraphConfigurationSettable<ObjectWritable,org.apache.hadoop.io.Writable,EdgeValueWritable>
,org.apache.giraph.conf.ImmutableClassesGiraphConfigurable<ObjectWritable,org.apache.hadoop.io.Writable,EdgeValueWritable>
public class HBaseEdgeInputFormat extends org.apache.giraph.io.EdgeInputFormat<ObjectWritable,EdgeValueWritable>
Base class that wraps an HBase TableInputFormat and underlying Scan object to help instantiate edges from an HBase table. All the static TableInputFormat properties necessary to configure an HBase job are available.Setting conf.set(HBaseEdgeInputFormat.EDGE_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
HBaseEdgeOutputFormat
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
HBaseEdgeInputFormat.HBaseEdgeReader
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 HBaseEdgeInputFormat()
-
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.EdgeReader<ObjectWritable,EdgeValueWritable>
createEdgeReader(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,org.apache.hadoop.io.Writable,EdgeValueWritable>
-
createEdgeReader
public org.apache.giraph.io.EdgeReader<ObjectWritable,EdgeValueWritable> createEdgeReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
- Specified by:
createEdgeReader
in classorg.apache.giraph.io.EdgeInputFormat<ObjectWritable,EdgeValueWritable>
- 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,org.apache.hadoop.io.Writable,EdgeValueWritable>
- Throws:
IOException
InterruptedException
-
-