Class TextEdgeInputFormat.TextEdgeReaderFromEachLine

  • All Implemented Interfaces:
    org.apache.giraph.aggregators.AggregatorUsage, org.apache.giraph.conf.GiraphConfigurationSettable<I,​org.apache.hadoop.io.Writable,​E>, org.apache.giraph.conf.ImmutableClassesGiraphConfigurable<I,​org.apache.hadoop.io.Writable,​E>, org.apache.giraph.worker.WorkerAggregatorUsage, org.apache.giraph.worker.WorkerBroadcastUsage, org.apache.giraph.worker.WorkerGlobalCommUsage, org.apache.giraph.worker.WorkerReduceUsage
    Enclosing class:
    TextEdgeInputFormat<I extends org.apache.hadoop.io.WritableComparable,​E extends org.apache.hadoop.io.Writable>

    protected abstract class TextEdgeInputFormat.TextEdgeReaderFromEachLine
    extends TextEdgeInputFormat.TextEdgeReader
    Abstract class to be implemented by the user to read an edge from each text line.
    • Constructor Detail

      • TextEdgeReaderFromEachLine

        protected TextEdgeReaderFromEachLine()
    • 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
      • getSourceVertexId

        protected abstract I getSourceVertexId​(org.apache.hadoop.io.Text line)
                                        throws IOException
        Reads source vertex id from the current line.
        Parameters:
        line - the current line
        Returns:
        the source vertex id corresponding to the line
        Throws:
        IOException - exception that can be thrown while reading
      • getTargetVertexId

        protected abstract I getTargetVertexId​(org.apache.hadoop.io.Text line)
                                        throws IOException
        Reads target vertex id from the current line.
        Parameters:
        line - the current line
        Returns:
        the target vertex id corresponding to the line
        Throws:
        IOException - exception that can be thrown while reading
      • getValue

        protected abstract E getValue​(org.apache.hadoop.io.Text line)
                               throws IOException
        Reads edge value from the current line.
        Parameters:
        line - the current line
        Returns:
        the edge value corresponding to the line
        Throws:
        IOException - exception that can be thrown while reading