@VisibleForTesting
void check(String parent, HdfsFileStatus file, Result replRes, Result ecRes)
throws IOException {
String path = file.getFullName(parent);
if (showprogress &&
(totalDirs + totalSymlinks + replRes.totalFiles + ecRes.totalFiles)
% 100 == 0) {
out.println();
out.flush();
}
if (file.isDirectory()) {
checkDir(path, replRes, ecRes);
return;
}
if (file.isSymlink()) {
if (showFiles) {
out.println(path + " <symlink>");
}
totalSymlinks++;
return;
}
LocatedBlocks blocks = getBlockLocations(path, file);
if (blocks == null) {
return;
}
final Result r = file.getErasureCodingPolicy() != null ? ecRes: replRes;
collectFileSummary(path, file, r, blocks);
collectBlocksSummary(parent, file, r, blocks);
}