Package org.apache.giraph.io.formats
Class TextVertexInputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
- 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,E>
-
- org.apache.giraph.io.formats.TextVertexInputFormat<I,V,E>
-
- Type Parameters:
I
- Vertex index valueV
- Vertex valueE
- Edge value
- All Implemented Interfaces:
org.apache.giraph.conf.GiraphConfigurationSettable<I,V,E>
,org.apache.giraph.conf.ImmutableClassesGiraphConfigurable<I,V,E>
- Direct Known Subclasses:
CircleVertexInputFormat
,DatagenVertexInputFormat
,LiveJournalVertexInputFormat
,P2PVertexInputFormat
,P2PVertexMultipleLongInputFormat
,SampleTextVertexInputFormat
public abstract class TextVertexInputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable> extends org.apache.giraph.io.VertexInputFormat<I,V,E>
Abstract class that users should subclass to use their own text based vertex input format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TextVertexInputFormat.TextVertexReader
Abstract class to be implemented by the user based on their specific vertex input.protected class
TextVertexInputFormat.TextVertexReaderFromEachLine
Abstract class to be implemented by the user to read a vertex from each text line.protected class
TextVertexInputFormat.TextVertexReaderFromEachLineProcessed<T>
Abstract class to be implemented by the user to read a vertex from each text line after preprocessing it.protected class
TextVertexInputFormat.TextVertexReaderFromEachLineProcessedHandlingExceptions<T,X extends Throwable>
Abstract class to be implemented by the user to read a vertex from each text line after preprocessing it with exception handling.
-
Constructor Summary
Constructors Constructor Description TextVertexInputFormat()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
checkInputSpecs(org.apache.hadoop.conf.Configuration conf)
abstract TextVertexInputFormat.TextVertexReader
createVertexReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)
The factory method which produces theTextVertexInputFormat.TextVertexReader
used by this input format.List<org.apache.hadoop.mapreduce.InputSplit>
getSplits(org.apache.hadoop.mapreduce.JobContext context, int minSplitCountHint)
-
-
-
Method Detail
-
checkInputSpecs
public void checkInputSpecs(org.apache.hadoop.conf.Configuration conf)
-
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<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
- Throws:
IOException
InterruptedException
-
createVertexReader
public abstract TextVertexInputFormat.TextVertexReader createVertexReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
The factory method which produces theTextVertexInputFormat.TextVertexReader
used by this input format.- Specified by:
createVertexReader
in classorg.apache.giraph.io.VertexInputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
- Parameters:
split
- the split to be readcontext
- the information about the task- Returns:
- the text vertex reader to be used
- Throws:
IOException
-
-