Figured it out, I need to use this code instead:

FlinkJedisClusterConfig redisConfig = new FlinkJedisClusterConfig.Builder()
                                .setNodes(new 
HashSet<InetSocketAddress>(Arrays.asList(new
InetSocketAddress("asd", 5601)))).build();

(Replace class FlinkJedisPoolConfig with FlinkJedisClusterConfig)

I've created this <https://issues.apache.org/jira/browse/BAHIR-249> issue
on JIRA; the online example code should be updated.

On Wed, Oct 14, 2020 at 3:52 PM Manas Kale <manaskal...@gmail.com> wrote:

> Hi,
> 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:
>
> FlinkJedisPoolConfig conf = new FlinkJedisPoolConfig.Builder()
>     .setNodes(new HashSet<InetSocketAddress>(Arrays.asList(new 
> InetSocketAddress(5601)))).build();
>
> *the setNodes() method is not present in my distribution of Bahir.*
> Here's the dependency as per [1]:
>
> <dependency>
>   <groupId>org.apache.bahir</groupId>
>   <artifactId>flink-connector-redis_2.11</artifactId>
>   <version>1.0</version>
> </dependency>
>
> 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?
>
> [1] https://bahir.apache.org/docs/flink/1.0/flink-streaming-redis/
>
> Thanks,
> Manas Kale
>
>

Reply via email to