LinkedList<Future<Map<String, Integer>>> mappedFuturesList = new LinkedList<Future<Map<String, Integer>>>();
while (fileIterator.hasNext()) {
// Start the futures here. Pair mapping futures with Partition /
// Reduce futures
InitialMapWork work = new InitialMapWork((File) fileIterator.next());
LinkedList<Future<Map<String, Integer>>> futureMaps = (LinkedList<Future<Map<String, Integer>>>) this.mapWorkRouter
.sendRequestReply(work, getContext());
mappedFuturesList.addAll(futureMaps);
}
return mappedFuturesList;