liquibase-cassandra
liquibase-cassandra copied to clipboard
Cassandra JDBC Driver is in lib folder despite of license restrictions
Hello,
I just saw this pull request recently https://github.com/liquibase/liquibase-cassandra/pull/146 which added CassandraJDBC42.jar to your lib folder despite it has a license restriction which says:
Licensed Software is confidential and copyrighted. Except as expressly permitted under this Agreement, you agree not to assign, distribute, transfer, lease, disassemble, decompile, reverse engineer, modify, or create derivative works of the Licensed Software, in whole or in part, or permit or authorize a third party to do so. -- https://www.datastax.com/legal/simba-odbcjdbc-driver-license-terms
So I would like to ask if this is completely okay? Is liquibase has the right to distribute this driver or is it just a misunderstanding and a wrong commit?
PS: I just found the original Documentation which says:
To use Liquibase and Apache Cassandra, you need two JAR files: a JDBC driver and the Liquibase Cassandra extension: Download the Simba JDBC driver JAR file and select Simba JDBC Driver for Apache Cassandra from the dropdown menu. Select the default package option unless you need a specific package. The driver downloads as a ZIP file named SimbaCassandraJDBC42-x.x.x.zip. Extract the CassandraJDBCxx.jar file and place it in the liquibase/lib directory.
Thanks in advance.
It looks like there is a hard dependency on Simba JDBC lib. Tried to use different JDBC driver and it failed.
https://github.com/liquibase/liquibase-cassandra/blob/2472b9fa9adea5ea3b13dbd9e596458a865d1371/src/main/java/liquibase/ext/cassandra/database/CassandraDatabase.java#L4
@kiranvaddadi @cziberez Did you ever find this out? I am facing the excact same problem. Now, it seems Datastax also has removed the JDBC driver from download. I tried using https://github.com/ing-bank/cassandra-jdbc-wrapper but the dependency for the simba-driver came up.
@bjornph No. I have tried the ing-bank driver by overriding the service. But the wrapper is a partial impl of the JDBC spec and hence got into some other issues.
End of the day, liquibase is for relational db (jdbc) and cassandra is not.
https://github.com/liquibase/liquibase-cassandra/blob/2472b9fa9adea5ea3b13dbd9e596458a865d1371/src/main/resources/META-INF/services/liquibase.database.Database
@APIM-KiranVaddadi I tried the same thing with overriding the hard dependency and use ing jdbc wrapper, with the liquibase compliancemode. It runs, but fails a simple project with
liquibase.exception.DatabaseException: Error executing SQL SELECT COUNT(*) FROM liquibase.DATABASECHANGELOGLOCK: Method was called on a closed Statement.
I see that Datagrip has a cassandra-jdbc-driver as well, but I have not tried it.
Not sure on the details of the licensing on the attached driver to this repo that @cziberez mentions though.
I would've guessed that with Cassandra being a popular DB, there would be multiple possibilities for schema change tools.
Hello,
As explained here: https://github.com/ing-bank/cassandra-jdbc-wrapper/issues/25#issuecomment-1704075776, a new version of Cassandra JDBC wrapper has been published fixing some issues preventing it to work correctly with Liquibase.
To use it, some prerequisites must be met:
- the
liquibase-cassandra
jar must be modified to use the version 4.9.1 of Cassandra JDBC wrapper instead of Simba JDBC driver: see the changes in the pull request #205 for example. - the compliance mode Liquibase must be set in the JDBC URL.
- I also recommend to increase the value of the parameter
requesttimeout
in the JDBC URL (default value is 2 seconds), especially if you use a CQL script as Liquibase changelog: indeed, the script is considered as a single statement and if it contains a lot of queries, it could take more than 2 seconds in some circumstances.
Regarding the Datagrip implementation, it's (at least for now) a partial implementation of the JDBC API (for example, most of the methods in the DatabaseMetaData implementation return null). I don't know the real impact on the operation of Liquibase but I know that methods such as DatabaseMetaData.getColumns()
are used in some Liquibase commands but I didn't deep dive into it to know what will be the result with a call returning null in this case...
Maybe this can be closed with the release of the version 4.25.0? I think all the issues are now solved. :) Note I created a PR here to update the documentation: https://github.com/liquibase/liquibase-contribute-site/pull/52