[
https://issues.apache.org/jira/browse/FLINK-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16408449#comment-16408449
]
ASF GitHub Bot commented on FLINK-8655:
---------------------------------------
Github user Bekreth commented on the issue:
https://github.com/apache/flink/pull/5538
I've been looking into this more in depth and I'm uncertain there is going
to be a cleaner solution. The DataStax annotation parser will fail during
runtime if it can't determine the keyspace either from the Table annotation, or
from the connection. The core Cassandra functionality is built on a stateless
connection though, so embedding the keyspace into there would be a bad idea.
In order to make this work with the current Datastax implementations, it'd
be necessary to extend both MappingManager and AnnotationParser from Datastax
as well as update the CassandraSinkBase to use these extension.
Should I try to make a swing at these changes to see what it entail?
> 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)