public static ArrayList<String> getListFromFileList(FileList fl) {
    ArrayList<String> result = new ArrayList<>();
    while (fl.hasNext()) {
      result.add(fl.next());
    }
    return result;
  }
Extracts the entries from FileList into an ArrayList
@param fl the FileList
@return the ArrayList containing the entries.
ql/src/java/org/apache/hadoop/hive/ql/exec/repl/util/SnapshotUtils.java