NIFI-7535 add detailed error message when .nar file is not readable

This closes #6056
Signed-off-by: Bence Simon <bsimon@apache.org>
This commit is contained in:
Nandor Soma Abonyi 2022-05-17 13:20:34 +02:00 committed by Bence Simon
parent c51f70b6e6
commit f99298f98e
No known key found for this signature in database
GPG Key ID: 322D3487862316BA
1 changed files with 4 additions and 0 deletions

View File

@ -122,6 +122,10 @@ public final class NarUnpacker {
final long startTime = System.nanoTime();
logger.info("Expanding " + narFiles.size() + " NAR files with all processors...");
for (File narFile : narFiles) {
if (!narFile.canRead()) {
throw new IllegalStateException("Unable to read NAR file: " + narFile.getAbsolutePath());
}
logger.debug("Expanding NAR file: " + narFile.getAbsolutePath());
// get the manifest for this nar