You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@flink.apache.org by Eric Troies <er...@gmail.com> on 2019/02/15 10:08:17 UTC

Re: KafkaTopicPartition internal class treated as generic type serialization

Hi, I'm having the exact same issue with flink 1.4.0 using scala 2.11 .

Do you have any suggestion on how to fix this ?

I don't see how to register a custom serializer for a class I did not write.

Thanks !



> I disabled generic type serialization via

> env.getConfig.disableGenericTypes()

> and got the following exception when running my job on a standalone cluster.

> Caused by: java.lang.UnsupportedOperationException: Generic types have been
> disabled in the ExecutionConfig and type
> org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition is
> treated as a generic type.

> Is this expected?  I figure I may just have to register a custom serializer
> for this, but (wrongly?) expected the class to have its own serializer,
> although there's not much overhead for this class.

> I do understand the documentation behind using disableGenericTypes() only in
> application development, but would this possibly hide other classes since it
> could possibly eagerly fail on this class?

Re: KafkaTopicPartition internal class treated as generic type serialization

Posted by Fabian Hueske <fh...@gmail.com>.
Hi Eric,

I did a quick search in our Jira to check if this is a known issue but
didn't find anything.
Maybe Gordon (in CC) knows a bit more about this problem.

Best, Fabian

Am Fr., 15. Feb. 2019 um 11:08 Uhr schrieb Eric Troies <erictroies@gmail.com
>:

> Hi, I'm having the exact same issue with flink 1.4.0 using scala 2.11 .
>
> Do you have any suggestion on how to fix this ?
>
> I don't see how to register a custom serializer for a class I did not write.
>
> Thanks !
>
>
>
> > I disabled generic type serialization via
>
> > env.getConfig.disableGenericTypes()
>
> > and got the following exception when running my job on a standalone cluster.
>
> > Caused by: java.lang.UnsupportedOperationException: Generic types have been
> > disabled in the ExecutionConfig and type
> > org.apache.flink.streaming.connectors.kafka.internals.KafkaTopicPartition is
> > treated as a generic type.
>
> > Is this expected?  I figure I may just have to register a custom serializer
> > for this, but (wrongly?) expected the class to have its own serializer,
> > although there's not much overhead for this class.
>
> > I do understand the documentation behind using disableGenericTypes() only in
> > application development, but would this possibly hide other classes since it
> > could possibly eagerly fail on this class?
>
>