public static int getCurFileIndex(String offset) {
    String[] elements = offset.split(DELIMITER);
    if (elements.length < 2) {
      throw new SamzaException("Invalid offset for MultiFileHdfsReader: " + offset);
    }
    return Integer.parseInt(elements[0]);
  }
Get the current file index from the offset string
@param offset offset string that contains both file index and offset within file
@return the file index part
samza-hdfs/src/main/java/org/apache/samza/system/hdfs/reader/MultiFileHdfsReader.java