Class TextVertexInputFormat.TextVertexReader

    • Constructor Detail

      • TextVertexReader

        protected TextVertexReader()
    • Method Detail

      • initialize

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

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

        public void close()
                   throws IOException
        Specified by:
        close in class org.apache.giraph.io.VertexReader<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>
        Throws:
        IOException
      • getProgress

        public float getProgress()
                          throws IOException,
                                 InterruptedException
        Specified by:
        getProgress in class org.apache.giraph.io.VertexReader<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>
        Throws:
        IOException
        InterruptedException
      • getRecordReader

        protected org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,​org.apache.hadoop.io.Text> getRecordReader()
        Get the line record reader.
        Returns:
        Record reader to be used for reading.
      • getContext

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