docs: @Override
      public AbstractHttpEntity harvest(long generation) {
          DecoderHelper decoder = null;
          DataFileWriter<GenericRecord> fileWriter = null;
          ByteBufferEntity entity = null;
          //Now iterate over records and write
          Iterator<GenericRecord> itr = m_records.iterator();
          try {
              while (itr.hasNext()) {
                  GenericRecord record = itr.next();
                  if (decoder == null) {
                      decoder = decoder(generation, record.getSchema());
                  }
                  fileWriter = decoder.m_fileWriter;
                  fileWriter.append(record);
                  itr.remove();
              }
  
              if (fileWriter != null) {
                  fileWriter.flush();
              }
              if (decoder != null) {
                  entity = new ByteBufferEntity(decoder.m_bbos.toByteBuffer(), AvroContentType);
              }
          }
          catch (IOException e) {
              throw new BulkException("failed to append to the avro data container", e);
          }
          finally {
              if (decoder != null) {
                  decoder.m_bbos.reset();
              }
              m_records.clear();
          }
  
          return entity;
      }