Hi Biplob,
Yes, your assumptions are correct [1]. To be a bit more exact, the
`AvroSerializer` will be used to serialize your POJO data types.
That would be the case for data transfers and state serialization (unless for
state serialization you specify a custom state serializer; see [2])
If not is there a way to register my objects (sometimes not exactly a POJO
as recognized by Flink) with the avro serializers?
If your objects are not recognized as POJO (in which case the
`GenericTypeInformation` will be extracted instead of `PojoTypeInformation`),
there’s also an alternative way to serialize to RocksDB using Avro.
1. You can simply register custom serializers for that type [3].
2. Use custom state serializers for that specific registered state. Please see
[2] for instructions on how to do that.
Hope this helps!
Cheers,
Gordon
[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/types_serialization.html#serialization-of-pojo-types
[2]
https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/stream/state.html#custom-serialization-for-managed-state
[3]
https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/custom_serializers.html#register-a-custom-serializer-for-your-flink-program
On 15 August 2017 at 4:36:27 PM, Biplob Biswas (revolutioni...@gmail.com) wrote:
Hi,
This is somewhat related to my previous query here:
http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Evolving-serializers-and-impact-on-flink-managed-states-td14777.html
I was exploring Avro Serialization and in that regard I enabled the force
use of avro using,
env.getConfig().enableForceAvro();
Now, my assumption is all internal data transfers will be done using the
Avro serde, what I also assume is that on my RocksDB state backend my
objects would also be stored after serializing with avro.
*Is this assumption correct? *
If not is there a way to register my objects (sometimes not exactly a POJO
as recognized by Flink) with the avro serializers?
I want to de-/serialize my objects using avro and store it on my RocksDB
state backend, but I am not really aware how can I verify the serializer
which is used to perform that.
Thanks and Regards,
Biplob
--
View this message in context:
http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Avro-Serialization-and-RocksDB-Internal-State-tp14912.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at
Nabble.com.