Skip to content

NIFI-4745 : configuration property allowing failure description proce…#2384

Closed
ghost wants to merge 1 commit intomasterfrom
unknown repository
Closed

NIFI-4745 : configuration property allowing failure description proce…#2384
ghost wants to merge 1 commit intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Jan 7, 2018

…ssing

We need to pass description of validation failure further in
processing chain, and eventually pass it back to calling system.
Therefore having failure desc logged in logs and issued as provenance
route event is not sufficient for us.

This patch adds new property, specifying name of attribute to be
created and filled with validation failure description.

Signed-off-by: Martin Mucha alfonz19@gmail.com

…ssing

We need to pass description of validation failure further in
processing chain, and eventually pass it back to calling system.
Therefore having failure desc logged in logs and issued as provenance
route event is not sufficient for us.

This patch adds new property, specifying name of attribute to be
created and filled with validation failure description.

Signed-off-by: Martin Mucha <alfonz19@gmail.com>
@ghost
Copy link
Author

ghost commented Jan 7, 2018

Hi!

This is my first contribution. Please help me to finish this; I don't like the śtate of code in this file, and would like to agree on doing some refactorings, namely completelyFlowFile having too many arguments. Ideally I wouldn't like to pass attributeNameToStoreFailureDescription into this method, but I did not find a way how to add attribute, when writer is not closed yet. Please comment heavily if needed, I'm here ready to fix all issues!
Thanks!

@ghost ghost closed this Jan 9, 2018
@ghost ghost deleted the emitFailureDescription branch January 9, 2018 17:18
@ijokarumawak
Copy link
Member

Hi @martin-mucha Thanks for your first contribution! The PR is closed without being reviewed and I can't find other PRs created for NIFI-4745. Do you have a PR ready for being reviewed somewhere?

About your concern to add another argument to the completeFlowFile method which has already lots of arguments, I think that should be fine, since it's just a private method and the method is a good place to add new attribute values.

BTW, ValidateRecord can validate multiple Records within a single incoming FlowFile. Is it going to be sufficient to write validation result to a FlowFile attribute? Isn't it be more useful if we can write validation failure detail to the outgoing Records, so that each record can have its failure detail?

This pull request was closed.
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