/** * Called once at initialization. * * @param conf a configuration for initialization * @param split the split that defines the range of records to read * @throws IOException * @throws InterruptedException */ @Override public void initialize(Configuration conf, InputSplit split) throws IOException, InterruptedException { initialize(split); }
/** * Creates a reader from an input split * * @param split the split to read * @return the reader from the given input split */ @Override public RecordReader createReader(InputSplit split) throws IOException, InterruptedException { RecordReader reader = new ListStringRecordReader(); reader.initialize(split); return reader; }
/** * Get the next record * * @return */ @Override public Collection<Writable> next() { List<String> next = dataIter.next(); invokeListeners(next); List<Writable> ret = new ArrayList<>(); for(String s : next) ret.add(new Text(s)); return ret; }
/** * Creates a reader from an input split * * @param split the split to read * @param conf * @return the reader from the given input split */ @Override public RecordReader createReader(InputSplit split, Configuration conf) throws IOException, InterruptedException { RecordReader reader = new ListStringRecordReader(); reader.initialize(conf,split); return reader; }