[ 
https://issues.apache.org/jira/browse/BAHIR-249?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Manas Kale updated BAHIR-249:
-----------------------------
    Issue Type: Task  (was: Bug)

> Flink-redis cluster connector example outdated 
> -----------------------------------------------
>
>                 Key: BAHIR-249
>                 URL: https://issues.apache.org/jira/browse/BAHIR-249
>             Project: Bahir
>          Issue Type: Task
>          Components: Flink Streaming Connectors
>            Reporter: Manas Kale
>            Priority: Major
>
> I am trying to push data from my Flink stream application to a redis cluster. 
> I'm following the guide at [1], but I believe the example given might be 
> outdated. Specifically, in the code:
> {code:java}
> FlinkJedisPoolConfig conf = new FlinkJedisPoolConfig.Builder()
>     .setNodes(new HashSet<InetSocketAddress>(Arrays.asList(new 
> InetSocketAddress(5601)))).build();
> {code}
> the setNodes() method is not present in my distribution of Bahir. Here's the 
> dependency as per [1]:
> {code:java}
> <dependency>
>   <groupId>org.apache.bahir</groupId>
>   <artifactId>flink-connector-redis_2.11</artifactId>
>   <version>1.0</version>
> </dependency>
> {code}
> I tried browsing through the Builder() class for a new method related to 
> setting nodes but couldn't find any. What is the issue? Is the example code 
> outdated or have I downloaded the wrong dependency? Which method do I use for 
> connecting  to a redis cluster?
> EDIT:
> Figured it out, I need to use this code instead:
> {code:java}
> FlinkJedisClusterConfig redisConfig = new FlinkJedisClusterConfig.Builder()
>                               .setNodes(new 
> HashSet<InetSocketAddress>(Arrays.asList(new InetSocketAddress("asd", 
> 5601)))).build();
> {code}
> (Replace class FlinkJedisPoolConfig with FlinkJedisClusterConfig)
> Marking this as task, the example code on the website should be updated.
> [1] https://bahir.apache.org/docs/flink/1.0/flink-streaming-redis/



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to