@Test public void progress() throws IOException { assertTrue(PcapReader.HEADER_SIZE / (float)TEST_FILE.length() == recordReader.getProgress()); skipToEnd(); assertTrue(1.0 == recordReader.getProgress()); }
@Override public float getProgress() throws IOException { if (start == end) return 0; return Math.min(1.0f, (getPos() - start) / (float)(end - start)); }
PcapRecordReader extends RecordReader<LongWritable, ObjectWritable> { @Override public float getProgress() throws IOException { if (start == end) return 0; return Math.min(1.0f, (getPos() - start) / (float)(end - start)); } }
PcapRecordReader extends RecordReader<LongWritable, ObjectWritable> { @Override public float getProgress() throws IOException { if (start == end) return 0; return Math.min(1.0f, (getPos() - start) / (float)(end - start)); } PcapRecordReader(PcapReader pcapReader, long start, long end, Seekable baseStream, DataInputStream stream, TaskAttemptContext context); }
PcapRecordReader extends RecordReader<LongWritable, ObjectWritable> { @Override public float getProgress() throws IOException { if (start == end) return 0; return Math.min(1.0f, (getPos() - start) / (float)(end - start)); } PcapRecordReader(PcapReader pcapReader, long start, long end, Seekable baseStream, DataInputStream stream, TaskAttemptContext context); @Override void initialize(InputSplit inputSplit, TaskAttemptContext taskAttemptContext); @Override void close(); @Override boolean nextKeyValue(); @Override ObjectWritable getCurrentValue(); @Override LongWritable getCurrentKey(); long getPos(); @Override float getProgress(); }
PcapRecordReader extends RecordReader<LongWritable, ObjectWritable> { @Override public float getProgress() throws IOException { if (start == end) return 0; return Math.min(1.0f, (getPos() - start) / (float)(end - start)); } PcapRecordReader(PcapReader pcapReader, long start, long end, Seekable baseStream, DataInputStream stream, TaskAttemptContext context); @Override void initialize(InputSplit inputSplit, TaskAttemptContext taskAttemptContext); @Override void close(); @Override boolean nextKeyValue(); @Override ObjectWritable getCurrentValue(); @Override LongWritable getCurrentKey(); long getPos(); @Override float getProgress();  }