Class TextEdgeInputFormat.TextEdgeReaderFromEachLineProcessed<T>

    • Constructor Detail

      • TextEdgeReaderFromEachLineProcessed

        protected TextEdgeReaderFromEachLineProcessed()
    • Method Detail

      • getCurrentEdge

        public final org.apache.giraph.edge.Edge<I,​E> getCurrentEdge()
                                                                    throws IOException,
                                                                           InterruptedException
        Specified by:
        getCurrentEdge in class org.apache.giraph.io.EdgeReader<I extends org.apache.hadoop.io.WritableComparable,​E extends org.apache.hadoop.io.Writable>
        Throws:
        IOException
        InterruptedException
      • preprocessLine

        protected abstract T preprocessLine​(org.apache.hadoop.io.Text line)
                                     throws IOException
        Preprocess the line so other methods can easily read necessary information for creating edge
        Parameters:
        line - the current line to be read
        Returns:
        the preprocessed object
        Throws:
        IOException - exception that can be thrown while reading
      • getTargetVertexId

        protected abstract I getTargetVertexId​(T line)
                                        throws IOException
        Reads target vertex id from the preprocessed line.
        Parameters:
        line - the object obtained by preprocessing the line
        Returns:
        the target vertex id
        Throws:
        IOException - exception that can be thrown while reading
      • getSourceVertexId

        protected abstract I getSourceVertexId​(T line)
                                        throws IOException
        Reads source vertex id from the preprocessed line.
        Parameters:
        line - the object obtained by preprocessing the line
        Returns:
        the source vertex id
        Throws:
        IOException - exception that can be thrown while reading
      • getValue

        protected abstract E getValue​(T line)
                               throws IOException
        Reads edge value from the preprocessed line.
        Parameters:
        line - the object obtained by preprocessing the line
        Returns:
        the edge value
        Throws:
        IOException - exception that can be thrown while reading