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

ASF GitHub Bot commented on APEXMALHAR-1948:
--------------------------------------------

Github user DT-Priyanka commented on a diff in the pull request:

    
https://github.com/apache/incubator-apex-malhar/pull/188#discussion_r55994647
  
    --- Diff: 
contrib/src/main/java/com/datatorrent/contrib/cassandra/CassandraStore.java ---
    @@ -115,21 +130,35 @@ public Session getSession() {
       /**
        * Creates a cluster object.
        */
    -  public void buildCluster(){
    -
    +  public void buildCluster()
    +  {
         try {
    -
    -      cluster = Cluster.builder()
    -          .addContactPoint(node).withCredentials(userName, 
password).build();
    -    }
    -    catch (DriverException ex) {
    +      if (protocolVersion != null && protocolVersion.length() != 0) {
    +        ProtocolVersion version = getCassandraProtocolVersion();
    +        cluster = 
Cluster.builder().addContactPoint(node).withCredentials(userName, 
password).withProtocolVersion(version).build();
    +      } else {
    --- End diff --
    
    Default depends on cassandra driver version, with 2.1.x it is V2.


> CassandraStore Should Allow You To Specify Protocol Version.
> ------------------------------------------------------------
>
>                 Key: APEXMALHAR-1948
>                 URL: https://issues.apache.org/jira/browse/APEXMALHAR-1948
>             Project: Apache Apex Malhar
>          Issue Type: Improvement
>            Reporter: Timothy Farkas
>            Assignee: Priyanka Gugale
>
> When working on an app I noticed that the default protocol version used when 
> connecting to cassandra was not the protocol version configured by the 
> database. This leads to mysterious exceptions when connecting to cassandra. 
> The protocol should be configurable via a user property.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to