flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Kim <david....@braintreepayments.com>
Subject DeserializationSchema isEndOfStream usage?
Date Mon, 11 Jan 2016 20:39:58 GMT
Hello all,

I saw that DeserializationSchema has an API "isEndOfStream()".

https://github.com/apache/flink/blob/master/flink-streaming-java/src/main/java/org/apache/flink/streaming/util/serialization/DeserializationSchema.java

Can *isEndOfStream* be utilized to somehow terminate a streaming flink job?

I was under the impression that if we return "true" we can control when a
stream can close. The use case I had in mind was controlling when
unit/integration tests would terminate a flink job. We can rely on the fact
that a test/spec would know how many items it expects to consume and then
switch *isEndOfStream* to return true.

Am I misunderstanding the intention for *isEndOfStream*?

I also set a breakpoint on *isEndOfStream* and saw that it never was hit
when using "FlinkKafkaConsumer082" to pass in a DeserializationSchema
implementation.

Currently testing on 1.0-SNAPSHOT.

Cheers!
David

Mime
View raw message