Re: Kafka Producer - Null Pointer Exception when processing by element

2017-07-17 Thread earellano
Tzu-Li (Gordon) Tai wrote > Basically, when two operators are chained together, the output of the > first operator is immediately chained to the processElement of the next > operator; it’s therefore just a consecutive invocation of processElements > on the chained operators. There will be no

Re: Kafka Producer - Null Pointer Exception when processing by element

2017-07-17 Thread earellano
Hi, Tzu-Li (Gordon) Tai wrote > These seems odd. Are your events intended to be a list? If not, this > should be a `DataStream > > `. > > From the code snippet you’ve attached in the first post, it seems like > you’ve initialized your source incorrectly. > > `env.fromElements(List<...>)` will

Re: Kafka Producer - Null Pointer Exception when processing by element

2017-07-16 Thread earellano
Tzu-Li (Gordon) Tai wrote > It seems like you’ve misunderstood how to use the FlinkKafkaProducer, or > is there any specific reason why you want to emit elements to Kafka in a > map function? > > The correct way to use it is to add it as a sink function to your > pipeline, i.e. > > DataStream >

Kafka Producer - Null Pointer Exception when processing by element

2017-07-14 Thread earellano
I'm getting a NullPointerException when calling KakfaProducer010.processElement(StreamRecord). Specifically, this comes from its helper function invokeInternally(), and the function's internalProducer not being configured properly, resulting in passing a null value to one its helper functions.