Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-11642

Upgrade cassandra driver from 3.x to 4.x

Details

    • Improvement
    • Status: Resolved
    • P2
    • Resolution: Duplicate
    • 2.27.0
    • Not applicable
    • io-java-cassandra
    • None

    Description

      Apache Cassandra driver versions greater than 4.0 are required due to couple of issues listed below.

      1. Driver tries to reconnect to endpoint based on resolved IP and not on original DNS name.

      In containers, where restarts may get a new IP address, versions prior to 4.0 results in "cannot connect" errors since it is trying to connect to stale/prior IP address. Reference driver issues: 

      https://datastax-oss.atlassian.net/browse/JAVA-1522

      https://datastax-oss.atlassian.net/browse/JAVA-1978

      2. Beam does not seem to currently support providing custom ssl options (to supply dedicated java truststore and keystore). The only option seems to use default system properties as listed below.

      -Djavax.net.ssl.trustStore=/path/to/client.truststore
      -Djavax.net.ssl.trustStorePassword=password123

      If you're using client authentication:
      -Djavax.net.ssl.keyStore=/path/to/client.keystore
      -Djavax.net.ssl.keyStorePassword=password123

      Cassandra driver 3.x provides programmatic option using  withSSL() API which I think is not supported in beam currently.

      Cluster cluster = Cluster.builder().addContactPoint("127.0.0.1").withSSL(sslOptions).build();

      https://docs.datastax.com/en/developer/java-driver/3.10/manual/ssl/

      Due to issue 1, it may be wise to upgrade cassandra driver to 4.x (as there is an interface breaking change in driver) and add custom ssl support as stated by driver spec.

      https://docs.datastax.com/en/developer/java-driver/4.0/manual/core/ssl/

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              anupd Anup D
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: