public boolean hasNext() {
    while (curFileIndex < filePaths.size()) {
      if (curReader.hasNext()) {
        return true;
      }
      curReader.close();
      curFileIndex++;
      if (curFileIndex < filePaths.size()) {
        curReader = HdfsReaderFactory.getHdfsReader(readerType, systemStreamPartition);
        curReader.open(filePaths.get(curFileIndex), "0");
      }
    }
    return false;
  }
Generate the offset based on file index and offset within single file
@param fileIndex index of the file
@param singleFileOffset offset within single file
@return the complete offset
samza-hdfs/src/main/java/org/apache/samza/system/hdfs/reader/MultiFileHdfsReader.java