emptyOVO commented on code in PR #11084: URL: https://github.com/apache/inlong/pull/11084#discussion_r1756120543
########## inlong-agent/agent-plugins/src/main/java/org/apache/inlong/agent/plugin/sources/RedisSource.java: ########## @@ -84,6 +321,272 @@ public boolean sourceFinish() { @Override public boolean sourceExist() { - return false; + return true; + } + + private String getRedisUri() { + StringBuffer sb = new StringBuffer("redis://"); + sb.append(hostName).append(":").append(port); + if (!StringUtils.isEmpty(dbNumber)) { + sb.append("/").append(dbNumber); + } + sb.append("?"); + if (!StringUtils.isEmpty(authPassword)) { + sb.append("authPassword=").append(authPassword).append("&"); + } + if (!StringUtils.isEmpty(authUser)) { + sb.append("authUser=").append(authUser).append("&"); + } + if (!StringUtils.isEmpty(readTimeout)) { + sb.append("readTimeout=").append(readTimeout).append("&"); + } + if (ssl) { + sb.append("ssl=").append("yes").append("&"); + } + if (!StringUtils.isEmpty(snapShot)) { + sb.append("replOffset=").append(snapShot).append("&"); + } + if (!StringUtils.isEmpty(replId)) { + sb.append("replId=").append(replId).append("&"); + } + if (sb.charAt(sb.length() - 1) == '?' || sb.charAt(sb.length() - 1) == '&') { + sb.deleteCharAt(sb.length() - 1); + } + return sb.toString(); + } + + private void initReplicator() { + DefaultCommandParser defaultCommandParser = new DefaultCommandParser(); + this.redisReplicator.addCommandParser(CommandName.name("APPEND"), defaultCommandParser); Review Comment: Is there a causal order problem with just subscribing to some of these operations? -- 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