Class TextVertexOutputFormat.TextVertexWriter

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected TextVertexWriter()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close​(org.apache.hadoop.mapreduce.TaskAttemptContext context)  
      protected org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,​org.apache.hadoop.io.Text> createLineRecordWriter​(org.apache.hadoop.mapreduce.TaskAttemptContext context)
      Create the line record writer.
      org.apache.hadoop.mapreduce.TaskAttemptContext getContext()
      Get the context.
      org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,​org.apache.hadoop.io.Text> getRecordWriter()
      Get the line record writer.
      void initialize​(org.apache.hadoop.mapreduce.TaskAttemptContext context)  
      • Methods inherited from class org.apache.giraph.conf.DefaultImmutableClassesGiraphConfigurable

        getConf, setConf
      • Methods inherited from interface org.apache.giraph.io.SimpleVertexWriter

        writeVertex
    • Constructor Detail

      • TextVertexWriter

        protected TextVertexWriter()
    • Method Detail

      • initialize

        public void initialize​(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                        throws IOException,
                               InterruptedException
        Specified by:
        initialize in class org.apache.giraph.io.VertexWriter<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>
        Throws:
        IOException
        InterruptedException
      • createLineRecordWriter

        protected org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,​org.apache.hadoop.io.Text> createLineRecordWriter​(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                                                                                      throws IOException,
                                                                                                                                             InterruptedException
        Create the line record writer. Override this to use a different underlying record writer (useful for testing).
        Parameters:
        context - the context passed to initialize
        Returns:
        the record writer to be used
        Throws:
        IOException - exception that can be thrown during creation
        InterruptedException - exception that can be thrown during creation
      • close

        public void close​(org.apache.hadoop.mapreduce.TaskAttemptContext context)
                   throws InterruptedException,
                          IOException
        Specified by:
        close in class org.apache.giraph.io.VertexWriter<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>
        Throws:
        InterruptedException
        IOException
      • getRecordWriter

        public org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,​org.apache.hadoop.io.Text> getRecordWriter()
        Get the line record writer.
        Returns:
        Record writer to be used for writing.
      • getContext

        public org.apache.hadoop.mapreduce.TaskAttemptContext getContext()
        Get the context.
        Returns:
        Context passed to initialize.