Commit Graph

778 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
4772c5b628 DATACASS-280 - Refactor Cassandra query execution and mapping to consolidate mapping.
We now support Optional provided by Spring Data Commons on Repository methods carrying the appropriate element type.

This commit refactors the mapping layer for Cassandra query methods with following changes: Pull mapping from AbstractCassandraQuery into AbstractCassandraConverter. Throw UnsupportedOperationException in deprecated AbstractCassandraQuery.setConversionService method. Refactor conditional execution to CassandraQueryExecution pattern and follow CassandraConverters/CustomConversions pattern. Introduce DtoInstantiatingConverter and Reading/Writing converters. Refactor lookup map creation to multiple methods. Rename fields. Remove unused primitiveTypesByWrapperType. Fix error message of getDataTypeNamesFrom method.

Add JavaDoc and extend not-null assertions with a meaningful message.

Remove Java 7 build profile from TravisCI as these changes require the usage of Java 8 within the tests.

Original pull request: #53
Related ticket: DATACASS-247
2016-05-10 17:24:08 +02: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
Jorge Davison
1a3a9d9c56 DATACASS-226 - Enable CassandraCqlClusterFactoryBean to set QueryOptions at cluster level.
We now allow configuring QueryOptions on Cluster level.

Original pull request: #31
2016-05-10 15:55:25 +02:00
Mark Paluch
24e3788ae4 DATACASS-255 - Add travis build file.
Original pull request: #51
2016-05-10 11:01:39 +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
21686dd448 DATACASS-262 - Polishing.
Add author. Update license header. Improve JavaDoc.

Original pull request: #42.
2016-04-28 14:29:32 +02:00
Ryan Scheidter
5dc5cc5196 DATACASS-262 - Add missing throws to catch blocks in CqlTemplate.
While these process methods have quite a few problems and inconsistencies with respect to the exception handling, only the more egregious 'throw' omissions are addressed in this commit.

Original pull request: #42.
2016-04-28 14:29:19 +02:00
Mark Paluch
71a1ba5255 DATACASS-174 - Polishing.
Guard getTableName if PersistentEntity is null. Add author tags. Update date in license headers. Remove unused code.

Original pull request: #28.
2016-04-28 14:12:30 +02:00
Mark Paluch
58d6eb2b26 DATACASS-174 - Fix StackOverflowError in CassandraAdminTemplate#dropTable(Class<?>).
Delete recursive function to determine table name from entity class and reuse getTableName(...)

Original pull request: #28.
2016-04-28 13:51:03 +02:00
Stefan Birkner
b3289af1e2 DATACASS-275 - Don't use deprecated methods.
The method DataType.deserialize(ByteBuffer) is deprecated and throws an `UnsupportedOperationException`.
This methods will be removed in future versions of the driver. By not using them anymore we make it easier to upgrade the driver afterwards.

Original pull request: #49.
Related ticket: DATACASS-198
CLA: 172420160413064110 (Stefan Birkner)
2016-04-27 15:34:05 +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
Mark Paluch
09f8de4603 DATACASS-260 - Code improvements.
Use slf4j syntax for parameter substitution. Guard debug log statements. Use improved log messages in log events and Exception. Reformat code.

Original pull request: #47.
2016-04-07 11:03:31 +02:00
Mark Paluch
5e09ef5adf DATACASS-260 - Enable mapping for enum-typed properties.
We now support out-of-the box mapping for enum-typed properties in domain types and primary keys. Enums are mapped using their name. Ordinal-based enum mapping is not supported but can be achieved by registering a custom converter.

Original pull request: #47.
2016-04-07 11:03:15 +02:00
Oliver Gierke
d556af7b33 DATACASS-268 - Updated changelog. 2016-04-06 23:14:24 +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
97cf6c9a3a DATACASS-264 - Updated changelog. 2016-04-06 16:34:35 +02:00
Mark Paluch
e39762bf82 DATACASS-267 - Point to the appropriate Jira project. 2016-04-05 14:21:24 +02:00
Mark Paluch
35f76887aa DATACASS-267 - Add pull request template. 2016-04-05 09:35:17 +02:00
Ranger Tsao
2b503ec826 DATACASS-261 - Update readme link to Cassandra driver documentation.
Fix broken link to Java driver documentation.

Original pull request: #45.
2016-03-30 09:55:43 +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
3448b6934f DATACASS-256 - Updated changelog. 2016-03-18 11:06:48 +01:00
Christoph Strobl
69e7f41fef DATACASS-257 - Polishing.
Added tests and provide repository identifying type information.
Enabled nested repository option in @EnableCassandraRepsoitories.

Original Pull Request: #46
2016-03-11 10:39:41 +01:00
Mark Paluch
57a4077bee DATACASS-257 - Add Cassandra-specific annotation to repository extension.
CassandraRepositoryConfigurationExtensions specifies now @Table to identify Spring Data Cassandra repositories when using strict configuration mode.

Original Pull Request: #46
2016-03-11 10:38:38 +01:00
Oliver Gierke
9946f7b2aa DATACASS-254 - Updated changelog. 2016-02-23 14:27:20 +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
1379f7bb3b DATACASS-251 - Updated changelog. 2016-02-12 15:36:06 +01:00
Oliver Gierke
0a24e5d689 DATACASS-252 - Added code of conduct.
Added CONTRIBUTING file along the way.
2016-02-02 10:22:01 +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
b398ddab2e DATACASS-246 - Updated changelog. 2015-12-18 11:23:12 +01:00
Oliver Gierke
91a4f0b232 DATACASS-245 - Adapted to API changes in Spring Data Commons.
Related ticket: DATACMNS-89.
2015-12-14 20:35:56 +01:00
Oliver Gierke
52fd0a6a62 DATACASS-237 - Updated changelog. 2015-11-17 13:56:27 +01:00
Oliver Gierke
e58a1b9a07 DATACASS-235 - Updated changelog. 2015-10-14 13:57:04 +02:00
Oliver Gierke
c154b14219 DATACASS-232 - After release cleanups. 2015-09-01 12:11:03 +02:00