yunqingmoswu opened a new pull request, #6618: URL: https://github.com/apache/inlong/pull/6618
### Prepare a Pull Request *(Change the title refer to the following example)* Title: [INLONG-6617][Sort] Add common process for dirty data sink and supports log sink *(The following *XYZ* should be replaced by the actual [GitHub Issue](https://github.com/apache/inlong/issues) number)* - Fixes #6617 ### Motivation Add common process for dirty data sink and supports log sink. This piece is designed as follows: 1. Add option 'dirty.ignore' to determine whether to ignore dirty data, default is 'false' 2. If the option 'dirty.ignore' is 'true', it can be determined whether to enable sink for dirty data by option 'dirty.sink.enable' 3. If the option 'dirty.sink.enable' is 'true', The dirty data can be sink to the target system by option 'sink.dirty.connector' 4. Only supports 'log' sink for dirty data for now. 6. Add labels for dirty data by option 'sink.dirty.labels', the labels format is 'key1=value1&key2=value2', it supports variable extraction like '${variable}'. There are two system variables[SYSTEM_TIME|DIRTY_TYPE] are currently supported, and the support of other variables is determined by the connector. 7. Add option 'sink.dirty.format' to format the real dirty data and labels, only supports [csv|json] for now, default is 'csv'. 8. Add option 'sink.dirty.log-tag' for log dirty data, it appears only in logs before labels. 9. Add option 'sink.dirty.field-delimiter' to delimit labels and dirty data, default is ','. 10. If 'sink.dirty.format' is 'csv', the whole log format will be '[${logTag}] ${labels}${fieldDelimiter}${dirtyData}'. ### Modifications 1.Add dirty process model 2.Add abstract for DirtySinkFactory, DirtySink,DirtyData,DirtyType 3.Add DirtyOptions as dirty common options 4.Add utils class for dirty sink such as LabelUtils, PatternReplaceUtils, and etc. 5.Add common option define, such as 'dirty.ignore',dirty.sink.enable', 'sink.dirty.connector', 'sink.dirty.labels', 'sink.dirty.format', 'sink.dirty.log-tag', 'sink.dirty.field-delimiter', and etc. ### Verifying this change *(Please pick either of the following options)* - [ ] This change is a trivial rework/code cleanup without any test coverage. - [x] This change is already covered by existing tests, such as: *(please describe tests)* - [ ] This change added tests and can be verified as follows: *(example:)* - *Added integration tests for end-to-end deployment with large payloads (10MB)* - *Extended integration test for recovery after broker failure* ### Documentation - Does this pull request introduce a new feature? (yes / no) - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented) - If a feature is not applicable for documentation, explain why? - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation -- 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]
