-
Notifications
You must be signed in to change notification settings - Fork 566
[INLONG-8948][Sort] Add Redis connector on flink 1.15 #9836
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@XiaoYou201 please add more details about this PR. |
|
Please fix your uts and build |
...-connectors/redis/src/main/java/org/apache/inlong/sort/redis/sink/RedisDynamicTableSink.java
Outdated
Show resolved
Hide resolved
...connectors/redis/src/main/java/org/apache/inlong/sort/redis/common/config/RedisDataType.java
Outdated
Show resolved
Hide resolved
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/pom.xml
Outdated
Show resolved
Hide resolved
inlong-sort/sort-flink/sort-flink-v1.15/sort-connectors/redis/pom.xml
Outdated
Show resolved
Hide resolved
...edis/src/main/java/org/apache/inlong/sort/redis/common/handler/InlongJedisConfigHandler.java
Outdated
Show resolved
Hide resolved
...k-v1.15/sort-connectors/redis/src/test/java/org/apache/inlong/sort/redis/RedisTableTest.java
Outdated
Show resolved
Hide resolved
...k-v1.15/sort-connectors/redis/src/test/java/org/apache/inlong/sort/redis/RedisTableTest.java
Show resolved
Hide resolved
...k-v1.15/sort-connectors/redis/src/test/java/org/apache/inlong/sort/redis/RedisTableTest.java
Outdated
Show resolved
Hide resolved
EMsnap
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should put declaration for copied codes under licenses/inlong-sort-connectors/LICENSE , thanks
EMsnap
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add dependency in inlong-sort/sort-core/pom.xml under flink v1.15 , and also add in src/main/assemblies/sort-connectors-v1.15.xml
… add in sort-connectors-v1.15.xml.
Prepare a Pull Request
[INLONG-9835] [Feature][Sort] Add Redis connector on flink 1.15
Fixes [Feature][Sort] Add Redis connector on flink 1.15 #8948
Motivation
Due to the version of flink update to 1.15.4, the redis connector should be updated and tested.
Modifications
According to the official website(https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/sourcessinks/) introduce.The Metadata, Planning, and Runtime please refer to official website.
Accomplish customize source and sink about the redis-connector of flink 1.15.4. This work includes three main parts as follow.
1. RedisDynamicTableFactory
This part mainly override two methods.
This method firtst validate the support commands and then return a RedisDynamicTableSource object.
This method firtst validate the support commands and then return a RedisDynamicTableSink object.
2. RedisDynamicTableSource And RedisDynamicTableSink
This class validate the config properties and pass those properties and RedisRowDataLookupFunction object into TableFunctionProvider.of() method to generate a LookupRuntimeProvider object which get data from redis servers.
This class validate the config properties and pass those properties and RedisSinkFunction object into SinkFunctionProvider.of() method to generate SinkRuntimeProvider object which sink data to redis servers.
3. RedisLookupFunction And RedisSinkFunction
This class has a method called eval(), the eval() include the logical that get data from redis servers.Now, it has four request types to get different data (GET, HGET, ZREVRANK, ZSCORE).Due to flexible interface design, The request type can be quickly expand.
This class has a method called flushInternal(), include the logical that sink data to redis servers.Now, it has three request types to sink different data (PLAIN, HASH, BITMAP).
Documentation