This is an automated email from the ASF dual-hosted git repository.

exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git


The following commit(s) were added to refs/heads/main by this push:
     new 4c841b3291 NIFI-15531 Repositioned logging for NAR expansion to 
include extension mapping (#10836)
4c841b3291 is described below

commit 4c841b329105607d9b499ec663608474e75dfa5a
Author: dan-s1 <[email protected]>
AuthorDate: Wed Feb 4 10:13:53 2026 -0500

    NIFI-15531 Repositioned logging for NAR expansion to include extension 
mapping (#10836)
    
    Signed-off-by: David Handermann <[email protected]>
---
 .../src/main/java/org/apache/nifi/nar/NarUnpacker.java      | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git 
a/nifi-framework-bundle/nifi-framework/nifi-nar-utils/src/main/java/org/apache/nifi/nar/NarUnpacker.java
 
b/nifi-framework-bundle/nifi-framework/nifi-nar-utils/src/main/java/org/apache/nifi/nar/NarUnpacker.java
index 8ef4c93fa5..773ad44d67 100644
--- 
a/nifi-framework-bundle/nifi-framework/nifi-nar-utils/src/main/java/org/apache/nifi/nar/NarUnpacker.java
+++ 
b/nifi-framework-bundle/nifi-framework/nifi-nar-utils/src/main/java/org/apache/nifi/nar/NarUnpacker.java
@@ -116,9 +116,10 @@ public final class NarUnpacker {
                 }
             }
 
+            final long startTime = System.nanoTime();
+            logger.info("Expanding {} NAR files started", narFiles.size());
+
             if (!narFiles.isEmpty()) {
-                final long startTime = System.nanoTime();
-                logger.info("Expanding {} NAR files started", narFiles.size());
                 for (File narFile : narFiles) {
                     if (!narFile.canRead()) {
                         throw new IllegalStateException("Unable to read NAR 
file: " + narFile.getAbsolutePath());
@@ -199,10 +200,6 @@ public final class NarUnpacker {
                         }
                     }
                 }
-
-                final long duration = System.nanoTime() - startTime;
-                final double durationSeconds = 
TimeUnit.NANOSECONDS.toMillis(duration) / 1000.0;
-                logger.info("Expanded {} NAR files in {} seconds ({} ns)", 
narFiles.size(), durationSeconds, duration);
             }
 
             final Map<File, BundleCoordinate> unpackedNars = new 
HashMap<>(createUnpackedNarBundleCoordinateMap(extensionsWorkingDir));
@@ -211,6 +208,10 @@ public final class NarUnpacker {
             mapExtensions(unpackedNars, extensionMapping);
             populateExtensionMapping(extensionMapping, 
systemBundle.getBundleDetails().getCoordinate(), 
systemBundle.getBundleDetails().getWorkingDirectory());
 
+            final long duration = System.nanoTime() - startTime;
+            final double durationSeconds = 
TimeUnit.NANOSECONDS.toMillis(duration) / 1000.0;
+            logger.info("Expanded {} NAR files in {} seconds ({} ns)", 
narFiles.size(), durationSeconds, duration);
+
             return extensionMapping;
         } catch (IOException e) {
             logger.warn("Unable to load NAR bundles. Proceeding without 
loading any further NAR bundles", e);

Reply via email to