Class 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.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.TextOutputFormat

        org.apache.hadoop.mapreduce.lib.output.TextOutputFormat.LineRecordWriter<K extends Object,​V extends Object>
      • Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat

        org.apache.hadoop.mapreduce.lib.output.FileOutputFormat.Counter
    • Field Summary

      • Fields inherited from class org.apache.hadoop.mapreduce.lib.output.TextOutputFormat

        SEPARATOR, SEPERATOR
      • Fields inherited from class org.apache.hadoop.mapreduce.lib.output.FileOutputFormat

        BASE_OUTPUT_NAME, COMPRESS, COMPRESS_CODEC, COMPRESS_TYPE, OUTDIR, PART
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract String getOutputFileName()  
      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 String getSubdir()
      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
    • Constructor Detail

      • GiraphTextOutputFormat

        public GiraphTextOutputFormat()
    • 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,
                                                                                                                                   InterruptedException
        This function returns a record writer according to provided configuration. Giraph write file to hdfs.

        In Grape-Giraph, we write to local file system.

        Overrides:
        getRecordWriter in class org.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:
        IOException
        InterruptedException
      • 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()