Re: Making external calls from a FlinkKafkaPartitioner

2017-11-03 Thread Ron Crocker
Thanks Nico - Thanks for the feedback, and nice catch on the missing volatile. Ron — Ron Crocker Principal Engineer & Architect ( ( •)) New Relic rcroc...@newrelic.com M: +1 630 363 8835 > On Nov 3, 2017, at 7:48 AM, Nico Kruber wrote: > > Hi Ron, > imho your code

Re: Making external calls from a FlinkKafkaPartitioner

2017-11-03 Thread Nico Kruber
Hi Ron, imho your code should be fine (except for a potential visibility problem on the changes of the non-volatile partitionMap member, depending on your needs). The #open() method should be called (once) for each sink initialization (according to the javadoc) and then you should be fine with

Making external calls from a FlinkKafkaPartitioner

2017-11-02 Thread Ron Crocker
We have a system where the Kafka partition a message should go into is a function of a value in the message. Often, it’s value % # partitions, but for some values it’s not - it’s a specified list of partitions that changes over time. Our “simple Java library” that produces messages for this