Commit Graph

26 Commits

Author SHA1 Message Date
John Blum
39928948f0 DATACASS-286 - Log all CQL queries executed with CqlTemplate.
Additional refactoring to simplify CqlTemplate logic as well as make CqlTemplate methods more behaviorally consistent.

Origina pull request: #61.
2016-05-30 10:24:32 +02:00
Mark Paluch
be495728d9 DATACASS-271 - Polishing.
Add author tags. Add/update license headers where needed. Remove calls to deprecated methods. Adopt pooling options after the driver update. Add hints_directory for Cassandra 3.

Reduce driver baseline to core driver 3.0.1. The DSE driver requires the core driver itself and can be added as dependency to user projects while retaining full compatibility. As of now the DSE driver is rc1 hence it requires core rc1.

Use getTimestamp for timestamp type methods as the driver aligned the method to the type. Support short, byte and time. Enable LocalDate return type and add tests for native supported types.

Change long to bigint type as long was mapped to the counter type when creating tables. Align the default to bigint as bigint is the better choice since table creation uses mostly regular tables and not counter tables. Type can be overriden using @CassandraType.

We now support setting NettyOptions on CassandraCqlClusterFactoryBean and AbstractClusterConfiguration. The cassandra driver 2.1.9 changed its default shutdown behavior by introducing a 2 second quiet period when shutting down Cluster instances. This change was retained throughout the 3.0 driver which slow the test down by an order of magnitude. Configure QueryOptions on tests to prevent delays caused by the asynchronous schema refresh.

Original pull request: #56.
Related pull request: #52.
Related ticket: DATACASS-169.
2016-05-20 12:54:19 -07:00
Antoine Toulme
a920b530df DATACASS-271 - Upgrade to Cassandra 3.0.
This commit adds support for Cassandra 3.x with upgrading to Datastax Driver 3.0.0. Data type deserialization is performed using the CodecRegistry.

Original pull request: #52.
Related ticket: DATACASS-169.
2016-05-20 12:54:11 -07:00
John Blum
27019f3218 DATACASS-219 - Polish.
Refactored code based on @Mark Paluch's code review here (https://github.com/spring-projects/spring-data-cassandra/pull/55).
2016-05-11 11:51:12 -07:00
John Blum
a1e75b3857 DATACASS-219 - On startup CREATE TABLE from entities should only add 'if not exists'. 2016-05-10 20:04:25 -07:00
Mark Paluch
ac321512bb DATACASS-226 - Polishing.
Add tests for CassandraCqlClusterFactoryBean and AbstractClusterConfiguration. Update license headers. Extend JavaDoc. Rearrange fields in CassandraCqlClusterFactoryBean to reflect grouping similar to the client.

Original pull request: #31.
2016-05-10 17:24:07 +02:00
Mark Paluch
c33d509b8e DATACASS-255 - Cassandra Test cleanup.
Replace CassandraUnit test rule with own test rule that honors the external/embedded Cassandra preference. Move Cassandra server initialization into CassandraRule. Introduce a KeyspaceRule to provide managed keyspaces on test class level. Allow cached cluster connections by enabling CassandraRule as class rule. A test that requires a running Cassandra instance needs to either extend the AbstractEmbeddedCassandraIntegrationTest or add the test rule CassandraRule to its test.

Consolidate connection properties (before merging the spring-cql and spring-data-cassandra modules) and simplify config properties classes. Add cleanup after the test run to remove temporary keyspaces. This change allows repeating test runs on a stateful Cassandra instance (e.g. an externally started Cassandra instance). Rename config file and change references to renamed files to support the consolidated connection properties in context config files.
Removed FunkyIdentifierIntegrationTest as it only tests creating tables using reserved Cassandra words. Spring Data Cassandra does not constrain CQL identifiers so maybe later we'll add a test to verify the implemented rules.

Exclude logback-core dependency from cassandra-all. Remove jamm dependency in tests as it's not used. Removed cassandra-unit dependency as the usage is very little. Removed unnecessary hector dependency.

Rename all integration tests to end with "IntegrationTests" and unit tests to end with "UnitTests". Move unit tests to the system under test package to enable testing of package-private types and members. Add missing license headers and author tags. Reformat all test code using the Spring Data Eclipse formatting.

Original pull request: #51
2016-05-10 11:01:33 +02:00
Mark Paluch
a1feafef67 DATACASS-231 - Polishing.
Add author. Add/update license headers where needed. Improve JavaDoc. Tweaked test names. Adopted current driver behavior in tests.

