Skip to content

Commit

Permalink
Add logging for running count of source paths not found
Browse files Browse the repository at this point in the history
  • Loading branch information
phet committed Oct 13, 2022
1 parent 5cbc405 commit 72b5662
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ protected Map<Path, FileStatus> getFilePathsToFileStatus(FileSystem targetFs, Co
);

Map<Path, FileStatus> results = Maps.newHashMap();
long numSourceFilesNotFound = 0L;
Iterable<String> filePathsIterable = () -> filePathsIterator;
try {
// TODO: investigate whether streaming initialization of `Map` preferable--`getFileStatus()` network calls likely
Expand All @@ -251,9 +252,10 @@ protected Map<Path, FileStatus> getFilePathsToFileStatus(FileSystem targetFs, Co
throw fnfe;
} else {
// log, but otherwise swallow... to continue on
String total = ++numSourceFilesNotFound + " total";
String speculation = "either premature deletion broke time-travel or metadata read interleaved among delete";
errorConsolidator.prepLogMsg(path).ifPresent(msg ->
log.warn("~{}.{}~ source {} ({}...)", dbName, inputTableName, msg, speculation)
log.warn("~{}.{}~ source {} ({}... {})", dbName, inputTableName, msg, speculation, total)
);
}
}
Expand Down

0 comments on commit 72b5662

Please sign in to comment.