Commit Graph

97 Commits

Author SHA1 Message Date
Mark Paluch
66a69c0926 DATACASS-296 - Use CustomConversions for JSR-310, Joda and ThreeTen Backport types.
We now allow registering CustomConversions to register custom converters (read and write targets). CustomConversions registers by default JSR-310, Joda Time and ThreeTen backport type converters.
These types (LocalDate, LocalDateTime) can be used in domain classes and with query method arguments. Date-only types map to Cassandra's date type, Date and time types map to Cassandra's timestamp type. Type mapping works for singular and collection types (List and Set).

```
@Table
public Person

    @Id String id;

    java.time.LocalDate date;

    @CassandraType(type = Name.TIMESTAMP)
    java.time.LocalDate timestamp;

    List<org.threeten.bp.Instant> timestamps;
}
```

Original pull request: #68.
2016-06-29 19:21:08 -07:00
Mark Paluch
39dca76e7c DATACASS-253 - Add synchronization to CachedPreparedStatementCreator.
CachedPreparedStatementCreator is now thread-safe and synchronizes concurrent calls to statement preparation. The synchronization prevents multiple calls to Session.prepare(…) for the same session, CQL statement and keyspace.
2016-06-03 12:25:01 -07: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
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
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
Oliver Gierke
e3186813c5 DATACASS-264 - After release cleanups. 2016-04-06 16:37:02 +02:00
Oliver Gierke
a453c5e961 DATACASS-264 - Prepare next development iteration. 2016-04-06 16:36:59 +02:00
Oliver Gierke
ecf88c24d3 DATACASS-264 - Release version 1.4 GA (Hopper). 2016-04-06 16:35:58 +02:00
Oliver Gierke
5a1384a098 DATACASS-264 - Prepare 1.4 GA (Hopper). 2016-04-06 16:34:45 +02:00
Oliver Gierke
601e2d0df3 DATACASS-256 - After release cleanups. 2016-03-18 11:16:07 +01:00
Oliver Gierke
e572723e34 DATACASS-256 - Prepare next development iteration. 2016-03-18 11:15:51 +01:00
Oliver Gierke
4f70ef633c DATACASS-256 - Release version 1.4 RC1 (Hopper). 2016-03-18 11:14:59 +01:00
Oliver Gierke
ee5b030f23 DATACASS-256 - Prepare 1.4 RC1 (Hopper). 2016-03-18 11:06:57 +01:00
Oliver Gierke
c4140b5874 DATACASS-251 - After release cleanups. 2016-02-12 15:43:56 +01:00
Oliver Gierke
0de315c0bd DATACASS-251 - Prepare next development iteration. 2016-02-12 15:43:39 +01:00
Oliver Gierke
f35c9d4332 DATACASS-251 - Release version 1.4 M1 (Hopper). 2016-02-12 15:42:46 +01:00
Oliver Gierke
7308936ce9 DATACASS-251 - Prepare 1.4 M1 (Hopper). 2016-02-12 15:36:18 +01:00
Oliver Gierke
ed905da077 DATACASS-251 - Declare Artifactory Maven plugin to be able to distribute build artifacts. 2016-01-28 14:59:20 +01:00
Oliver Gierke
4f0ebd7a1b DATACASS-239 - Polishing.
Removed some obsolete exclusions from the parent pom.

Original pull request: #43.
2015-12-23 10:23:09 +01: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
c154b14219 DATACASS-232 - After release cleanups. 2015-09-01 12:11:03 +02:00
Spring Buildmaster
9351930aef DATACASS-232 - Prepare next development iteration. 2015-09-01 02:00:41 -07:00
Spring Buildmaster
b037d0eb2e DATACASS-232 - Release version 1.3.0.RELEASE (Gosling GA). 2015-09-01 02:00:39 -07:00
Oliver Gierke
579415f888 DATACASS-232 - Prepare 1.3.0.RELEASE (Gosling GA). 2015-09-01 09:44:22 +02:00
Oliver Gierke
aee3b46636 DATACASS-230 - After release cleanups. 2015-08-04 14:09:22 +02:00
Spring Buildmaster
291893b56c DATACASS-230 - Prepare next development iteration. 2015-08-04 04:50:32 -07:00
Spring Buildmaster
9f08df3b27 DATACASS-230 - Release version 1.3.0.RC1 (Gosling RC1). 2015-08-04 04:50:30 -07:00
Oliver Gierke
1b9517d1c4 DATACASS-230 - Prepare 1.3.0.RC1 (Gosling RC1). 2015-08-04 11:48:44 +02: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
Oliver Gierke
5ac374a5e9 DATACASS-215 - After release cleanups. 2015-06-02 11:40:22 +02:00
Spring Buildmaster
7d5a62c504 DATACASS-215 - Prepare next development iteration. 2015-06-02 01:41:15 -07:00
Spring Buildmaster
144b095fab DATACASS-215 - Release version 1.3.0 M1 (Gosling). 2015-06-02 01:41:12 -07:00
Oliver Gierke
9be66754d4 DATACASS-215 - Prepare 1.3.0.M1 (Gosling M1). 2015-06-02 08:25:10 +02:00
Oliver Gierke
4c4d363a7c DATACASS-207 - After release cleanups. 2015-03-23 13:55:56 +01:00
Spring Buildmaster
bdf9a990ca DATACASS-207 - Prepare next development iteration. 2015-03-23 05:03:32 -07:00
Spring Buildmaster
ae67ea4c55 DATACASS-207 - Release version 1.2.0.RELEASE. 2015-03-23 05:03:30 -07:00
Oliver Gierke
d0f122c653 DATACASS-207 - Prepare 1.2.0.RELEASE (Fowler GA). 2015-03-23 12:25:14 +01:00
Oliver Gierke
0b5291b469 DATACASS-205 - After release cleanups. 2015-03-05 19:46:33 +01:00
Spring Buildmaster
a25ef43bea DATACASS-205 - Prepare next development iteration. 2015-03-05 07:41:40 -08:00
Spring Buildmaster
fa702a55bf DATACASS-205 - Release version 1.2.0.RC1. 2015-03-05 07:41:36 -08:00
Oliver Gierke
931e6003a1 DATACASS-205 - Prepare 1.2.0.RC1 (Fowler RC1). 2015-03-05 16:22:55 +01: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
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
Oliver Gierke
cf37d9236f DATACASS-186 - After release cleanups. 2014-12-01 13:37:34 +01:00
Spring Buildmaster
56fd0177f6 DATACASS-186 - Prepare next development iteration. 2014-12-01 04:12:51 -08:00
Spring Buildmaster
3ec5c774c8 DATACASS-186 - Release version 1.2.0.M1. 2014-12-01 04:12:49 -08:00
Oliver Gierke
8cf55194f2 DATACASS-186 - Prepare 1.2.0.M1 (Fowler M1). 2014-12-01 12:19:40 +01:00
Oliver Gierke
bb6ed7967c DATACASS-165 - After release cleanups. 2014-09-05 13:50:55 +02:00