[ https://issues.apache.org/jira/browse/FLINK-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465212#comment-16465212 ]
ASF GitHub Bot commented on FLINK-8655: --------------------------------------- Github user ctamisier commented on the issue: https://github.com/apache/flink/pull/5538 This is also something I would need and I would like to see with you for an alternative fix. What about using the `Configuration` that is provided in `RichFunction.open(Configuration parameters)` for the `CassandraSinkBase.open(Configuration configuration) {...}` implementation ? I saw in [old docs](https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/best_practices.html#passing-parameters-as-a-configuration-object-to-single-functions) that `Configuration` can be used in the `open(...)` method but today (1.4+) it might not be a good practice anymore. What about adding `keyspace` attribute in `CassandraPojoSink` and `CassandraSinkBuilder` (throwing exception when not using a `CassandraPojoSinkBuilder` for the moment). And create a new `Configuration()` with this `keyspace` in `CassandraPojoSink`. And finally do a `cluster.connect(keyspace);` I've done this [here](https://github.com/apache/flink/compare/master...ctamisier:pojo-keyspace) if you can have a look. I've updated `CassandraConnectorITCase` with a new test. I would like to run `CassandraPojoSinkExample.main()` to cover the `CassandraSink.addSink()` mechanism, but it doesn't work for me (even on flink master branch). Can this be a candidate for a PR, I am new to flink so it might break the flink good practice principles... Let me know! > Add a default keyspace to CassandraSink > --------------------------------------- > > Key: FLINK-8655 > URL: https://issues.apache.org/jira/browse/FLINK-8655 > Project: Flink > Issue Type: Improvement > Components: Cassandra Connector > Affects Versions: 1.4.0 > Reporter: Christopher Hughes > Priority: Minor > Labels: features > Fix For: 1.6.0 > > > Currently, to use the CassandraPojoSink, it is necessary for a user to > provide keyspace information on the desired POJOs using datastax annotations. > This allows various POJOs to be written to multiple keyspaces while sinking > messages, but prevent runtime flexibility. > For many developers, non-production environments may all share a single > Cassandra instance differentiated by keyspace names. I propose adding a > `defaultKeyspace(String keyspace)` to the ClusterBuilder. POJOs lacking a > definitive keyspace would attempt to be loaded to the provided default. -- This message was sent by Atlassian JIRA (v7.6.3#76005)