GsonRecordReader extends RecordReader<LongWritable, JsonObject> { @Override public float getProgress() throws IOException { return lineReader.getProgress(); }  @Override void initialize(InputSplit genericSplit, TaskAttemptContext context); @Override boolean nextKeyValue(); @Override LongWritable getCurrentKey(); @Override JsonObject getCurrentValue(); @Override float getProgress(); @Override void close();  }
@Test public void testGetProgress() throws Exception { GsonRecordReader multipleRecordReader = getRecordReader(60); assertThat(multipleRecordReader.nextKeyValue()).isTrue(); assertThat(multipleRecordReader.getProgress()).isWithin(.01f).of(.58f); assertThat(multipleRecordReader.nextKeyValue()).isTrue(); assertThat(multipleRecordReader.getProgress()).isWithin(.01f).of(1); assertThat(multipleRecordReader.nextKeyValue()).isFalse(); assertThat(multipleRecordReader.getProgress()).isWithin(.01f).of(1); multipleRecordReader.close(); }