I
- Vertex idV
- Vertex valueE
- Edge valuepublic abstract class HCatalogVertexInputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends VertexInputFormat<I,V,E>
HCatalogVertexInputFormat.HCatalogVertexReader
by extending
either HCatalogVertexInputFormat.SingleRowHCatalogVertexReader
or
HCatalogVertexInputFormat.MultiRowHCatalogVertexReader
depending on how data for each vertex is
stored in the input table.
The desired database and table name to load from can be specified via
GiraphHCatInputFormat.setVertexInput(org.apache.hadoop.mapreduce.Job,
org.apache.hcatalog.mapreduce.InputJobInfo)
as you setup your vertex input format with GiraphConfiguration.setVertexInputFormatClass(Class)
.
Modifier and Type | Class and Description |
---|---|
protected class |
HCatalogVertexInputFormat.HCatalogVertexReader
Abstract class that users should subclass
based on their specific vertex
input.
|
protected class |
HCatalogVertexInputFormat.MultiRowHCatalogVertexReader
HCatalogVertexReader for tables
holding vertex info across multiple rows
sorted by vertex id column,
so that they appear consecutively to the
RecordReader.
|
protected class |
HCatalogVertexInputFormat.SingleRowHCatalogVertexReader
HCatalogVertexReader for tables holding
complete vertex info within each
row.
|
Constructor and Description |
---|
HCatalogVertexInputFormat() |
Modifier and Type | Method and Description |
---|---|
protected abstract HCatalogVertexInputFormat.HCatalogVertexReader |
createVertexReader()
create vertex reader instance.
|
VertexReader<I,V,E> |
createVertexReader(org.apache.hadoop.mapreduce.InputSplit split,
org.apache.hadoop.mapreduce.TaskAttemptContext context)
Create a vertex reader for a given split.
|
List<org.apache.hadoop.mapreduce.InputSplit> |
getSplits(org.apache.hadoop.mapreduce.JobContext context,
int minSplitCountHint)
Get the list of input splits for the format.
|
checkInputSpecs, readInputSplit, writeInputSplit
getConf, setConf
public final List<org.apache.hadoop.mapreduce.InputSplit> getSplits(org.apache.hadoop.mapreduce.JobContext context, int minSplitCountHint) throws IOException, InterruptedException
GiraphInputFormat
getSplits
in class GiraphInputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
context
- The job contextminSplitCountHint
- Minimum number of splits to create (hint)IOException
InterruptedException
protected abstract HCatalogVertexInputFormat.HCatalogVertexReader createVertexReader()
public final VertexReader<I,V,E> createVertexReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
VertexInputFormat
VertexReader.initialize(InputSplit, TaskAttemptContext)
before
the split is used.createVertexReader
in class VertexInputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
split
- the split to be readcontext
- the information about the taskIOException
Copyright © 2011-2019 The Apache Software Foundation. All Rights Reserved.