@Override
  public IncomingMessageEnvelope readNext() {
    // get checkpoint for THIS record
    String checkpoint = nextOffset();
    GenericRecord record = fileReader.next();
    if (fileReader.previousSync() != curBlockStart) {
      curBlockStart = fileReader.previousSync();
      curRecordOffset = 0;
    } else {
      curRecordOffset++;
    }
    // avro schema doesn't necessarily have key field
    return new IncomingMessageEnvelope(systemStreamPartition, checkpoint, null, record);
  }
An implementation of the HdfsReader that reads and processes avro format
files.
samza-hdfs/src/main/java/org/apache/samza/system/hdfs/reader/AvroFileHdfsReader.java