Skip to content

NIFI-6367 - more error handling for FetchS3Object#3563

Closed
Evanthx wants to merge 1 commit intomasterfrom
unknown repository
Closed

NIFI-6367 - more error handling for FetchS3Object#3563
Evanthx wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@Evanthx
Copy link
Contributor

@Evanthx Evanthx commented Jul 2, 2019

In some circumstances FetchS3Processor will penalize the flowfile instead of failing it, and can get into a loop where it continually tries to process the flowfile and never succeeds or fails.

This simply adds some error handling checks to avoid that.

final Map<String, String> attributes = new HashMap<>();
try (final S3Object s3Object = client.getObject(request)) {
if (s3Object == null) {
throw new IOException("AWS refused to execute this request.");
Copy link
Contributor

@joewitt joewitt Aug 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as a general rule intentionally throwing this to simple catch it below is really just using exceptions for flow control which isn't awesome as it does have a pretty significant impact on the performance of the jvm during stack generation. that said this is something we can improve it becomes a real problem and it isn't like we're perfect in this regard elsehwere

@asfgit asfgit closed this in e2ca50e Aug 28, 2019
@joewitt
Copy link
Contributor

joewitt commented Aug 28, 2019

+1 merged to master. thanks

szaboferee pushed a commit to szaboferee/nifi that referenced this pull request Oct 7, 2019
…bject

Signed-off-by: Joe Witt <joewitt@apache.org>
patricker pushed a commit to patricker/nifi that referenced this pull request Jan 22, 2020
…bject

Signed-off-by: Joe Witt <joewitt@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants