Class TextVertexInputFormat.TextVertexReaderFromEachLineProcessed<T>

    • Constructor Detail

      • TextVertexReaderFromEachLineProcessed

        protected TextVertexReaderFromEachLineProcessed()
    • Method Detail

      • nextVertex

        public final boolean nextVertex()
                                 throws IOException,
                                        InterruptedException
        Specified by:
        nextVertex 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
      • getCurrentVertex

        public final org.apache.giraph.graph.Vertex<I,​V,​E> getCurrentVertex()
                                                                                 throws IOException,
                                                                                        InterruptedException
        Specified by:
        getCurrentVertex 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
      • 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 vertex.
        Parameters:
        line - the current line to be read
        Returns:
        the preprocessed object
        Throws:
        IOException - exception that can be thrown while reading
      • getId

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

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

        protected abstract Iterable<org.apache.giraph.edge.Edge<I,​E>> getEdges​(T line)
                                                                              throws IOException
        Reads edges from the preprocessed line.
        Parameters:
        line - the object obtained by preprocessing the line
        Returns:
        the edges
        Throws:
        IOException - exception that can be thrown while reading