@Test @Category(UnitTest.class) public void testNextKeyValue() throws Exception { for (int i = 0; i < tileIds.length; i++) { Assert.assertTrue("more key values exist", subject.nextKeyValue()); byte[] r1 = rasters[i].copyBytes(); byte[] r2 = subject.getCurrentValue().copyBytes(); for (int b = 0; b < rasters[i].getSize(); b++) { Assert.assertEquals(r1[b], r2[b]); } Assert.assertEquals(tileIds[i].get(), subject.getCurrentKey().get()); } Assert.assertFalse("no more key values exist", subject.nextKeyValue()); }
@Override public boolean nextKeyValue() throws IOException, InterruptedException { if (more) { more = reader.next(key, value); if (!more) { key = null; value = null; } else { recordCount++; } } return more; }
HdfsMrsPyramidRecordReader extends RecordReader<TileIdWritable, RasterWritable> { @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (more) { more = reader.next(key, value); if (!more) { key = null; value = null; } else { recordCount++; } } return more; } }
HdfsMrsPyramidRecordReader extends RecordReader<TileIdWritable, RasterWritable> { @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (more) { more = reader.next(key, value); if (!more) { key = null; value = null; } else { recordCount++; } } return more; } HdfsMrsPyramidRecordReader();  HdfsMrsPyramidRecordReader(ReaderFactory readerFactory); }
HdfsMrsPyramidRecordReader extends RecordReader<TileIdWritable, RasterWritable> { @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (more) { more = reader.next(key, value); if (!more) { key = null; value = null; } else { recordCount++; } } return more; } HdfsMrsPyramidRecordReader();  HdfsMrsPyramidRecordReader(ReaderFactory readerFactory); @Override TileIdWritable getCurrentKey(); @Override RasterWritable getCurrentValue(); @Override // TODO eaw this should probably throw an UnsupportedOperationException since it does not meet the contract on getProgress because recordCount is never updated float getProgress(); @Override void close(); @Override void initialize(InputSplit split, TaskAttemptContext context); @Override boolean nextKeyValue(); }
HdfsMrsPyramidRecordReader extends RecordReader<TileIdWritable, RasterWritable> { @Override public boolean nextKeyValue() throws IOException, InterruptedException { if (more) { more = reader.next(key, value); if (!more) { key = null; value = null; } else { recordCount++; } } return more; } HdfsMrsPyramidRecordReader();  HdfsMrsPyramidRecordReader(ReaderFactory readerFactory); @Override TileIdWritable getCurrentKey(); @Override RasterWritable getCurrentValue(); @Override // TODO eaw this should probably throw an UnsupportedOperationException since it does not meet the contract on getProgress because recordCount is never updated float getProgress(); @Override void close(); @Override void initialize(InputSplit split, TaskAttemptContext context); @Override boolean nextKeyValue();  }