NIFI-11480 add option to group PutElasticsearchRecord errors by Elasticsearch _bulk error type#7441
NIFI-11480 add option to group PutElasticsearchRecord errors by Elasticsearch _bulk error type#7441ChrisSamo632 wants to merge 1 commit intoapache:mainfrom
Conversation
…icsearch _bulk error type
|
How do you test different errors in a NiFi instance (not a unit test)? Given the Operation I can only generate one kind of error at a time. This looks good though, just want to verify I can get groups of errors then I'll merge |
@mattyb149 my suggestion (although I'll not be in a position to try it for a while), would be to create an index with a numeric field mapping, index a document with a known id, then run the processor in update mode with 2 records - 1 with a mismatched id (should result in a not_found error), the 2nd with the correct id but a non-numeric value for the numeric field (should give a "format exception") From memory, this is the kind of thing I've tried to show in the unit/integration tests This could possibly all be done with a single FlowFile and run off the processor - the index operation can be set by the value of a field within a record. So something like:
Index=bulk_test, Index Op record path=/Op, id record path=/id That's a chance Elasticsearch will set the "baz" fields mapping to string by default, but hopefully it'll choose Integer. If so, we'll need to separately define the index mappings and pre-create the index with an InvokeHTTP call (for example). If you don't get to it first, I'll try to put a Flow Definition together and attach it to the jira ticket as an example |
|
@mattyb149 I've added an example Flow Definition to the Jira ticket that exhibits this behaviour, for reference |
|
+1 LGTM, thanks for the improvement and the reproduction flow! Merging to support/nifi-1.x and main |
…archTest and PaginatedJsonQueryElasticsearchTest and incorporated the changes from apache#7441.
…archTest and PaginatedJsonQueryElasticsearchTest and incorporated the changes from apache#7441.
Summary
NIFI-11480 - add option to group PutElasticsearchRecord errors by Elasticsearch _bulk error type
Tracking
Please complete the following tracking steps prior to pull request creation.
Issue Tracking
Pull Request Tracking
NIFI-00000NIFI-00000Pull Request Formatting
mainbranchVerification
Please indicate the verification steps performed prior to pull request creation.
Build
mvn clean install -P contrib-checkLicensing
[ ] New dependencies are compatible with the Apache License 2.0 according to the License Policy[ ] New dependencies are documented in applicableLICENSEandNOTICEfilesDocumentation
[ ] Documentation formatting appears as expected in rendered files