You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2015/12/31 21:37:37 UTC
[5/5] nifi git commit: NIFI-1164: Fixed contrib-check issues,
log message
NIFI-1164: Fixed contrib-check issues, log message
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/8e031c98
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/8e031c98
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/8e031c98
Branch: refs/heads/master
Commit: 8e031c987bc0781f02e1ca90b37ffc379f835eeb
Parents: 71544cd
Author: Mark Payne <ma...@hotmail.com>
Authored: Thu Dec 31 15:37:00 2015 -0500
Committer: Mark Payne <ma...@hotmail.com>
Committed: Thu Dec 31 15:37:00 2015 -0500
----------------------------------------------------------------------
.../controller/service/StandardControllerServiceNode.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/8e031c98/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java
index 6062db7..ba03ee3 100644
--- a/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java
+++ b/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/main/java/org/apache/nifi/controller/service/StandardControllerServiceNode.java
@@ -292,11 +292,15 @@ public class StandardControllerServiceNode extends AbstractConfiguredComponent i
stateRef.set(ControllerServiceState.DISABLED);
}
} catch (Exception e) {
+ final Throwable cause = e instanceof InvocationTargetException ? e.getCause() : e;
+ final ComponentLog componentLog = new SimpleProcessLogger(getIdentifier(), StandardControllerServiceNode.this);
+ componentLog.error("Failed to invoke @OnEnabled method due to {}", cause);
+ LOG.error("Failed to invoke @OnEnabled method of {} due to {}", getControllerServiceImplementation(), cause.toString());
invokeDisable(configContext, heartbeater);
+
if (isActive()) {
scheduler.schedule(this, administrativeYieldMillis, TimeUnit.MILLISECONDS);
- }
- else {
+ } else {
ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnDisabled.class, getControllerServiceImplementation(), configContext);
stateRef.set(ControllerServiceState.DISABLED);
}