mirror of
https://github.com/apache/nifi.git
synced 2025-02-07 02:28:31 +00:00
NIFI-11591: Added additional logging for DynamicallyModifyClasspath system test
This closes #7312 Signed-off-by: David Handermann <exceptionfactory@apache.org> (cherry picked from commit 4b7e20740e4777f6e64e69db7b0c597cc0fb7e5e)
This commit is contained in:
parent
649494f7c1
commit
bd26936f24
@ -287,6 +287,8 @@ public abstract class AbstractFlowFileQueue implements FlowFileQueue {
|
||||
dropRequest.setDroppedSize(originalSize);
|
||||
dropRequest.setState(DropFlowFileState.COMPLETE);
|
||||
dropRequestMap.put(requestIdentifier, dropRequest);
|
||||
|
||||
logger.info("No FlowFiles to drop from {} for request {} because the queue is empty", this, requestIdentifier);
|
||||
return dropRequest;
|
||||
}
|
||||
|
||||
|
@ -98,11 +98,15 @@ public class DynamicallyModifyClasspath extends AbstractProcessor {
|
||||
|
||||
final long sleepMillis = context.getProperty(SLEEP_DURATION).evaluateAttributeExpressions(flowFile).asTimePeriod(TimeUnit.MILLISECONDS);
|
||||
if (sleepMillis > 0) {
|
||||
getLogger().info("Sleeping for {} millis", sleepMillis);
|
||||
|
||||
try {
|
||||
Thread.sleep(sleepMillis);
|
||||
} catch (final InterruptedException e) {
|
||||
Thread.currentThread().interrupt();
|
||||
}
|
||||
|
||||
getLogger().info("Finished sleeping");
|
||||
}
|
||||
|
||||
final String classToLoad = context.getProperty(CLASS_TO_LOAD).getValue();
|
||||
@ -118,8 +122,12 @@ public class DynamicallyModifyClasspath extends AbstractProcessor {
|
||||
}
|
||||
|
||||
session.transfer(flowFile, REL_SUCCESS);
|
||||
getLogger().info("Transferred {} to success", flowFile);
|
||||
} catch (final Exception e) {
|
||||
getLogger().error("Failed to update {}", flowFile, e);
|
||||
|
||||
session.transfer(flowFile, REL_FAILURE);
|
||||
getLogger().info("Transferred {} to failure", flowFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user