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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2eac0e9  NIFI-5962 protecting against null Configuration in 
AbstractHadoopProcessor onStopped
2eac0e9 is described below

commit 2eac0e96c73e03809b02b4a3be029842754e649f
Author: Bryan Bende <[email protected]>
AuthorDate: Fri Jan 18 09:14:21 2019 -0500

    NIFI-5962 protecting against null Configuration in AbstractHadoopProcessor 
onStopped
    
    This closes #3270.
---
 .../apache/nifi/processors/hadoop/AbstractHadoopProcessor.java   | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git 
a/nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
 
b/nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
index 4104e30..c46fd63 100644
--- 
a/nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
+++ 
b/nifi-nar-bundles/nifi-extension-utils/nifi-hadoop-utils/src/main/java/org/apache/nifi/processors/hadoop/AbstractHadoopProcessor.java
@@ -251,7 +251,7 @@ public abstract class AbstractHadoopProcessor extends 
AbstractProcessor {
                 resources = resetHDFSResources(configResources, context);
                 hdfsResources.set(resources);
             }
-        } catch (IOException ex) {
+        } catch (Exception ex) {
             getLogger().error("HDFS Configuration error - {}", new Object[] { 
ex });
             hdfsResources.set(new HdfsResources(null, null, null));
             throw ex;
@@ -267,7 +267,8 @@ public abstract class AbstractHadoopProcessor extends 
AbstractProcessor {
             try {
                 interruptStatisticsThread(fileSystem);
             } catch (Exception e) {
-                getLogger().warn("Error stopping FileSystem statistics thread: 
" + e.getMessage(), e);
+                getLogger().warn("Error stopping FileSystem statistics thread: 
" + e.getMessage());
+                getLogger().debug("", e);
             } finally {
                 if (fileSystem != null) {
                     try {
@@ -283,7 +284,9 @@ public abstract class AbstractHadoopProcessor extends 
AbstractProcessor {
 
             // Clean-up the reference to the InstanceClassLoader that was put 
into Configuration
             final Configuration configuration = resources.getConfiguration();
-            configuration.setClassLoader(null);
+            if (configuration != null) {
+                configuration.setClassLoader(null);
+            }
 
             // Need to remove the Provider instance from the JVM's Providers 
class so that InstanceClassLoader can be GC'd eventually
             final SaslPlainServer.SecurityProvider saslProvider = new 
SaslPlainServer.SecurityProvider();

Reply via email to