flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tarandeep Singh <tarand...@gmail.com>
Subject Cassandra connector POJO - tombstone question
Date Wed, 12 Apr 2017 00:27:22 GMT
Hi,

I am using flink-1.2 and Cassandra connector to write to cassandra tables.
I am using POJOs with DataStax annotations as described here-
https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/connectors/cassandra.html

My question is- how are nulls handles by cassandra sink?

Datastax documentation on Mapper states that if we are using POJOs to store
data in Cassandra table and the POJO has null fields, then it can create
tombstones, so one should use saveNullFields(false) so that null fields are
not persisted -
https://docs.datastax.com/en/developer/java-driver/3.1/manual/object_mapper/using/#mapper-options

Default behavior is to persist null fields.

In cassandra pojo sink code, I don't see this option set on Mapper-
https://github.com/apache/flink/blob/master/flink-connectors/flink-connector-cassandra/src/main/java/org/apache/flink/streaming/connectors/cassandra/CassandraPojoSink.java

So does this mean, I can expect to see tombstones when writing data
(assuming my POJOs have null fields). If yes, can we expose an option to
disable saving null fields.

Thanks,
Tarandeep

Mime
View raw message