Class GuaguaLineRecordReader

  • All Implemented Interfaces:
    ml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,​GuaguaWritableAdapter<org.apache.hadoop.io.Text>>

    public class GuaguaLineRecordReader
    extends Object
    implements ml.shifu.guagua.io.GuaguaRecordReader<GuaguaWritableAdapter<org.apache.hadoop.io.LongWritable>,​GuaguaWritableAdapter<org.apache.hadoop.io.Text>>
    A reader read HDFS file line by line.

    Copy some code from LineRecordReader but to support GuaguaRecordReader interface.

    If use default constructor, user should also call initialize(GuaguaFileSplit) like in below:

     this.setRecordReader(new GuaguaLineRecordReader());
     this.getRecordReader().initialize(fileSplit);
     
    or directly use other constructors:
     this.setRecordReader(new GuaguaLineRecordReader(fileSplit));
     
    • Constructor Detail

      • GuaguaLineRecordReader

        public GuaguaLineRecordReader()
      • GuaguaLineRecordReader

        public GuaguaLineRecordReader​(ml.shifu.guagua.io.GuaguaFileSplit split)
                               throws IOException
        Throws:
        IOException
      • GuaguaLineRecordReader

        public GuaguaLineRecordReader​(org.apache.hadoop.conf.Configuration conf,
                                      ml.shifu.guagua.io.GuaguaFileSplit split)
                               throws IOException
        Throws:
        IOException