flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-8655) Add a default keyspace to CassandraSink
Date Tue, 08 May 2018 09:19:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-8655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16467134#comment-16467134

ASF GitHub Bot commented on FLINK-8655:

Github user ctamisier commented on the issue:

    @zentol, @StephanEwen, @Bekreth
    > We would have to pass the keyspace via the constructor as the Configuration approach
doesn't work for streaming.
    I'm not sure to understand, the new unit test (`testCassandraPojoNoAnnotatedKeyspaceAtLeastOnceSink`)
is in the streaming package (`org.apache.flink.streaming.connectors.cassandra`) and it seems
to work. Do I miss something about the general flink setup ?
    > Generally speaking it isn't a problem to set the keyspace when creating the connection.
But I would like to know what happens if a POJO comes along that explicitly sets the keyspace;
is it ignored, respected or will it cause an exception?
    It takes the keyspace from the `@Table`. see `AnnotationParser.parseEntity` method for
`EntityMapper<T>` creation using `ksName`
    It seems the default behavior of cassandra, I'm not sure we can do something here..

> 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

View raw message