flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kla <lalafar...@gmail.com>
Subject Re: Change Kafka cluster without loosing the Flink's state
Date Thu, 14 Sep 2017 15:40:18 GMT
Hi Gordon, 

Thanks again for your answer. 

But I am not sure if I understood this part:
"The workaround, for now, would be to explicitly disable chaining of the
consumer source with any stateful operators before taking the savepoint and
changing the operator UID."


So my code looks like this:

        DataStream<Model2> stream2 = env.addSource(new
FlinkKafkaConsumer(...)).uid(“some-unique-id”)
        DataStream<Model12> stream12 = stream2
                .connect(stream1)
                .keyBy(...)
                .flatMap(new CoFlatMapFunction()); // this is a stateful
operator

I have added uid() as you have suggested, but I got the following message:

Cannot map savepoint state for operator 5167ac19a7ef76538ac5476b6094bc29 to
the new program, because the operator is not available in the new program.
If you want to allow to skip this, you can set the --allowNonRestoredState
option on the CLI.

What should I do here ? 


Thanks,
Konstantin



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/

Mime
View raw message