yunqingmoswu opened a new pull request, #6165:
URL: https://github.com/apache/inlong/pull/6165

   ### Prepare a Pull Request
   *(Change the title refer to the following example)*
   
   Title: [INLONG-6160][Sort] Support dynamic partition for KafkaLoadNode
   
   *(The following *XYZ* should be replaced by the actual [GitHub 
Issue](https://github.com/apache/inlong/issues) number)*
   
   Fixes #6160 
   
   ### Motivation
   
   Support dynamic partition for KafkaLoadNode when the format of kafka is raw 
and the 'key.fields' is not specifyed.
   This is mainly for some whole database migration scenarios, we assume that 
the upstream input data is a mixed schema of whole database migration, we 
ignore the real schema for now, receive the entire record in a binary raw data 
format, and fetch and parse its schema and data on the kafka sink side, and 
according to Some data values ​​are dynamically written to related topic 
partitions.
   Dynamic partition writing has some limitations:
   1.The upstream data is raw format with a fixed inner format, only support 
[canal-json|debezium-json] at now
   2.The 'key.fields' is not specifyed
   3.It needs to specify 'sink.multiple.partition-pattern' and 
'sink.multiple.format' for dynamically extracting partition from data
   4.It will extract primary key from raw data as the partition key used hash 
if the 'sink.multiple.partition-pattern'
    equals 'PRIMARY_KEY' else it will parse partition key from raw data.
   
   ### Modifications
   
   1.Add option of 'sink.multiple.partition-pattern'
   2.Add partitioner of 'RawDataHashPartitioner'
   3.Add method extractValues and extractPrimaryKeyNames and 
extractPrimaryKeyValues for the mode of 'DynamicSchemaFormat'
   
   ### 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: commits-unsubscr...@inlong.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to