Пример #1
0
 private static List<Text> readSplit(TextInputFormat format, InputSplit split, JobConf job)
     throws IOException {
   List<Text> result = new ArrayList<Text>();
   RecordReader<LongWritable, Text> reader = format.getRecordReader(split, job, voidReporter);
   LongWritable key = reader.createKey();
   Text value = reader.createValue();
   while (reader.next(key, value)) {
     result.add(value);
     value = reader.createValue();
   }
   reader.close();
   return result;
 }