{"repo":"jeff-zou/flink-connector-redis","free":true,"listed":false,"github":"https://github.com/jeff-zou/flink-connector-redis","clone":"git clone https://github.com/jeff-zou/flink-connector-redis.git","description":"Asynchronous flink connector based on the Lettuce, supporting sql join and sink, query caching and debugging.","language":"Java","stars":262,"topics":["flink-connector","flink-connector-redis","lettuce","redis","flink","flink-sql","join"],"license":"Apache-2.0","category":"databases-storage","readme_excerpt":"EN 1 项目介绍 基于bahir-flink二次开发，相对bahir调整的内容有： 因bahir使用的flink接口版本较老，所以改动较大，开发过程中参考了腾讯云与阿里云两家产商的流计算产品，取两家之长，并增加了更丰富的功能。 注：redis不支持两段提交无法实现刚好一次语义。 2 使用方法: 2.1 工程直接引用 项目依赖Lettuce(6.2.1)及netty-transport-native-epoll(4.1.82.Final),如flink环境有这两个包,则使用flink-connector-redis-1.4.3.jar， 否则使用flink-connector-redis-1.4.3-jar-with-dependencies.jar。 2.2 自行打包 打包命令： mvn package,将生成的包放入flink lib中即可，无需其它设置。 2.3 使用示例 3 参数说明： 3.1 主要参数： 字段 默认值 类型 说明 ----------------------- -------- --------- -------------------------------------------------------------------------------------------------- connector (none) String redis host (none) String Redis IP port 6379 Integer Redis 端口 password null String 如果没有设置，则为 null database 0 Integer 默认使用 db0 timeout 2000 Integer 连接超时时间，单位 ms，默认 1s cluster-nodes (none) String 集群ip与端口，当redis-mode为cluster时不为空，如：10.11.80.147:7000,10.11.80.147:7001,10.11.80.147:8000 command (none) String 对应上文中的redis命令 redis-mode (none) Integer mode类型： single cluster sentinel lookup.cache.max-rows -1 Integer 查询缓存大小,减少对redis重复key的查询 lookup.cache.ttl -1 Integer 查询缓存过期时间，单位为秒， 开启查询缓存条件是max-rows与ttl都不能为-1 lookup.cache.load-all false Boolean 开启全量缓存,当命令为hget时,将从redis map查询出所有元素并保存到cache中,用于解决缓存穿透问题 max.retries 1 Integer 写入/查询失败重试次数 value.data.structure column String column: value值来自某一字段 (如, set: key值取自DDL定义的第一个字段, value值取自第二个字段) row: 将整行内容保存至value并以'\\01'分割 set.if.absent false Boolean 在key不存在时才写入,只对set hset有效 io.pool.size (none) Integer Lettuce内netty的io线程池大小,默认情况下该值为当前JVM可用线程数，并且大于2 event.pool.size (none) ","default_branch":null,"files":null,"tree":[],"storefront":"/r/jeff-zou","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jeff-zou/flink-connector-redis/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}