You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Vijayendra Yadav <co...@gmail.com> on 2020/08/03 15:30:40 UTC

Flink Kafka consumer SimpleStringSchema [Deprecated]

 Hi Team,

https://ci.apache.org/projects/flink/flink-docs-stable/dev/connectors/kafka.html

new SimpleStringSchema()  --> Is showing Deprecated in my IntelliJ.
Although it's working fine, Wanted to check if there is a replacement for
it ?



val properties = new Properties()
properties.setProperty("bootstrap.servers", "localhost:9092")
properties.setProperty("group.id", "test")
stream = env
    .addSource(new FlinkKafkaConsumer[String]("topic", new
SimpleStringSchema(), properties))

Regards,
Vijay

Re: Flink Kafka consumer SimpleStringSchema [Deprecated]

Posted by Vijayendra Yadav <co...@gmail.com>.
Thank You Roman. There is one more:  env.*setStateBackend*

Deprecated: setStateBackend from *org.apache.flink.streaming.api.scala*

Regards,
Vijay

On Mon, Aug 3, 2020 at 9:21 AM Khachatryan Roman <
khachatryan.roman@gmail.com> wrote:

> Hi Vijay,
>
> The javadoc for
> org.apache.flink.streaming.util.serialization.SimpleStringSchema says
> you should Use
> org.apache.flink.api.common.serialization.SimpleStringSchema instead.
>
> Regards,
> Roman
>
>
> On Mon, Aug 3, 2020 at 5:31 PM Vijayendra Yadav <co...@gmail.com>
> wrote:
>
>> Hi Team,
>>
>>
>> https://ci.apache.org/projects/flink/flink-docs-stable/dev/connectors/kafka.html
>>
>> new SimpleStringSchema()  --> Is showing Deprecated in my IntelliJ.
>> Although it's working fine, Wanted to check if there is a replacement for
>> it ?
>>
>>
>>
>> val properties = new Properties()
>> properties.setProperty("bootstrap.servers", "localhost:9092")
>> properties.setProperty("group.id", "test")
>> stream = env
>>     .addSource(new FlinkKafkaConsumer[String]("topic", new
>> SimpleStringSchema(), properties))
>>
>> Regards,
>> Vijay
>>
>

Re: Flink Kafka consumer SimpleStringSchema [Deprecated]

Posted by Khachatryan Roman <kh...@gmail.com>.
Hi Vijay,

The javadoc for
org.apache.flink.streaming.util.serialization.SimpleStringSchema says
you should Use org.apache.flink.api.common.serialization.SimpleStringSchema
instead.

Regards,
Roman


On Mon, Aug 3, 2020 at 5:31 PM Vijayendra Yadav <co...@gmail.com>
wrote:

> Hi Team,
>
>
> https://ci.apache.org/projects/flink/flink-docs-stable/dev/connectors/kafka.html
>
> new SimpleStringSchema()  --> Is showing Deprecated in my IntelliJ.
> Although it's working fine, Wanted to check if there is a replacement for
> it ?
>
>
>
> val properties = new Properties()
> properties.setProperty("bootstrap.servers", "localhost:9092")
> properties.setProperty("group.id", "test")
> stream = env
>     .addSource(new FlinkKafkaConsumer[String]("topic", new
> SimpleStringSchema(), properties))
>
> Regards,
> Vijay
>