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 classTextVertexInputFormat.TextVertexReaderAbstract class to be implemented by the user based on their specific vertex input.protected classTextVertexInputFormat.TextVertexReaderFromEachLineAbstract class to be implemented by the user to read a vertex from each text line.protected classTextVertexInputFormat.TextVertexReaderFromEachLineProcessed<T>Abstract class to be implemented by the user to read a vertex from each text line after preprocessing it.protected classTextVertexInputFormat.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 voidcheckInputSpecs(org.apache.hadoop.conf.Configuration conf)abstract TextVertexInputFormat.TextVertexReadercreateVertexReader(org.apache.hadoop.mapreduce.InputSplit split, org.apache.hadoop.mapreduce.TaskAttemptContext context)The factory method which produces theTextVertexInputFormat.TextVertexReaderused 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:
getSplitsin 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:
IOExceptionInterruptedException
-
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.TextVertexReaderused by this input format.- Specified by:
createVertexReaderin 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
-
-