Class TextVertexInputFormat<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>

  • Type Parameters:
    I - Vertex index value
    V - Vertex value
    E - Edge value
    All Implemented Interfaces:
    org.apache.giraph.conf.GiraphConfigurationSettable<I,​V,​E>, org.apache.giraph.conf.ImmutableClassesGiraphConfigurable<I,​V,​E>
    Direct Known Subclasses:
    DatagenVertexInputFormat, LiveJournalVertexInputFormat, P2PVertexInputFormat, P2PVertexMultipleLongInputFormat, SampleTextVertexInputFormat

    public abstract class TextVertexInputFormat<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>
    extends org.apache.giraph.io.VertexInputFormat<I,​V,​E>
    Abstract class that users should subclass to use their own text based vertex input format.
    • Constructor Detail

      • TextVertexInputFormat

        public TextVertexInputFormat()
    • Method Detail

      • checkInputSpecs

        public void checkInputSpecs​(org.apache.hadoop.conf.Configuration conf)
        Specified by:
        checkInputSpecs in class org.apache.giraph.io.GiraphInputFormat<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>
      • getSplits

        public List<org.apache.hadoop.mapreduce.InputSplit> getSplits​(org.apache.hadoop.mapreduce.JobContext context,
                                                                      int minSplitCountHint)
                                                               throws IOException,
                                                                      InterruptedException
        Specified by:
        getSplits in class org.apache.giraph.io.GiraphInputFormat<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>
        Throws:
        IOException
        InterruptedException
      • createVertexReader

        public abstract TextVertexInputFormat.TextVertexReader createVertexReader​(org.apache.hadoop.mapreduce.InputSplit split,
                                                                                  org.apache.hadoop.mapreduce.TaskAttemptContext context)
                                                                           throws IOException
        The factory method which produces the TextVertexInputFormat.TextVertexReader used by this input format.
        Specified by:
        createVertexReader in class org.apache.giraph.io.VertexInputFormat<I extends org.apache.hadoop.io.WritableComparable,​V extends org.apache.hadoop.io.Writable,​E extends org.apache.hadoop.io.Writable>
        Parameters:
        split - the split to be read
        context - the information about the task
        Returns:
        the text vertex reader to be used
        Throws:
        IOException