private void scanActiveLogs() throws IOException { RemoteIterator<FileStatus> iter = fs.listStatusIterator(activeRootPath); while (iter.hasNext()) { FileStatus stat = iter.next(); ApplicationId appId = toAppId(stat.getPath().getName()); if (appId != null) { AppLogs logs = getActiveApp(appId, stat.getPath()); executor.execute(new ActiveLogParser(logs)); } } }