Do I need to use registerTypeWithKryoSerializer() in my execution
environment?
My serialization into kafka is done with the following snippet

try (ByteArrayOutputStream byteArrayOutStream = new ByteArrayOutputStream();
Output output = new Output(byteArrayOutStream)) {
      Kryo kryo = new Kryo();
      kryo.writeClassAndObject(output, event);
      output.flush();
      return byteArrayOutStream.toByteArray();
    } catch (IOException e) {
      return null;
    }

"event" is my custom object.

then i desirialize it in flink's kafka consumer
try (ByteArrayInputStream byteArrayInStream = new
ByteArrayInputStream(bytes); Input input = new Input(byteArrayInStream,
bytes.length)) {
      Kryo kryo = new Kryo();
      return kryo.readClassAndObject(input);
    } catch (IOException e) {
      return null;
    }

Thanks



--
View this message in context: 
http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Kafka-and-Flink-integration-tp13792p13841.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at 
Nabble.com.

Reply via email to