ChrisSamo632 commented on code in PR #7529:
URL: https://github.com/apache/nifi/pull/7529#discussion_r1315165952
##########
nifi-nar-bundles/nifi-aws-bundle/nifi-aws-abstract-processors/src/main/java/org/apache/nifi/processors/aws/v2/AbstractAwsProcessor.java:
##########
@@ -192,6 +181,28 @@ public abstract class AbstractAwsProcessor<T extends
SdkClient, U extends AwsSyn
private final AwsClientCache<T> awsClientCache = new AwsClientCache<>();
+ /*
+ * Allow optional override of onTrigger with the ProcessSessionFactory
where required for AWS processors (e.g. ConsumeKinesisStream)
+ *
+ * @see AbstractProcessor
+ */
+ @Override
+ public void onTrigger(final ProcessContext context, final
ProcessSessionFactory sessionFactory) throws ProcessException {
+ final ProcessSession session = sessionFactory.createSession();
+ try {
+ onTrigger(context, session);
+ session.commitAsync();
+ } catch (final Throwable t) {
Review Comment:
Don't like it (the `Throwable` handling in `AbstractProcessor`), but fair
enough, makes sense to leave this as-is in that case
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]