[NIFI-774] Create a DeleteS3Object Processor#80
[NIFI-774] Create a DeleteS3Object Processor#80asfgit merged 9 commits intoapache:masterfrom yu-iskw:NIFI-774
Conversation
There was a problem hiding this comment.
Yu, I do not believe you need to override getSupportedDynamicPropertyDescriptor since this processor does not use dynamic properties
|
Yu, this looks great. Thanks again for sticking with it and contributing. I made one comment inline. I have one other comment that I'd like to get others feedback on:
Basically, you would be adding a "not found" relationship, and routing FlowFiles there when you they are not found in S3 before you attempt to delete them. The reason being, you allow the user of your processor the opportunity to treat "not found" situations differently from "failure" situations. I tried to find other cases like this in the NiFi processor marketplace, but I couldn't. (https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-aws-bundle/nifi-aws-processors/src/main/java/org/apache/nifi/processors/aws/sqs/DeleteSQS.java) is the only "delete" processor I see, and it doesn't behave the way I am describing. |
|
@danbress thank you for the comment. That sounds good. It would be nice to add a property in order for users to handle if "not found" raises an error or not. |
… doesn't exist on S3
|
@danbress could you review it?
|
|
Yu, looks good to me. 0.3.0 is being tested right now, as soon as it is tested and released I will merge these changes in. Thanks again for your contribution. |
|
@danbress thank you for reviewing it. Sorry, one more thing, I fixed a typo and modified an error message. I look forward to merging it. |
|
I'm not sure that checking for the existence of an existing object is that important. At minimum, it's causing an extra call to the remote S3 service to determine if the object exists. The S3 service itself will not return a different response code (edit: for the DELETE call) if the object previously existed. What value is added by having the REL_NOT_FOUND relationship? What use case is this trying to solve? A request to delete an object, regardless of its previous existence, still results in the same remote state. HTTP DELETE, being an idempotent method, doesn't really care if the object existed beforehand or not. |
|
@yu-iskw Looks great! Only thing I see right now is that the REL_NOT_FOUND relationship isn't needed anymore. Thanks again for the contribution. I will try and merge this in as soon as 0.3.0 is released. |
|
@danbress thank you for pointing out the easy mistake. I fixed it. |
|
Thank you for merging it! |
This closes apache#80. Signed-off-by: Bryan Rosander <brosander@apache.org>
…he#80) (cherry picked from commit e632ec7cbafca6180b98496ac72f71ba09653610)
I'm sorry for the delay of my sending a new PR again. @danbress could you review it?
JIRA
[NIFI-774] Create a DeleteS3Object Processor - ASF JIRA
Old PR
#72