Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the AbstractKafkaAvroSerDe Serializable #1112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Fokko
Copy link

@Fokko Fokko commented May 6, 2019

For our Flink job the SchemaRegistryClient is part of a task, and we would like to be able to Serialize this class and send it to the TaskManagers.

@ghost
Copy link

ghost commented May 6, 2019

It looks like @Fokko hasn't signed our Contributor License Agreement, yet.

The purpose of a CLA is to ensure that the guardian of a project's outputs has the necessary ownership or grants of rights over all contributions to allow them to distribute under the chosen licence.
Wikipedia

You can read and sign our full Contributor License Agreement here.

Once you've signed reply with [clabot:check] to prove it.

Appreciation of efforts,

clabot

@Fokko
Copy link
Author

Fokko commented May 6, 2019

[clabot:check]

@ghost
Copy link

ghost commented May 6, 2019

@confluentinc It looks like @Fokko just signed our Contributor License Agreement. 👍

Always at your service,

clabot

@abij
Copy link

abij commented Dec 24, 2019

He @Fokko, running into same issue.

I solved this part, but the CachedSchemaRegistryClient is not Serializable, so i'm unable to serialize the task. For Spark in my case. Trying to follow the guide: https://github.com/xebia-france/spark-structured-streaming-blog/blob/master/src/main/scala/AvroConsumer.scala.

class MyAvroDeserializer extends AbstractKafkaAvroDeserializer with Serializable {
  def this(client: SchemaRegistryClient) {
    this()
    this.schemaRegistry = client
  }

  override def deserialize(bytes: Array[Byte]): String = {
    val genericRecord = super.deserialize(bytes).asInstanceOf[GenericRecord]
    genericRecord.toString
  }
}

@cla-assistant
Copy link

cla-assistant bot commented Sep 25, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants