Package org.apache.giraph.io.formats
Class TextVertexOutputFormat<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.OutputFormat<I,V,E>
-
- org.apache.giraph.io.VertexOutputFormat<I,V,E>
-
- org.apache.giraph.io.formats.TextVertexOutputFormat<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:
PageRank.SimplePageRankVertexOutputFormat
,SSSP.SimpleSuperstepVertexOutputFormat
public abstract class TextVertexOutputFormat<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.VertexOutputFormat<I,V,E>
Abstract class that users should subclass to use their own text based vertex output format.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
TextVertexOutputFormat.TextVertexWriter
Abstract class to be implemented by the user based on their specific vertex output.protected class
TextVertexOutputFormat.TextVertexWriterToEachLine
Abstract class to be implemented by the user to write a line for each vertex.
-
Field Summary
Fields Modifier and Type Field Description protected GiraphTextOutputFormat
textOutputFormat
Giraph made this file protected here, so we need to provide this
-
Constructor Summary
Constructors Constructor Description TextVertexOutputFormat()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context)
abstract TextVertexOutputFormat.TextVertexWriter
createVertexWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
The factory method which produces theTextVertexOutputFormat.TextVertexWriter
used by this output format.org.apache.hadoop.mapreduce.OutputCommitter
getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context)
-
-
-
Field Detail
-
textOutputFormat
protected GiraphTextOutputFormat textOutputFormat
Giraph made this file protected here, so we need to provide this
-
-
Method Detail
-
checkOutputSpecs
public void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext context) throws IOException, InterruptedException
- Specified by:
checkOutputSpecs
in classorg.apache.giraph.io.OutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
- Throws:
IOException
InterruptedException
-
getOutputCommitter
public org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
- Specified by:
getOutputCommitter
in classorg.apache.giraph.io.OutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
- Throws:
IOException
InterruptedException
-
createVertexWriter
public abstract TextVertexOutputFormat.TextVertexWriter createVertexWriter(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
The factory method which produces theTextVertexOutputFormat.TextVertexWriter
used by this output format.- Specified by:
createVertexWriter
in classorg.apache.giraph.io.VertexOutputFormat<I extends org.apache.hadoop.io.WritableComparable,V extends org.apache.hadoop.io.Writable,E extends org.apache.hadoop.io.Writable>
- Parameters:
context
- the information about the task- Returns:
- the text vertex writer to be used
- Throws:
IOException
InterruptedException
-
-