mirror of
https://github.com/apache/nifi.git
synced 2025-02-19 17:04:58 +00:00
Merge branch 'develop' of https://git-wip-us.apache.org/repos/asf/incubator-nifi into develop
This commit is contained in:
commit
e456ea37f4
@ -130,8 +130,14 @@ public class SocketClient implements SiteToSiteClient {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
final Transaction transaction = connectionState.getSocketClientProtocol().startTransaction(
|
final Transaction transaction;
|
||||||
|
try {
|
||||||
|
transaction = connectionState.getSocketClientProtocol().startTransaction(
|
||||||
connectionState.getPeer(), connectionState.getCodec(), direction);
|
connectionState.getPeer(), connectionState.getCodec(), direction);
|
||||||
|
} catch (final Throwable t) {
|
||||||
|
pool.terminate(connectionState);
|
||||||
|
throw t;
|
||||||
|
}
|
||||||
|
|
||||||
// Wrap the transaction in a new one that will return the EndpointConnectionState back to the pool whenever
|
// Wrap the transaction in a new one that will return the EndpointConnectionState back to the pool whenever
|
||||||
// the transaction is either completed or canceled.
|
// the transaction is either completed or canceled.
|
||||||
|
@ -339,8 +339,8 @@ public final class StandardProcessScheduler implements ProcessScheduler {
|
|||||||
final ProcessorLog procLog = new SimpleProcessLogger(procNode.getIdentifier(), procNode.getProcessor());
|
final ProcessorLog procLog = new SimpleProcessLogger(procNode.getIdentifier(), procNode.getProcessor());
|
||||||
|
|
||||||
procLog.error("{} failed to invoke @OnScheduled method due to {}; processor will not be scheduled to run for {}",
|
procLog.error("{} failed to invoke @OnScheduled method due to {}; processor will not be scheduled to run for {}",
|
||||||
new Object[]{procNode.getProcessor(), cause.getCause(), administrativeYieldDuration}, cause.getCause());
|
new Object[]{procNode.getProcessor(), cause, administrativeYieldDuration}, cause);
|
||||||
LOG.error("Failed to invoke @OnScheduled method due to {}", cause.getCause().toString(), cause.getCause());
|
LOG.error("Failed to invoke @OnScheduled method due to {}", cause.toString(), cause);
|
||||||
|
|
||||||
ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnUnscheduled.class, procNode.getProcessor(), processContext);
|
ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnUnscheduled.class, procNode.getProcessor(), processContext);
|
||||||
ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnStopped.class, procNode.getProcessor(), processContext);
|
ReflectionUtils.quietlyInvokeMethodsWithAnnotation(OnStopped.class, procNode.getProcessor(), processContext);
|
||||||
|
@ -243,7 +243,7 @@ public class SimpleProcessLogger implements ProcessorLog {
|
|||||||
for (int i = 0; i < os.length; i++) {
|
for (int i = 0; i < os.length; i++) {
|
||||||
modifiedArgs[i + 1] = os[i];
|
modifiedArgs[i + 1] = os[i];
|
||||||
}
|
}
|
||||||
modifiedArgs[modifiedArgs.length - 1] = t.toString();
|
modifiedArgs[modifiedArgs.length - 1] = (t == null) ? "" : t.toString();
|
||||||
|
|
||||||
return modifiedArgs;
|
return modifiedArgs;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user