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

ASF GitHub Bot commented on FLINK-8655:
---------------------------------------

Github user ctamisier commented on the issue:

    https://github.com/apache/flink/pull/5964
  
    Ok great!, I'd like to mention that `CassandraPojoSinkExample.main()` 
doesn't seem to work:
    `source.getType()` is computed as a `GenericType` in the 
`env.fromCollection(messages);`.
    
    So when `CassandraSink.addSink(source)` is called the  
`java.lang.IllegalArgumentException: No support for the type of the given 
DataStream: 
GenericType<org.apache.flink.streaming.connectors.cassandra.example.Message>` 
is thrown because it doesn't match `PojoTypeInfo` (`typeInfo instanceof 
PojoTypeInfo`, and neither the other candidates) as we would like to have I 
guess according to the `CassandraPojoSinkExample` javadocs.
    
    Maybe we can fix this as well for this PR ? (because 
CassandraPojoSinkExample.main() seems to be a concrete running example of the 
`CassandraPojoSinkBuilder` that this PR is modifying)


> 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)

Reply via email to