Package org.apache.giraph.io.formats
Class GiraphTextOutputFormat
- java.lang.Object
-
- org.apache.hadoop.mapreduce.OutputFormat<K,V>
-
- org.apache.hadoop.mapreduce.lib.output.FileOutputFormat<K,V>
-
- org.apache.hadoop.mapreduce.lib.output.TextOutputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>
-
- org.apache.giraph.io.formats.GiraphTextOutputFormat
-
public abstract class GiraphTextOutputFormat extends org.apache.hadoop.mapreduce.lib.output.TextOutputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>The text output format used for Giraph text writing.
-
-
Constructor Summary
Constructors Constructor Description GiraphTextOutputFormat()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringgetOutputFileName()org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext job)This function returns a record writer according to provided configuration.protected abstract StringgetSubdir()This function is used to provide an additional path level to keep different text outputs into different directories.-
Methods inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat
checkOutputSpecs, getCompressOutput, getDefaultWorkFile, getOutputCommitter, getOutputCompressorClass, getOutputName, getOutputPath, getPathForWorkFile, getUniqueFile, getWorkOutputPath, setCompressOutput, setOutputCompressorClass, setOutputName, setOutputPath
-
-
-
-
Method Detail
-
getRecordWriter
public org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext job) throws IOException, InterruptedExceptionThis function returns a record writer according to provided configuration. Giraph write file to hdfs.In Grape-Giraph, we write to local file system.
- Overrides:
getRecordWriterin classorg.apache.hadoop.mapreduce.lib.output.TextOutputFormat<org.apache.hadoop.io.Text,org.apache.hadoop.io.Text>- Parameters:
job- shall be null.- Returns:
- created record writer
- Throws:
IOExceptionInterruptedException
-
getSubdir
protected abstract String getSubdir()
This function is used to provide an additional path level to keep different text outputs into different directories.- Returns:
- the subdirectory to be created under the output path
-
getOutputFileName
protected abstract String getOutputFileName()
-
-