int scanActiveLogs(Path dir) throws IOException { RemoteIterator<FileStatus> iter = list(dir); int logsToScanCount = 0; while (iter.hasNext()) { FileStatus stat = iter.next(); String name = stat.getPath().getName(); ApplicationId appId = parseApplicationId(name); if (appId != null) { LOG.debug("scan logs for {} in {}", appId, stat.getPath()); logsToScanCount++; AppLogs logs = getAndSetActiveLog(appId, stat.getPath()); executor.execute(new ActiveLogParser(logs)); } else { logsToScanCount += scanActiveLogs(stat.getPath()); } } return logsToScanCount; }
} else { RemoteIterator<FileStatus> iter = list(activeRootPath); while (iter.hasNext()) { Path child = new Path(iter.next().getPath().getName(),
long now = Time.now(); RemoteIterator<FileStatus> iter = list(dirpath); while (iter.hasNext()) { FileStatus stat = iter.next();