@Test public void testGetRecordReader() throws IOException { BlurInputFormat format = new BlurInputFormat(); JobConf job = new JobConf(new Configuration()); FileInputFormat.addInputPath(job, indexPath); InputSplit[] splits = format.getSplits(job, -1); for (int i = 0; i < splits.length; i++) { RecordReader<Text, BlurRecord> reader = format.getRecordReader(splits[i], job, Reporter.NULL); Text key = reader.createKey(); BlurRecord value = reader.createValue(); while (reader.next(key, value)) { System.out.println(reader.getProgress() + " " + key + " " + value); } } }
@Override public RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { reporter.setStatus(split.toString()); return new BlurRecordReader(split,job); }
BlurInputFormat implements InputFormat<Text, BlurRecord> { @Override public RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { reporter.setStatus(split.toString()); return new BlurRecordReader(split,job); } }
BlurInputFormat implements InputFormat<Text, BlurRecord> { @Override public RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { reporter.setStatus(split.toString()); return new BlurRecordReader(split,job); }  }
BlurInputFormat implements InputFormat<Text, BlurRecord> { @Override public RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { reporter.setStatus(split.toString()); return new BlurRecordReader(split,job); }  @Override InputSplit[] getSplits(JobConf job, int numSplits); @Override RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter); }
BlurInputFormat implements InputFormat<Text, BlurRecord> { @Override public RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { reporter.setStatus(split.toString()); return new BlurRecordReader(split,job); }  @Override InputSplit[] getSplits(JobConf job, int numSplits); @Override RecordReader<Text, BlurRecord> getRecordReader(InputSplit split, JobConf job, Reporter reporter);  }