Original pull request: #41.
2016-04-07 11:08:36 +02:00
Kirk Clemens
0f14ade35a DATACASS-231 - Add ProtocolVersion to CassandraCqlClusterFactoryBean.
Original pull request: #41.
CLA: 134320150813044603 (Kirk Clemens)
2016-04-07 11:08:36 +02:00
David Webb
237ac88bc5 DATACASS-239 - Upgraded to latest Cassandra, Cassandra unit and Dse driver.
Updated Cassandra-Unit, DSE Driver and Cassandra version to latest stable version. Changed the Test Cases to support the API changes on the driver by DataStax. They changed the exception hierarchy for failed
replication factor quorum. The embedded spring-cassandra.yaml files were tuned to turn of unneeded features that were causing overhead in the testing. Marked new test dependencies as test scope.

Original pull request: #43.
2015-12-23 10:19:52 +01:00
Oliver Gierke
18953bdfec DATACASS-220 - Downgrade to Cassandra driver 2.1.5.
The integration tests constantly fail on Bamboo on 2.1.6 and seem to be fine on 2.1.5. Downgraded until further diagnose.
2015-06-22 11:59:20 +02:00
Oliver Gierke
4acd159407 DATACASS-220 - Upgraded to Cassandra driver 2.1.6.
Adapted API change in TestLatencyTracker *sigh*. Removed version declaration for Guava to use the one from Spring Data Build.
2015-06-19 12:21:45 +02:00
David Webb
c8604afa3b DATACASS-176: CassandraCqlClusterFactoryBean doesn't consider
maxConnections while validating coreConnection values 

Task-Url: https://jira.spring.io/browse/DATACASS-176

Renamed test class
Added logic to FactoryBean to work around bug with DSE Driver.
2015-01-27 10:46:03 -05:00
David Webb
41d68ac541 Merge pull request #26 from sksumit1/patch-1
Fixing the bug in the file CassandraCqlClusterFactoryBean
2015-01-27 08:53:56 -05:00
David Webb
72e251bb59 DATACASS-198: Upgrade for Cassandra 2.1 Support
Task-Url: https://jira.spring.io/browse/DATACASS-198

Making Session static to prevent too many open files and to follow
best practices in C* Java Driver.
2015-01-26 15:26:45 -05:00
David Webb
e1a197170b DATACASS-198: Upgrade for Cassandra 2.1 Support
Task-Url: https://jira.spring.io/browse/DATACASS-198
2015-01-26 15:18:22 -05:00
David Webb
c7e4320999 DATACASS-197: Reconsider usage of ingestions for general CQL test cases
Task-Url: https://jira.spring.io/browse/DATACASS-197
2015-01-26 11:33:42 -05:00
David Webb
83e0b30e2a DATACASS-197: Reconsider usage of ingestions for general CQL test cases
Task-Url: https://jira.spring.io/browse/DATACASS-197
2015-01-26 10:34:51 -05:00
Oliver Gierke
aaa77690c8 DATACASS-196 - Improve usage of embedded Cassandra in integration tests.
Moved to non-static fields for Cassandra Cluster and Session and properly connect and close resources in @Before/@After callbacks.

Added missing license headers where necessary.
2015-01-21 16:34:02 +01:00
sksumit1
8a821a23ee fix for https://jira.spring.io/browse/DATACASS-176 2014-11-01 10:58:31 +05:30
Matthew Adams
ff41674809 DATACASS-144: done; rebased all branch commits 2014-09-24 15:23:59 -05:00
David Webb
71eee6de31 DATACASS-136 - CLOSED - Updated dependencies.
Moved cassandra-all to scope test (left over from DSJD 1.X days)
Newest DSJD
Newest C* 2.0.X
2014-08-08 23:32:32 -04:00
David T Webb
8edc4ce1a9 DATACASS-126 - Added DataStax Java Driver 2.0.1 dependency and
cassandra-unit 2.0.X dependency.

Full support for Cassandra 2.0.X
2014-04-29 09:45:14 -04:00
David T Webb
482661268d DATACASS-114 - Added WriteOptions with TTL support in CqlOperations and
CassandraOperations.
2014-03-21 12:35:12 -04:00
David T Webb
647b608402 DATACASS-89: Add overloaded methods to CqlOperations that use strongly
typed Query objects 

Task-Url: https://jira.springsource.org/browse/DATACASS-89
2014-03-20 14:52:21 -04:00
Matthew Adams
97d55bcc7a DATACASS-80 - renamed module spring-cassandra -> spring-cql, xml namespace from .../cassandra -> .../cql, + classes 2014-02-26 16:44:34 -06:00