kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 9ece039409ca262f02eb93e6ab48ce2354208bfa5033ca1ea0fd76be288245e3 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2015-05-28 11:11 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-05-28 11:26 +02:00 |
| Parents | c79f03f7223a, a4c25c72de7c |
17 files changed
added CONTRIBUTING.md +100 −0
| @@ -0,0 +1,100 @@ | ||
| 1 | +# Contributing guidelines | |
| 2 | + | |
| 3 | +## Working on an issue | |
| 4 | + | |
| 5 | +Before starting to work on something, please comment in JIRA or ask on the mailing list | |
| 6 | +to make sure nobody else is working on it. | |
| 7 | + | |
| 8 | +If a fix applies both to 2.0 and 2.1, work on the 2.0 branch, your commit will eventually | |
| 9 | +get merged in 2.1. | |
| 10 | + | |
| 11 | +Before you send your pull request, make sure that: | |
| 12 | + | |
| 13 | +- you have a unit test that failed before the fix and succeeds after. | |
| 14 | +- the fix is mentioned in `driver-core/CHANGELOG.rst`. | |
| 15 | +- the commit message include the reference of the JIRA ticket for automatic linking | |
| 16 | + (example: `Fix NPE when a connection fails during pool construction (JAVA-503).`). | |
| 17 | + | |
| 18 | +As long as your pull request is not merged, it's OK to rebase your branch and push with | |
| 19 | +`--force`. | |
| 20 | + | |
| 21 | +If you want to contribute but don't have a specific issue in mind, the [lhf](https://datastax-oss.atlassian.net/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project%20%3D%20JAVA%20AND%20status%20in%20(Open%2C%20Reopened)%20AND%20labels%20%3D%20lhf) | |
| 22 | +label in JIRA is a good place to start: it marks "low hanging fruits" that don't require | |
| 23 | +in-depth knowledge of the codebase. | |
| 24 | + | |
| 25 | +## Editor configuration | |
| 26 | + | |
| 27 | +### General | |
| 28 | + | |
| 29 | +We consider automatic formatting as a help, not a crutch. Sometimes it makes sense to | |
| 30 | +break the rules to make the code more readable, for instance aligning columns (see the | |
| 31 | +constant declarations in `DataType.Name` for an example of this). | |
| 32 | + | |
| 33 | +**Please do not reformat whole files, only the lines that you have added or modified**. | |
| 34 | + | |
| 35 | + | |
| 36 | +### Eclipse | |
| 37 | + | |
| 38 | +Formatter: | |
| 39 | + | |
| 40 | +- Preferences > Java > Code Style > Formatter. | |
| 41 | +- Click "Import". | |
| 42 | +- Select `src/main/config/ide/eclipse-formatter.xml`. | |
| 43 | + | |
| 44 | +Import order: | |
| 45 | + | |
| 46 | +- Preferences > Java > Code Style > Organize imports. | |
| 47 | +- Click "Import". | |
| 48 | +- Select `src/main/config/ide/eclipse.importorder`. | |
| 49 | + | |
| 50 | +Prevent trailing whitespaces: | |
| 51 | + | |
| 52 | +- Preferences > Java > Editor > Save Actions. | |
| 53 | +- Check "Perform the selected actions on save". | |
| 54 | +- Ensure "Format source code" and "Organize imports" are unchecked. | |
| 55 | +- Check "Additional actions". | |
| 56 | +- Click "Configure". | |
| 57 | +- In the "Code Organizing" tab, check "Remove trailing whitespace" and "All lines". | |
| 58 | +- Click "OK" (the text area should only have one action "Remove trailing white spaces"). | |
| 59 | + | |
| 60 | + | |
| 61 | +### IntelliJ IDEA | |
| 62 | + | |
| 63 | +- File > Import Settings... | |
| 64 | +- Select `src/main/config/ide/intellij-code-style.jar`. | |
| 65 | + | |
| 66 | +This should add a new Code Style scheme called "java-driver". | |
| 67 | + | |
| 68 | +## Running the tests | |
| 69 | + | |
| 70 | +We use TestNG. There are 3 test categories: | |
| 71 | + | |
| 72 | +- "unit": pure Java unit tests. | |
| 73 | +- "short" and "long": integration tests that launch Cassandra instances. | |
| 74 | + | |
| 75 | +The Maven build uses profiles named after the categories to choose which tests to run: | |
| 76 | + | |
| 77 | +``` | |
| 78 | +mvn test -Pshort | |
| 79 | +``` | |
| 80 | + | |
| 81 | +The default is "unit". Each profile runs the ones before it ("short" runs unit, etc.) | |
| 82 | + | |
| 83 | +Integration tests use [CCM](https://github.com/pcmanus/ccm) to bootstrap Cassandra instances. | |
| 84 | +Two Maven properties control its execution: | |
| 85 | + | |
| 86 | +- `cassandra.version`: the Cassandra version. This has a default value in the root POM, | |
| 87 | + you can override it on the command line (`-Dcassandra.version=...`). | |
| 88 | +- `ipprefix`: the prefix of the IP addresses that the Cassandra instances will bind to (see | |
| 89 | + below). This defaults to `127.0.1.`. | |
| 90 | + | |
| 91 | + | |
| 92 | +CCM launches multiple Cassandra instances on localhost by binding to different addresses. The | |
| 93 | +driver uses up to 6 different instances (127.0.1.1 to 127.0.1.6 with the default prefix). | |
| 94 | +You'll need to define loopback aliases for this to work, on Mac OS X your can do it with: | |
| 95 | + | |
| 96 | +``` | |
| 97 | +sudo ifconfig lo0 alias 127.0.1.1 up | |
| 98 | +sudo ifconfig lo0 alias 127.0.1.2 up | |
| 99 | +... | |
| 100 | +``` |
deleted CONTRIBUTING.rst +0 −72
| @@ -1,72 +0,0 @@ | ||
| 1 | -Contributing guidelines | |
| 2 | -======================= | |
| 3 | - | |
| 4 | -Working on an issue | |
| 5 | -------------------- | |
| 6 | - | |
| 7 | -Before starting to work on something, please comment in JIRA or ask on the mailing list | |
| 8 | -to make sure nobody else is working on it. | |
| 9 | - | |
| 10 | -If a fix applies both to 2.0 and 2.1, work on the 2.0 branch, your commit will eventually | |
| 11 | -get merged in 2.1. | |
| 12 | - | |
| 13 | -Before you send your pull request, make sure that: | |
| 14 | - | |
| 15 | -- you have a unit test that failed before the fix and succeeds after. | |
| 16 | -- the fix is mentioned in ``driver-core/CHANGELOG.rst``. | |
| 17 | -- the commit message include the reference of the JIRA ticket for automatic linking | |
| 18 | - (example: ``Fix NPE when a connection fails during pool construction (JAVA-503).``). | |
| 19 | - | |
| 20 | -As long as your pull request is not merged, it's OK to rebase your branch and push with | |
| 21 | -``--force``. | |
| 22 | - | |
| 23 | -If you want to contribute but don't have a specific issue in mind, the `lhf <https://datastax-oss.atlassian.net/secure/IssueNavigator.jspa?reset=true&mode=hide&jqlQuery=project%20%3D%20JAVA%20AND%20status%20in%20(Open%2C%20Reopened)%20AND%20labels%20%3D%20lhf>`_ | |
| 24 | -label in JIRA is a good place to start: it marks "low hanging fruits" that don't require | |
| 25 | -in-depth knowledge of the codebase. | |
| 26 | - | |
| 27 | -Editor configuration | |
| 28 | --------------------- | |
| 29 | - | |
| 30 | -General | |
| 31 | -~~~~~~~ | |
| 32 | - | |
| 33 | -We consider automatic formatting as a help, not a crutch. Sometimes it makes sense to | |
| 34 | -break the rules to make the code more readable, for instance aligning columns (see the | |
| 35 | -constant declarations in ``DataType.Name`` for an example of this). | |
| 36 | - | |
| 37 | -**Please do not reformat whole files, only the lines that you have added or modified**. | |
| 38 | - | |
| 39 | - | |
| 40 | -Eclipse | |
| 41 | -~~~~~~~ | |
| 42 | - | |
| 43 | -Formatter: | |
| 44 | - | |
| 45 | -- Preferences > Java > Code Style > Formatter. | |
| 46 | -- Click "Import". | |
| 47 | -- Select ``src/main/config/ide/eclipse-formatter.xml``. | |
| 48 | - | |
| 49 | -Import order: | |
| 50 | - | |
| 51 | -- Preferences > Java > Code Style > Organize imports. | |
| 52 | -- Click "Import". | |
| 53 | -- Select ``src/main/config/ide/eclipse.importorder``. | |
| 54 | - | |
| 55 | -Prevent trailing whitespaces: | |
| 56 | - | |
| 57 | -- Preferences > Java > Editor > Save Actions. | |
| 58 | -- Check "Perform the selected actions on save". | |
| 59 | -- Ensure "Format source code" and "Organize imports" are unchecked. | |
| 60 | -- Check "Additional actions". | |
| 61 | -- Click "Configure". | |
| 62 | -- In the "Code Organizing" tab, check "Remove trailing whitespace" and "All lines". | |
| 63 | -- Click "OK" (the text area should only have one action "Remove trailing white spaces"). | |
| 64 | - | |
| 65 | - | |
| 66 | -IntelliJ IDEA | |
| 67 | -~~~~~~~~~~~~~ | |
| 68 | - | |
| 69 | -- File > Import Settings... | |
| 70 | -- Select ``src/main/config/ide/intellij-code-style.jar``. | |
| 71 | - | |
| 72 | -This should add a new Code Style scheme called "java-driver". |
modified README.md +3 −6
| @@ -61,7 +61,7 @@ | ||
| 61 | 61 | - TWITTER: Follow the latest news about DataStax Drivers - [@olim7t](http://twitter.com/olim7t), [@mfiguiere](http://twitter.com/mfiguiere) |
| 62 | 62 | - DOCS: http://www.datastax.com/documentation/developer/java-driver/2.1/index.html |
| 63 | 63 | - API: http://www.datastax.com/drivers/java/2.1 |
| 64 | -- CHANGELOG: https://github.com/datastax/java-driver/blob/2.1/driver-core/CHANGELOG.rst | |
| 64 | + | |
| 65 | 65 | |
| 66 | 66 | ## Maven |
| 67 | 67 | |
| @@ -106,11 +106,8 @@ | ||
| 106 | 106 | |
| 107 | 107 | ## Upgrading from previous versions |
| 108 | 108 | |
| 109 | -If you are upgrading from the 2.0.x branch of the driver, be sure to have a look at | |
| 110 | -the [upgrade guide](https://github.com/datastax/java-driver/blob/2.1/driver-core/Upgrade_guide_to_2.1.rst). | |
| 111 | - | |
| 112 | -If you are upgrading from the 1.x branch, follow the [upgrade guide to 2.0](https://github.com/datastax/java-driver/blob/2.0/driver-core/Upgrade_guide_to_2.0.rst), | |
| 113 | -and then the above document. | |
| 109 | +If you are upgrading from a previous version of the driver, be sure to have a look at | |
| 110 | +the [upgrade guide](/upgrade_guide/). | |
| 114 | 111 | |
| 115 | 112 | |
| 116 | 113 | ### Troubleshooting |
added changelog/README.md +691 −0
| @@ -0,0 +1,691 @@ | ||
| 1 | +## Changelog | |
| 2 | + | |
| 3 | +### 2.1.7 (in progress) | |
| 4 | + | |
| 5 | +- [improvement] Unify "Target" enum for schema elements (JAVA-782) | |
| 6 | + | |
| 7 | + | |
| 8 | +### 2.1.6 | |
| 9 | + | |
| 10 | +Merged from 2.0 branch: | |
| 11 | + | |
| 12 | +- [new feature] Add getObject to BoundStatement and Row (JAVA-584) | |
| 13 | +- [improvement] Improve connection pool resizing algorithm (JAVA-419) | |
| 14 | +- [bug] Fix race condition between pool expansion and shutdown (JAVA-599) | |
| 15 | +- [improvement] Upgrade Netty to 4.0.27 (JAVA-622) | |
| 16 | +- [improvement] Coalesce frames before flushing them to the connection | |
| 17 | + (JAVA-562) | |
| 18 | +- [improvement] Rename threads to indicate that they are for the driver | |
| 19 | + (JAVA-583) | |
| 20 | +- [new feature] Expose paging state (JAVA-550) | |
| 21 | +- [new feature] Slow Query Logger (JAVA-646) | |
| 22 | +- [improvement] Exclude some errors from measurements in LatencyAwarePolicy | |
| 23 | + (JAVA-698) | |
| 24 | +- [bug] Fix issue when executing a PreparedStatement from another cluster | |
| 25 | + (JAVA-641) | |
| 26 | +- [improvement] Log keyspace xxx does not exist at WARN level (JAVA-534) | |
| 27 | +- [improvement] Allow Cluster subclasses to delegate to another instance | |
| 28 | + (JAVA-619) | |
| 29 | +- [new feature] Expose an API to check for schema agreement after a | |
| 30 | + schema-altering statement (JAVA-669) | |
| 31 | +- [improvement] Make connection and pool creation fully async (JAVA-692) | |
| 32 | +- [improvement] Optimize connection use after reconnection (JAVA-505) | |
| 33 | +- [improvement] Remove "suspected" mechanism (JAVA-617) | |
| 34 | +- [improvement] Don't mark connection defunct on client timeout (reverts | |
| 35 | + JAVA-425) | |
| 36 | +- [new feature] Speculative query executions (JAVA-561) | |
| 37 | +- [bug] Release connection before completing the ResultSetFuture (JAVA-666) | |
| 38 | +- [new feature BETA] Percentile-based variant of query logger and speculative | |
| 39 | + executions (JAVA-723) | |
| 40 | +- [bug] Fix buffer leaks when compression is enabled (JAVA-734). | |
| 41 | +- [improvement] Use Netty's pooled ByteBufAllocator by default (JAVA-756) | |
| 42 | +- [improvement] Expose "unsafe" paging state API (JAVA-759) | |
| 43 | +- [bug] Prevent race during pool initialization (JAVA-768) | |
| 44 | + | |
| 45 | + | |
| 46 | +### 2.1.5 | |
| 47 | + | |
| 48 | +- [bug] Authorize Null parameter in Accessor method (JAVA-575) | |
| 49 | +- [improvement] Support C* 2.1.3's nested collections (JAVA-570) | |
| 50 | +- [bug] Fix checks on mapped collection types (JAVA-612) | |
| 51 | +- [bug] Fix QueryBuilder.putAll() when the collection contains UDTs (JAVA-672) | |
| 52 | + | |
| 53 | +Merged from 2.0 branch: | |
| 54 | + | |
| 55 | +- [new feature] Add AddressTranslater for EC2 multi-region deployment (JAVA-518) | |
| 56 | +- [improvement] Add connection heartbeat (JAVA-533) | |
| 57 | +- [improvement] Reduce level of logs on missing rpc_address (JAVA-568) | |
| 58 | +- [improvement] Expose node token and range information (JAVA-312, JAVA-681) | |
| 59 | +- [bug] Fix cluster name mismatch check at startup (JAVA-595) | |
| 60 | +- [bug] Fix guava dependency when using OSGI (JAVA-620) | |
| 61 | +- [bug] Fix handling of DROP events when ks name is case-sensitive (JAVA-678) | |
| 62 | +- [improvement] Use List<?> instead of List<Object> in QueryBuilder API | |
| 63 | + (JAVA-631) | |
| 64 | +- [improvement] Exclude Netty POM from META-INF in shaded JAR (JAVA-654) | |
| 65 | +- [bug] Quote single quotes contained in table comments in asCQLQuery method | |
| 66 | + (JAVA-655) | |
| 67 | +- [bug] Empty TokenRange returned in a one token cluster (JAVA-684) | |
| 68 | +- [improvement] Expose TokenRange#contains (JAVA-687) | |
| 69 | +- [bug] Prevent race between cancellation and query completion (JAVA-614) | |
| 70 | +- [bug] Prevent cancel and timeout from cancelling unrelated ResponseHandler if | |
| 71 | + streamId was already released and reused (JAVA-632). | |
| 72 | +- [bug] Fix issue when newly opened pool fails before we could mark the node UP | |
| 73 | + (JAVA-642) | |
| 74 | +- [bug] Fix unwanted LBP notifications when a contact host is down (JAVA-613) | |
| 75 | +- [bug] Fix edge cases where a connection was released twice (JAVA-651). | |
| 76 | +- [bug] Fix edge cases in query cancellation (JAVA-653). | |
| 77 | + | |
| 78 | + | |
| 79 | +### 2.1.4 | |
| 80 | + | |
| 81 | +Merged from 2.0 branch: | |
| 82 | + | |
| 83 | +- [improvement] Shade Netty dependency (JAVA-538) | |
| 84 | +- [improvement] Target schema refreshes more precisely (JAVA-543) | |
| 85 | +- [bug] Don't check rpc_address for control host (JAVA-546) | |
| 86 | +- [improvement] Improve message of NoHostAvailableException (JAVA-409) | |
| 87 | +- [bug] Rework connection reaper to avoid deadlock (JAVA-556) | |
| 88 | +- [bug] Avoid deadlock when multiple connections to the same host get write | |
| 89 | + errors (JAVA-557) | |
| 90 | +- [improvement] Make shuffle=true the default for TokenAwarePolicy (JAVA-504) | |
| 91 | +- [bug] Fix bug when SUSPECT reconnection succeeds, but one of the pooled | |
| 92 | + connections fails while bringing the node back up (JAVA-577) | |
| 93 | +- [bug] Prevent faulty control connection from ignoring reconnecting hosts | |
| 94 | + (JAVA-587) | |
| 95 | +- temporarily revert "Add idle timeout to the connection pool" (JAVA-419) | |
| 96 | +- [bug] Ensure updateCreatedPools does not add pools for suspected hosts | |
| 97 | + (JAVA-593) | |
| 98 | +- [bug] Ensure state change notifications for a given host are handled serially | |
| 99 | + (JAVA-594) | |
| 100 | +- [bug] Ensure control connection reconnects when control host is removed | |
| 101 | + (JAVA-597) | |
| 102 | + | |
| 103 | + | |
| 104 | +### 2.1.3 | |
| 105 | + | |
| 106 | +- [bug] Ignore static fields in mapper (JAVA-510) | |
| 107 | +- [bug] Fix UDT parsing at init when using the default protocol version (JAVA-509) | |
| 108 | +- [bug] Fix toString, equals and hashCode on accessor proxies (JAVA-495) | |
| 109 | +- [bug] Allow empty name on Column and Field annotations (JAVA-528) | |
| 110 | + | |
| 111 | +Merged from 2.0 branch: | |
| 112 | + | |
| 113 | +- [bug] Ensure control connection does not trigger concurrent reconnects (JAVA-497) | |
| 114 | +- [improvement] Keep trying to reconnect on authentication errors (JAVA-472) | |
| 115 | +- [improvement] Expose close method on load balancing policy (JAVA-463) | |
| 116 | +- [improvement] Allow load balancing policy to trigger refresh for a single host (JAVA-459) | |
| 117 | +- [bug] Expose an API to cancel reconnection attempts (JAVA-493) | |
| 118 | +- [bug] Fix NPE when a connection fails during pool construction (JAVA-503) | |
| 119 | +- [improvement] Log datacenter name in DCAware policy's init when it is explicitly provided | |
| 120 | + (JAVA-423) | |
| 121 | +- [improvement] Shuffle the replicas in TokenAwarePolicy.newQueryPlan (JAVA-504) | |
| 122 | +- [improvement] Make schema agreement wait tuneable (JAVA-507) | |
| 123 | +- [improvement] Document how to inject the driver metrics into another registry (JAVA-494) | |
| 124 | +- [improvement] Add idle timeout to the connection pool (JAVA-419) | |
| 125 | +- [bug] LatencyAwarePolicy does not shutdown executor on invocation of close (JAVA-516) | |
| 126 | +- [improvement] Throw an exception when DCAwareRoundRobinPolicy is built with | |
| 127 | + an explicit but null or empty local datacenter (JAVA-451). | |
| 128 | +- [bug] Fix check for local contact points in DCAware policy's init (JAVA-511) | |
| 129 | +- [improvement] Make timeout on saturated pool customizable (JAVA-457) | |
| 130 | +- [improvement] Downgrade Guava to 14.0.1 (JAVA-521) | |
| 131 | +- [bug] Fix token awareness for case-sensitive keyspaces and tables (JAVA-526) | |
| 132 | +- [bug] Check maximum number of values passed to SimpleStatement (JAVA-515) | |
| 133 | +- [improvement] Expose the driver version through the API (JAVA-532) | |
| 134 | +- [improvement] Optimize session initialization when some hosts are not | |
| 135 | + responsive (JAVA-522) | |
| 136 | + | |
| 137 | + | |
| 138 | +### 2.1.2 | |
| 139 | + | |
| 140 | +- [improvement] Support for native protocol v3 (JAVA-361, JAVA-364, JAVA-467) | |
| 141 | +- [bug] Fix UDT fields of type inet in QueryBuilder (JAVA-454) | |
| 142 | +- [bug] Exclude transient fields from Frozen checks (JAVA-455) | |
| 143 | +- [bug] Fix handling of null collections in mapper (JAVA-453) | |
| 144 | +- [improvement] Make implicit column names case-insensitive in mapper (JAVA-452) | |
| 145 | +- [bug] Fix named bind markers in QueryBuilder (JAVA-433) | |
| 146 | +- [bug] Fix handling of BigInteger in object mapper (JAVA-458) | |
| 147 | +- [bug] Ignore synthetic fields in mapper (JAVA-465) | |
| 148 | +- [improvement] Throw an exception when DCAwareRoundRobinPolicy is built with | |
| 149 | + an explicit but null or empty local datacenter (JAVA-451) | |
| 150 | +- [improvement] Add backwards-compatible DataType.serialize methods (JAVA-469) | |
| 151 | +- [bug] Handle null enum fields in object mapper (JAVA-487) | |
| 152 | +- [bug] Handle null UDT fields in object mapper (JAVA-499) | |
| 153 | + | |
| 154 | +Merged from 2.0 branch: | |
| 155 | + | |
| 156 | +- [bug] Handle null pool in PooledConnection.release (JAVA-449) | |
| 157 | +- [improvement] Defunct connection on request timeout (JAVA-425) | |
| 158 | +- [improvement] Try next host when we get a SERVER_ERROR (JAVA-426) | |
| 159 | +- [bug] Handle race between query timeout and completion (JAVA-449, JAVA-460, JAVA-471) | |
| 160 | +- [bug] Fix DCAwareRoundRobinPolicy datacenter auto-discovery (JAVA-496) | |
| 161 | + | |
| 162 | + | |
| 163 | +### 2.1.1 | |
| 164 | + | |
| 165 | +- [new] Support for new "frozen" keyword (JAVA-441) | |
| 166 | + | |
| 167 | +Merged from 2.0 branch: | |
| 168 | + | |
| 169 | +- [bug] Check cluster name when connecting to a new node (JAVA-397) | |
| 170 | +- [bug] Add missing CAS delete support in QueryBuilder (JAVA-326) | |
| 171 | +- [bug] Add collection and data length checks during serialization (JAVA-363) | |
| 172 | +- [improvement] Surface number of retries in metrics (JAVA-329) | |
| 173 | +- [bug] Do not use a host when no rpc_address found for it (JAVA-428) | |
| 174 | +- [improvement] Add ResultSet.wasApplied() for conditional queries (JAVA-358) | |
| 175 | +- [bug] Fix negative HostConnectionPool open count (JAVA-349) | |
| 176 | +- [improvement] Log more connection details at trace and debug levels (JAVA-436) | |
| 177 | +- [bug] Fix cluster shutdown (JAVA-445) | |
| 178 | + | |
| 179 | + | |
| 180 | +### 2.1.0 | |
| 181 | + | |
| 182 | +- [bug] ClusteringColumn annotation not working with specified ordering (JAVA-408) | |
| 183 | +- [improvement] Fail BoundStatement if null values are not set explicitly (JAVA-410) | |
| 184 | +- [bug] Handle UDT and tuples in BuiltStatement.toString (JAVA-416) | |
| 185 | + | |
| 186 | +Merged from 2.0 branch: | |
| 187 | + | |
| 188 | +- [bug] Release connections on ResultSetFuture#cancel (JAVA-407) | |
| 189 | +- [bug] Fix handling of SimpleStatement with values in query builder | |
| 190 | + batches (JAVA-393) | |
| 191 | +- [bug] Ensure pool is properly closed in onDown (JAVA-417) | |
| 192 | +- [bug] Fix tokenMap initialization at startup (JAVA-415) | |
| 193 | +- [bug] Avoid deadlock on close (JAVA-418) | |
| 194 | + | |
| 195 | + | |
| 196 | +### 2.1.0-rc1 | |
| 197 | + | |
| 198 | +Merged from 2.0 branch: | |
| 199 | + | |
| 200 | +- [bug] Ensure defunct connections are completely closed (JAVA-394) | |
| 201 | +- [bug] Fix memory and resource leak on closed Sessions (JAVA-342, JAVA-390) | |
| 202 | + | |
| 203 | + | |
| 204 | +### 2.1.0-beta1 | |
| 205 | + | |
| 206 | +- [new] Support for User Defined Types and tuples | |
| 207 | +- [new] Simple object mapper | |
| 208 | + | |
| 209 | +Merged from 2.0 branch: everything up to 2.0.3 (included), and the following. | |
| 210 | + | |
| 211 | +- [improvement] Better handling of dead connections (JAVA-204) | |
| 212 | +- [bug] Fix potential NPE in ControlConnection (JAVA-373) | |
| 213 | +- [bug] Throws NPE when passed null for a contact point (JAVA-291) | |
| 214 | +- [bug] Avoid LoadBalancingPolicy onDown+onUp at startup (JAVA-315) | |
| 215 | +- [bug] Avoid classloader leak in Tomcat (JAVA-343) | |
| 216 | +- [bug] Avoid deadlock in onAdd/onUp (JAVA-387) | |
| 217 | +- [bug] Make metadata parsing more lenient (JAVA-377, JAVA-391) | |
| 218 | + | |
| 219 | + | |
| 220 | +### 2.0.10.1 | |
| 221 | + | |
| 222 | +- [improvement] Use Netty's pooled ByteBufAllocator by default (JAVA-756) | |
| 223 | +- [improvement] Expose "unsafe" paging state API (JAVA-759) | |
| 224 | +- [bug] Fix getObject by name (JAVA-767) | |
| 225 | +- [bug] Prevent race during pool initialization (JAVA-768) | |
| 226 | + | |
| 227 | + | |
| 228 | +### 2.0.10 | |
| 229 | + | |
| 230 | +- [new feature] Add AddressTranslater for EC2 multi-region deployment (JAVA-518) | |
| 231 | +- [improvement] Add connection heartbeat (JAVA-533) | |
| 232 | +- [improvement] Reduce level of logs on missing rpc_address (JAVA-568) | |
| 233 | +- [improvement] Expose node token and range information (JAVA-312, JAVA-681) | |
| 234 | +- [bug] Fix cluster name mismatch check at startup (JAVA-595) | |
| 235 | +- [bug] Fix guava dependency when using OSGI (JAVA-620) | |
| 236 | +- [bug] Fix handling of DROP events when ks name is case-sensitive (JAVA-678) | |
| 237 | +- [improvement] Use List<?> instead of List<Object> in QueryBuilder API | |
| 238 | + (JAVA-631) | |
| 239 | +- [improvement] Exclude Netty POM from META-INF in shaded JAR (JAVA-654) | |
| 240 | +- [bug] Quote single quotes contained in table comments in asCQLQuery method | |
| 241 | + (JAVA-655) | |
| 242 | +- [bug] Empty TokenRange returned in a one token cluster (JAVA-684) | |
| 243 | +- [improvement] Expose TokenRange#contains (JAVA-687) | |
| 244 | +- [new feature] Expose values of BoundStatement (JAVA-547) | |
| 245 | +- [new feature] Add getObject to BoundStatement and Row (JAVA-584) | |
| 246 | +- [improvement] Improve connection pool resizing algorithm (JAVA-419) | |
| 247 | +- [bug] Fix race condition between pool expansion and shutdown (JAVA-599) | |
| 248 | +- [improvement] Upgrade Netty to 4.0.27 (JAVA-622) | |
| 249 | +- [improvement] Coalesce frames before flushing them to the connection | |
| 250 | + (JAVA-562) | |
| 251 | +- [improvement] Rename threads to indicate that they are for the driver | |
| 252 | + (JAVA-583) | |
| 253 | +- [new feature] Expose paging state (JAVA-550) | |
| 254 | +- [new feature] Slow Query Logger (JAVA-646) | |
| 255 | +- [improvement] Exclude some errors from measurements in LatencyAwarePolicy | |
| 256 | + (JAVA-698) | |
| 257 | +- [bug] Fix issue when executing a PreparedStatement from another cluster | |
| 258 | + (JAVA-641) | |
| 259 | +- [improvement] Log keyspace xxx does not exist at WARN level (JAVA-534) | |
| 260 | +- [improvement] Allow Cluster subclasses to delegate to another instance | |
| 261 | + (JAVA-619) | |
| 262 | +- [new feature] Expose an API to check for schema agreement after a | |
| 263 | + schema-altering statement (JAVA-669) | |
| 264 | +- [improvement] Make connection and pool creation fully async (JAVA-692) | |
| 265 | +- [improvement] Optimize connection use after reconnection (JAVA-505) | |
| 266 | +- [improvement] Remove "suspected" mechanism (JAVA-617) | |
| 267 | +- [improvement] Don't mark connection defunct on client timeout (reverts | |
| 268 | + JAVA-425) | |
| 269 | +- [new feature] Speculative query executions (JAVA-561) | |
| 270 | +- [bug] Release connection before completing the ResultSetFuture (JAVA-666) | |
| 271 | +- [new feature BETA] Percentile-based variant of query logger and speculative | |
| 272 | + executions (JAVA-723) | |
| 273 | +- [bug] Fix buffer leaks when compression is enabled (JAVA-734). | |
| 274 | + | |
| 275 | +Merged from 2.0.9_fixes branch: | |
| 276 | + | |
| 277 | +- [bug] Prevent race between cancellation and query completion (JAVA-614) | |
| 278 | +- [bug] Prevent cancel and timeout from cancelling unrelated ResponseHandler if | |
| 279 | + streamId was already released and reused (JAVA-632). | |
| 280 | +- [bug] Fix issue when newly opened pool fails before we could mark the node UP | |
| 281 | + (JAVA-642) | |
| 282 | +- [bug] Fix unwanted LBP notifications when a contact host is down (JAVA-613) | |
| 283 | +- [bug] Fix edge cases where a connection was released twice (JAVA-651). | |
| 284 | +- [bug] Fix edge cases in query cancellation (JAVA-653). | |
| 285 | + | |
| 286 | + | |
| 287 | +### 2.0.9.2 | |
| 288 | + | |
| 289 | +- [bug] Fix edge cases where a connection was released twice (JAVA-651). | |
| 290 | +- [bug] Fix edge cases in query cancellation (JAVA-653). | |
| 291 | + | |
| 292 | + | |
| 293 | +### 2.0.9.1 | |
| 294 | + | |
| 295 | +- [bug] Prevent race between cancellation and query completion (JAVA-614) | |
| 296 | +- [bug] Prevent cancel and timeout from cancelling unrelated ResponseHandler if | |
| 297 | + streamId was already released and reused (JAVA-632). | |
| 298 | +- [bug] Fix issue when newly opened pool fails before we could mark the node UP | |
| 299 | + (JAVA-642) | |
| 300 | +- [bug] Fix unwanted LBP notifications when a contact host is down (JAVA-613) | |
| 301 | + | |
| 302 | + | |
| 303 | +### 2.0.9 | |
| 304 | + | |
| 305 | +- [improvement] Shade Netty dependency (JAVA-538) | |
| 306 | +- [improvement] Target schema refreshes more precisely (JAVA-543) | |
| 307 | +- [bug] Don't check rpc_address for control host (JAVA-546) | |
| 308 | +- [improvement] Improve message of NoHostAvailableException (JAVA-409) | |
| 309 | +- [bug] Rework connection reaper to avoid deadlock (JAVA-556) | |
| 310 | +- [bug] Avoid deadlock when multiple connections to the same host get write | |
| 311 | + errors (JAVA-557) | |
| 312 | +- [improvement] Make shuffle=true the default for TokenAwarePolicy (JAVA-504) | |
| 313 | +- [bug] Fix bug when SUSPECT reconnection succeeds, but one of the pooled | |
| 314 | + connections fails while bringing the node back up (JAVA-577) | |
| 315 | +- [bug] Prevent faulty control connection from ignoring reconnecting hosts | |
| 316 | + (JAVA-587) | |
| 317 | +- temporarily revert "Add idle timeout to the connection pool" (JAVA-419) | |
| 318 | +- [bug] Ensure updateCreatedPools does not add pools for suspected hosts | |
| 319 | + (JAVA-593) | |
| 320 | +- [bug] Ensure state change notifications for a given host are handled serially | |
| 321 | + (JAVA-594) | |
| 322 | +- [bug] Ensure control connection reconnects when control host is removed | |
| 323 | + (JAVA-597) | |
| 324 | + | |
| 325 | + | |
| 326 | +### 2.0.8 | |
| 327 | + | |
| 328 | +- [bug] Fix token awareness for case-sensitive keyspaces and tables (JAVA-526) | |
| 329 | +- [bug] Check maximum number of values passed to SimpleStatement (JAVA-515) | |
| 330 | +- [improvement] Expose the driver version through the API (JAVA-532) | |
| 331 | +- [improvement] Optimize session initialization when some hosts are not | |
| 332 | + responsive (JAVA-522) | |
| 333 | + | |
| 334 | + | |
| 335 | +### 2.0.7 | |
| 336 | + | |
| 337 | +- [bug] Handle null pool in PooledConnection.release (JAVA-449) | |
| 338 | +- [improvement] Defunct connection on request timeout (JAVA-425) | |
| 339 | +- [improvement] Try next host when we get a SERVER_ERROR (JAVA-426) | |
| 340 | +- [bug] Handle race between query timeout and completion (JAVA-449, JAVA-460, JAVA-471) | |
| 341 | +- [bug] Fix DCAwareRoundRobinPolicy datacenter auto-discovery (JAVA-496) | |
| 342 | +- [bug] Ensure control connection does not trigger concurrent reconnects (JAVA-497) | |
| 343 | +- [improvement] Keep trying to reconnect on authentication errors (JAVA-472) | |
| 344 | +- [improvement] Expose close method on load balancing policy (JAVA-463) | |
| 345 | +- [improvement] Allow load balancing policy to trigger refresh for a single host (JAVA-459) | |
| 346 | +- [bug] Expose an API to cancel reconnection attempts (JAVA-493) | |
| 347 | +- [bug] Fix NPE when a connection fails during pool construction (JAVA-503) | |
| 348 | +- [improvement] Log datacenter name in DCAware policy's init when it is explicitly provided | |
| 349 | + (JAVA-423) | |
| 350 | +- [improvement] Shuffle the replicas in TokenAwarePolicy.newQueryPlan (JAVA-504) | |
| 351 | +- [improvement] Make schema agreement wait tuneable (JAVA-507) | |
| 352 | +- [improvement] Document how to inject the driver metrics into another registry (JAVA-494) | |
| 353 | +- [improvement] Add idle timeout to the connection pool (JAVA-419) | |
| 354 | +- [bug] LatencyAwarePolicy does not shutdown executor on invocation of close (JAVA-516) | |
| 355 | +- [improvement] Throw an exception when DCAwareRoundRobinPolicy is built with | |
| 356 | + an explicit but null or empty local datacenter (JAVA-451). | |
| 357 | +- [bug] Fix check for local contact points in DCAware policy's init (JAVA-511) | |
| 358 | +- [improvement] Make timeout on saturated pool customizable (JAVA-457) | |
| 359 | +- [improvement] Downgrade Guava to 14.0.1 (JAVA-521) | |
| 360 | + | |
| 361 | + | |
| 362 | +### 2.0.6 | |
| 363 | + | |
| 364 | +- [bug] Check cluster name when connecting to a new node (JAVA-397) | |
| 365 | +- [bug] Add missing CAS delete support in QueryBuilder (JAVA-326) | |
| 366 | +- [bug] Add collection and data length checks during serialization (JAVA-363) | |
| 367 | +- [improvement] Surface number of retries in metrics (JAVA-329) | |
| 368 | +- [bug] Do not use a host when no rpc_address found for it (JAVA-428) | |
| 369 | +- [improvement] Add ResultSet.wasApplied() for conditional queries (JAVA-358) | |
| 370 | +- [bug] Fix negative HostConnectionPool open count (JAVA-349) | |
| 371 | +- [improvement] Log more connection details at trace and debug levels (JAVA-436) | |
| 372 | +- [bug] Fix cluster shutdown (JAVA-445) | |
| 373 | +- [improvement] Expose child policy in chainable load balancing policies (JAVA-439) | |
| 374 | + | |
| 375 | + | |
| 376 | +### 2.0.5 | |
| 377 | + | |
| 378 | +- [bug] Release connections on ResultSetFuture#cancel (JAVA-407) | |
| 379 | +- [bug] Fix handling of SimpleStatement with values in query builder | |
| 380 | + batches (JAVA-393) | |
| 381 | +- [bug] Ensure pool is properly closed in onDown (JAVA-417) | |
| 382 | +- [bug] Fix tokenMap initialization at startup (JAVA-415) | |
| 383 | +- [bug] Avoid deadlock on close (JAVA-418) | |
| 384 | + | |
| 385 | + | |
| 386 | +### 2.0.4 | |
| 387 | + | |
| 388 | +- [improvement] Better handling of dead connections (JAVA-204) | |
| 389 | +- [bug] Fix potential NPE in ControlConnection (JAVA-373) | |
| 390 | +- [bug] Throws NPE when passed null for a contact point (JAVA-291) | |
| 391 | +- [bug] Avoid LoadBalancingPolicy onDown+onUp at startup (JAVA-315) | |
| 392 | +- [bug] Avoid classloader leak in Tomcat (JAVA-343) | |
| 393 | +- [bug] Avoid deadlock in onAdd/onUp (JAVA-387) | |
| 394 | +- [bug] Make metadata parsing more lenient (JAVA-377, JAVA-391) | |
| 395 | +- [bug] Ensure defunct connections are completely closed (JAVA-394) | |
| 396 | +- [bug] Fix memory and resource leak on closed Sessions (JAVA-342, JAVA-390) | |
| 397 | + | |
| 398 | + | |
| 399 | +### 2.0.3 | |
| 400 | + | |
| 401 | +- [new] The new AbsractSession makes mocking of Session easier. | |
| 402 | +- [new] Allow to trigger a refresh of connected hosts (JAVA-309) | |
| 403 | +- [new] New Session#getState method allows to grab information on | |
| 404 | + which nodes a session is connected to (JAVA-265) | |
| 405 | +- [new] Add QueryBuilder syntax for tuples in where clauses (syntax | |
| 406 | + introduced in Cassandra 2.0.6) (JAVA-327) | |
| 407 | +- [improvement] Properly validate arguments of PoolingOptions methods | |
| 408 | + (JAVA-359) | |
| 409 | +- [bug] Fix bogus rejection of BigInteger in 'execute with values' | |
| 410 | + (JAVA-368) | |
| 411 | +- [bug] Signal connection failure sooner to avoid missing them | |
| 412 | + (JAVA-367) | |
| 413 | +- [bug] Throw UnsupportedOperationException for protocol batch | |
| 414 | + setSerialCL (JAVA-337) | |
| 415 | + | |
| 416 | +Merged from 1.0 branch: | |
| 417 | + | |
| 418 | +- [bug] Fix periodic reconnection to down hosts (JAVA-325) | |
| 419 | + | |
| 420 | + | |
| 421 | +### 2.0.2 | |
| 422 | + | |
| 423 | +- [api] The type of the map key returned by NoHostAvailable#getErrors has changed from | |
| 424 | + InetAddress to InetSocketAddress. Same for Initializer#getContactPoints return and | |
| 425 | + for AuthProvider#newAuthenticator. | |
| 426 | +- [api] The default load balacing policy is now DCAwareRoundRobinPolicy, and the local | |
| 427 | + datacenter is automatically picked based on the first connected node. Furthermore, | |
| 428 | + the TokenAwarePolicy is also used by default (JAVA-296) | |
| 429 | +- [new] New optional AddressTranslater (JAVA-145) | |
| 430 | +- [bug] Don't remove quotes on keyspace in the query builder (JAVA-321) | |
| 431 | +- [bug] Fix potential NPE while cluster undergo schema changes (JAVA-320) | |
| 432 | +- [bug] Fix thread-safety of page fetching (JAVA-319) | |
| 433 | +- [bug] Fix potential NPE using fetchMoreResults (JAVA-318) | |
| 434 | + | |
| 435 | +Merged from 1.0 branch: | |
| 436 | + | |
| 437 | +- [new] Expose the name of the partitioner in use in the cluster metadata (JAVA-179) | |
| 438 | +- [new] Add new WhiteListPolicy to limit the nodes connected to a particular list | |
| 439 | +- [improvement] Do not hop DC for LOCAL_* CL in DCAwareRoundRobinPolicy (JAVA-289) | |
| 440 | +- [bug] Revert back to longs for dates in the query builder (JAVA-313) | |
| 441 | +- [bug] Don't reconnect to nodes ignored by the load balancing policy (JAVA-314) | |
| 442 | + | |
| 443 | + | |
| 444 | +### 2.0.1 | |
| 445 | + | |
| 446 | +- [improvement] Handle the static columns introduced in Cassandra 2.0.6 (JAVA-278) | |
| 447 | +- [improvement] Add Cluster#newSession method to create Session without connecting | |
| 448 | + right away (JAVA-208) | |
| 449 | +- [bug] Add missing iso8601 patterns for parsing dates (JAVA-279) | |
| 450 | +- [bug] Properly parse BytesType as the blob type | |
| 451 | +- [bug] Potential NPE when parsing schema of pre-CQL tables of C* 1.2 nodes (JAVA-280) | |
| 452 | + | |
| 453 | +Merged from 1.0 branch: | |
| 454 | + | |
| 455 | +- [bug] LatencyAwarePolicy.Builder#withScale doesn't set the scale (JAVA-275) | |
| 456 | +- [new] Add methods to check if a Cluster/Session instance has been closed already (JAVA-114) | |
| 457 | + | |
| 458 | + | |
| 459 | +### 2.0.0 | |
| 460 | + | |
| 461 | +- [api] Case sensitive identifier by default in Metadata (JAVA-269) | |
| 462 | +- [bug] Fix potential NPE in Cluster#connect (JAVA-274) | |
| 463 | + | |
| 464 | +Merged from 1.0 branch: | |
| 465 | + | |
| 466 | +- [bug] Always return the PreparedStatement object that is cache internally (JAVA-263) | |
| 467 | +- [bug] Fix race when multiple connect are done in parallel (JAVA-261) | |
| 468 | +- [bug] Don't connect at all to nodes that are ignored by the load balancing | |
| 469 | + policy (JAVA-270) | |
| 470 | + | |
| 471 | + | |
| 472 | +### 2.0.0-rc3 | |
| 473 | + | |
| 474 | +- [improvement] The protocol version 1 is now supported (features only supported by the | |
| 475 | + version 2 of the protocol throw UnsupportedFeatureException). | |
| 476 | +- [improvement] Make most main objects interface to facilitate testing/mocking (JAVA-195) | |
| 477 | +- [improvement] Adds new getStatements and clear methods to BatchStatement. | |
| 478 | +- [api] Renamed shutdown to closeAsync and ShutdownFuture to CloseFuture. Clustering | |
| 479 | + and Session also now implement Closeable (JAVA-247). | |
| 480 | +- [bug] Fix potential thread leaks when shutting down Metrics (JAVA-232) | |
| 481 | +- [bug] Fix potential NPE in HostConnectionPool (JAVA-231) | |
| 482 | +- [bug] Avoid NPE when node is in an unconfigured DC (JAVA-244) | |
| 483 | +- [bug] Don't block for scheduled reconnections on Cluster#close (JAVA-258) | |
| 484 | + | |
| 485 | +Merged from 1.0 branch: | |
| 486 | + | |
| 487 | +- [new] Added Session#prepareAsync calls (JAVA-224) | |
| 488 | +- [new] Added Cluster#getLoggedKeyspace (JAVA-249) | |
| 489 | +- [improvement] Avoid preparing a statement multiple time per host with multiple sessions | |
| 490 | +- [bug] Make sure connections are returned to the right pools (JAVA-255) | |
| 491 | +- [bug] Use date string in query build to work-around CASSANDRA-6718 (JAVA-264) | |
| 492 | + | |
| 493 | + | |
| 494 | +### 2.0.0-rc2 | |
| 495 | + | |
| 496 | +- [new] Add LOCAL_ONE consistency level support (requires using C* 2.0.2+) (JAVA-207) | |
| 497 | +- [bug] Fix parsing of counter types (JAVA-219) | |
| 498 | +- [bug] Fix missing whitespace for IN clause in the query builder (JAVA-218) | |
| 499 | +- [bug] Fix replicas computation for token aware balancing (JAVA-221) | |
| 500 | + | |
| 501 | +Merged from 1.0 branch: | |
| 502 | + | |
| 503 | +- [bug] Fix regression from JAVA-201 (JAVA-213) | |
| 504 | +- [improvement] New getter to obtain a snapshot of the scores maintained by | |
| 505 | + LatencyAwarePolicy. | |
| 506 | + | |
| 507 | + | |
| 508 | +### 2.0.0-rc1 | |
| 509 | + | |
| 510 | +- [new] Mark compression dependencies optional in maven (JAVA-199). | |
| 511 | +- [api] Renamed TableMetadata#getClusteringKey to TableMetadata#getClusteringColumns. | |
| 512 | + | |
| 513 | +Merged from 1.0 branch: | |
| 514 | + | |
| 515 | +- [new] OSGi bundle (JAVA-142) | |
| 516 | +- [improvement] Make collections returned by Row immutable (JAVA-205) | |
| 517 | +- [improvement] Limit internal thread pool size (JAVA-203) | |
| 518 | +- [bug] Don't retain unused PreparedStatement in memory (JAVA-201) | |
| 519 | +- [bug] Add missing clustering order info in TableMetadata | |
| 520 | +- [bug] Allow bind markers for collections in the query builder (JAVA-196) | |
| 521 | + | |
| 522 | + | |
| 523 | +### 2.0.0-beta2 | |
| 524 | + | |
| 525 | +- [api] BoundStatement#setX(String, X) methods now set all values (if there is | |
| 526 | + more than one) having the provided name, not just the first occurence. | |
| 527 | +- [api] The Authenticator interface now has a onAuthenticationSuccess method that | |
| 528 | + allows to handle the potential last token sent by the server. | |
| 529 | +- [new] The query builder don't serialize large values to strings anymore by | |
| 530 | + default by making use the new ability to send values alongside the query string. | |
| 531 | +- [new] The query builder has been updated for new CQL features (JAVA-140). | |
| 532 | +- [bug] Fix exception when a conditional write timeout C* side. | |
| 533 | +- [bug] Ensure connection is created when Cluster metadata are asked for | |
| 534 | + (JAVA-182). | |
| 535 | +- [bug] Fix potential NPE during authentication (JAVA-187) | |
| 536 | + | |
| 537 | + | |
| 538 | +### 2.0.0-beta1 | |
| 539 | + | |
| 540 | +- [api] The 2.0 version is an API-breaking upgrade of the driver. While most | |
| 541 | + of the breaking changes are minor, there are too numerous to be listed here | |
| 542 | + and you are encouraged to look at the Upgrade_guide_to_2.0 file that describe | |
| 543 | + those changes in details. | |
| 544 | +- [new] LZ4 compression is supported for the protocol. | |
| 545 | +- [new] The driver does not depend on cassandra-all anymore (JAVA-39) | |
| 546 | +- [new] New BatchStatement class allows to execute batch other statements. | |
| 547 | +- [new] Large ResultSet are now paged (incrementally fetched) by default. | |
| 548 | +- [new] SimpleStatement support values for bind-variables, to allow | |
| 549 | + prepare+execute behavior with one roundtrip. | |
| 550 | +- [new] Query parameters defaults (Consistency level, page size, ...) can be | |
| 551 | + configured globally. | |
| 552 | +- [new] New Cassandra 2.0 SERIAL and LOCAL_SERIAL consistency levels are | |
| 553 | + supported. | |
| 554 | +- [new] Cluster#shutdown now waits for ongoing queries to complete by default | |
| 555 | + (JAVA-116). | |
| 556 | +- [new] Generic authentication through SASL is now exposed. | |
| 557 | +- [bug] TokenAwarePolicy now takes all replica into account, instead of only the | |
| 558 | + first one (JAVA-88). | |
| 559 | + | |
| 560 | + | |
| 561 | +### 1.0.5 | |
| 562 | + | |
| 563 | +- [new] OSGi bundle (JAVA-142) | |
| 564 | +- [new] Add support for ConsistencyLevel.LOCAL_ONE; note that this | |
| 565 | + require Cassandra 1.2.12+ (JAVA-207) | |
| 566 | +- [improvement] Make collections returned by Row immutable (JAVA-205) | |
| 567 | +- [improvement] Limit internal thread pool size (JAVA-203) | |
| 568 | +- [improvement] New getter to obtain a snapshot of the scores maintained by | |
| 569 | + LatencyAwarePolicy. | |
| 570 | +- [improvement] Avoid synchronization when getting codec for collection | |
| 571 | + types (JAVA-222) | |
| 572 | +- [bug] Don't retain unused PreparedStatement in memory (JAVA-201, JAVA-213) | |
| 573 | +- [bug] Add missing clustering order info in TableMetadata | |
| 574 | +- [bug] Allow bind markers for collections in the query builder (JAVA-196) | |
| 575 | + | |
| 576 | + | |
| 577 | +### 1.0.4 | |
| 578 | + | |
| 579 | +- [api] The Cluster.Builder#poolingOptions and Cluster.Builder#socketOptions | |
| 580 | + are now deprecated. They are replaced by the new withPoolingOptions and | |
| 581 | + withSocketOptions methods (JAVA-163). | |
| 582 | +- [new] A new LatencyAwarePolicy wrapping policy has been added, allowing to | |
| 583 | + add latency awareness to a wrapped load balancing policy (JAVA-129). | |
| 584 | +- [new] Allow defering cluster initialization (Cluster.Builder#deferInitialization) | |
| 585 | + (JAVA-161) | |
| 586 | +- [new] Add truncate statement in query builder (JAVA-117). | |
| 587 | +- [new] Support empty IN in the query builder (JAVA-106). | |
| 588 | +- [bug] Fix spurious "No current pool set; this should not happen" error | |
| 589 | + message (JAVA-166) | |
| 590 | +- [bug] Fix potential overflow in RoundRobinPolicy and correctly errors if | |
| 591 | + a balancing policy throws (JAVA-184) | |
| 592 | +- [bug] Don't release Stream ID for timeouted queries (unless we do get back | |
| 593 | + the response) | |
| 594 | +- [bug] Correctly escape identifiers and use fully qualified table names when | |
| 595 | + exporting schema as string. | |
| 596 | + | |
| 597 | + | |
| 598 | +### 1.0.3 | |
| 599 | + | |
| 600 | +- [api] The query builder now correctly throw an exception when given a value | |
| 601 | + of a type it doesn't know about. | |
| 602 | +- [new] SocketOptions#setReadTimeout allows to set a timeout on how long we | |
| 603 | + wait for the answer of one node. See the javadoc for more details. | |
| 604 | +- [new] New Session#prepare method that takes a Statement. | |
| 605 | +- [bug] Always take per-query CL, tracing, etc. into account for QueryBuilder | |
| 606 | + statements (JAVA-143). | |
| 607 | +- [bug] Temporary fixup for TimestampType when talking to C* 2.0 nodes. | |
| 608 | + | |
| 609 | + | |
| 610 | +### 1.0.2 | |
| 611 | + | |
| 612 | +- [api] Host#getMonitor and all Host.HealthMonitor methods have been | |
| 613 | + deprecated. The new Host#isUp method is now prefered to the method | |
| 614 | + in the monitor and you should now register Host.StateListener against | |
| 615 | + the Cluster object directly (registering against a host HealthMonitor | |
| 616 | + was much more limited anyway). | |
| 617 | +- [new] New serialize/deserialize methods in DataType to serialize/deserialize | |
| 618 | + values to/from bytes (JAVA-92). | |
| 619 | +- [new] New getIndexOf() method in ColumnDefinitions to find the index of | |
| 620 | + a given column name (JAVA-128). | |
| 621 | +- [bug] Fix a bug when thread could get blocked while setting the current | |
| 622 | + keyspace (JAVA-131). | |
| 623 | +- [bug] Quote inet addresses in the query builder since CQL3 requires it | |
| 624 | + (JAVA-136) | |
| 625 | + | |
| 626 | + | |
| 627 | +### 1.0.1 | |
| 628 | + | |
| 629 | +- [api] Function call handling in the query builder has been modified in a | |
| 630 | + backward incompatible way. Function calls are not parsed from string values | |
| 631 | + anymore as this wasn't safe. Instead the new 'fcall' method should be used | |
| 632 | + (JAVA-100). | |
| 633 | +- [api] Some typos in method names in PoolingOptions have been fixed in a | |
| 634 | + backward incompatible way before the API get widespread. | |
| 635 | +- [bug] Don't destroy composite partition key with BoundStatement and | |
| 636 | + TokenAwarePolicy (JAVA-123). | |
| 637 | +- [new] null values support in the query builder. | |
| 638 | +- [new] SSL support (requires C* >= 1.2.1) (JAVA-5). | |
| 639 | +- [new] Allow generating unlogged batch in the query builder (JAVA-113). | |
| 640 | +- [improvement] Better error message when no host are available. | |
| 641 | +- [improvement] Improves performance of the stress example application been. | |
| 642 | + | |
| 643 | + | |
| 644 | +### 1.0.0 | |
| 645 | + | |
| 646 | +- [api] The AuthInfoProvider has be (temporarily) removed. Instead, the | |
| 647 | + Cluster builder has a new withCredentials() method to provide a username | |
| 648 | + and password for use with Cassandra's PasswordAuthenticator. Custom | |
| 649 | + authenticator will be re-introduced in a future version but are not | |
| 650 | + supported at the moment. | |
| 651 | +- [api] The isMetricsEnabled() method in Configuration has been replaced by | |
| 652 | + getMetricsOptions(). An option to disabled JMX reporting (on by default) | |
| 653 | + has been added. | |
| 654 | +- [bug] Don't make default load balancing policy a static singleton since it | |
| 655 | + is stateful (JAVA-91). | |
| 656 | + | |
| 657 | + | |
| 658 | +### 1.0.0-RC1 | |
| 659 | + | |
| 660 | +- [new] Null values are now supported in BoundStatement (but you will need at | |
| 661 | + least Cassandra 1.2.3 for it to work). The API of BoundStatement has been | |
| 662 | + slightly changed so that not binding a variable is not an error anymore, | |
| 663 | + the variable is simply considered null by default. The isReady() method has | |
| 664 | + been removed (JAVA-79). | |
| 665 | +- [improvement] The Cluster/Session shutdown methods now properly block until | |
| 666 | + the shutdown is complete. A version with at timeout has been added (JAVA-75). | |
| 667 | +- [bug] Fix use of CQL3 functions in the query builder (JAVA-44). | |
| 668 | +- [bug] Fix case where multiple schema changes too quickly wouldn't work | |
| 669 | + (only triggered when 0.0.0.0 was use for the rpc_address on the Cassandra | |
| 670 | + nodes) (JAVA-77). | |
| 671 | +- [bug] Fix IllegalStateException thrown due to a reconnection made on an I/O | |
| 672 | + thread (JAVA-72). | |
| 673 | +- [bug] Correctly reports errors during authentication phase (JAVA-82). | |
| 674 | + | |
| 675 | + | |
| 676 | +### 1.0.0-beta2 | |
| 677 | + | |
| 678 | +- [new] Support blob constants, BigInteger, BigDecimal and counter batches in | |
| 679 | + the query builder (JAVA-51, JAVA-60, JAVA-58) | |
| 680 | +- [new] Basic support for custom CQL3 types (JAVA-61) | |
| 681 | +- [new] Add "execution infos" for a result set (this also move the query | |
| 682 | + trace in the new ExecutionInfos object, so users of beta1 will have to | |
| 683 | + update) (JAVA-65) | |
| 684 | +- [bug] Fix failover bug in DCAwareRoundRobinPolicy (JAVA-62) | |
| 685 | +- [bug] Fix use of bind markers for routing keys in the query builder | |
| 686 | + (JAVA-66) | |
| 687 | + | |
| 688 | + | |
| 689 | +### 1.0.0-beta1 | |
| 690 | + | |
| 691 | +- initial release |
modified docs.yaml +24 −9
| @@ -9,6 +9,21 @@ | ||
| 9 | 9 | sources: |
| 10 | 10 | - type: markdown |
| 11 | 11 | files: 'features/**/*.md' |
| 12 | + - title: Changelog | |
| 13 | + prefix: /changelog | |
| 14 | + sources: | |
| 15 | + - type: markdown | |
| 16 | + files: 'changelog/**/*.md' | |
| 17 | + - title: Upgrading | |
| 18 | + prefix: /upgrade_guide | |
| 19 | + sources: | |
| 20 | + - type: markdown | |
| 21 | + files: 'upgrade_guide/**/*.md' | |
| 22 | + - title: FAQ | |
| 23 | + prefix: /faq | |
| 24 | + sources: | |
| 25 | + - type: markdown | |
| 26 | + files: 'faq/**/*.md' | |
| 12 | 27 | links: |
| 13 | 28 | - title: Code |
| 14 | 29 | href: https://github.com/datastax/java-driver/ |
| @@ -23,12 +38,12 @@ | ||
| 23 | 38 | - title: Releases |
| 24 | 39 | href: https://github.com/datastax/java-driver/releases |
| 25 | 40 | |
| 26 | -versions: | |
| 27 | - - name: 2.1.6 | |
| 28 | - ref: '2.1.6' | |
| 29 | - - name: 2.1.5 | |
| 30 | - ref: '2.1.5' | |
| 31 | - - name: 2.0.10.1 | |
| 32 | - ref: '12f8840' | |
| 33 | - - name: 2.0.10 | |
| 34 | - ref: '3a602f1' | |
| 41 | +#versions: | |
| 42 | +# - name: 2.1.6 | |
| 43 | +# ref: '2.1.6' | |
| 44 | +# - name: 2.1.5 | |
| 45 | +# ref: '2.1.5' | |
| 46 | +# - name: 2.0.10.1 | |
| 47 | +# ref: '12f8840' | |
| 48 | +# - name: 2.0.10 | |
| 49 | +# ref: '3a602f1' |
deleted driver-core/CHANGELOG.rst +0 −721
| @@ -1,721 +0,0 @@ | ||
| 1 | -CHANGELOG | |
| 2 | -========= | |
| 3 | - | |
| 4 | -2.1.7: | |
| 5 | ------- | |
| 6 | - | |
| 7 | -- [improvement] Unify "Target" enum for schema elements (JAVA-782) | |
| 8 | - | |
| 9 | - | |
| 10 | -2.1.6: | |
| 11 | ------- | |
| 12 | - | |
| 13 | -Merged from 2.0 branch: | |
| 14 | - | |
| 15 | -- [new feature] Add getObject to BoundStatement and Row (JAVA-584) | |
| 16 | -- [improvement] Improve connection pool resizing algorithm (JAVA-419) | |
| 17 | -- [bug] Fix race condition between pool expansion and shutdown (JAVA-599) | |
| 18 | -- [improvement] Upgrade Netty to 4.0.27 (JAVA-622) | |
| 19 | -- [improvement] Coalesce frames before flushing them to the connection | |
| 20 | - (JAVA-562) | |
| 21 | -- [improvement] Rename threads to indicate that they are for the driver | |
| 22 | - (JAVA-583) | |
| 23 | -- [new feature] Expose paging state (JAVA-550) | |
| 24 | -- [new feature] Slow Query Logger (JAVA-646) | |
| 25 | -- [improvement] Exclude some errors from measurements in LatencyAwarePolicy | |
| 26 | - (JAVA-698) | |
| 27 | -- [bug] Fix issue when executing a PreparedStatement from another cluster | |
| 28 | - (JAVA-641) | |
| 29 | -- [improvement] Log keyspace xxx does not exist at WARN level (JAVA-534) | |
| 30 | -- [improvement] Allow Cluster subclasses to delegate to another instance | |
| 31 | - (JAVA-619) | |
| 32 | -- [new feature] Expose an API to check for schema agreement after a | |
| 33 | - schema-altering statement (JAVA-669) | |
| 34 | -- [improvement] Make connection and pool creation fully async (JAVA-692) | |
| 35 | -- [improvement] Optimize connection use after reconnection (JAVA-505) | |
| 36 | -- [improvement] Remove "suspected" mechanism (JAVA-617) | |
| 37 | -- [improvement] Don't mark connection defunct on client timeout (reverts | |
| 38 | - JAVA-425) | |
| 39 | -- [new feature] Speculative query executions (JAVA-561) | |
| 40 | -- [bug] Release connection before completing the ResultSetFuture (JAVA-666) | |
| 41 | -- [new feature BETA] Percentile-based variant of query logger and speculative | |
| 42 | - executions (JAVA-723) | |
| 43 | -- [bug] Fix buffer leaks when compression is enabled (JAVA-734). | |
| 44 | -- [improvement] Use Netty's pooled ByteBufAllocator by default (JAVA-756) | |
| 45 | -- [improvement] Expose "unsafe" paging state API (JAVA-759) | |
| 46 | -- [bug] Prevent race during pool initialization (JAVA-768) | |
| 47 | - | |
| 48 | - | |
| 49 | -2.1.5: | |
| 50 | ------- | |
| 51 | - | |
| 52 | -- [bug] Authorize Null parameter in Accessor method (JAVA-575) | |
| 53 | -- [improvement] Support C* 2.1.3's nested collections (JAVA-570) | |
| 54 | -- [bug] Fix checks on mapped collection types (JAVA-612) | |
| 55 | -- [bug] Fix QueryBuilder.putAll() when the collection contains UDTs (JAVA-672) | |
| 56 | - | |
| 57 | -Merged from 2.0 branch: | |
| 58 | - | |
| 59 | -- [new feature] Add AddressTranslater for EC2 multi-region deployment (JAVA-518) | |
| 60 | -- [improvement] Add connection heartbeat (JAVA-533) | |
| 61 | -- [improvement] Reduce level of logs on missing rpc_address (JAVA-568) | |
| 62 | -- [improvement] Expose node token and range information (JAVA-312, JAVA-681) | |
| 63 | -- [bug] Fix cluster name mismatch check at startup (JAVA-595) | |
| 64 | -- [bug] Fix guava dependency when using OSGI (JAVA-620) | |
| 65 | -- [bug] Fix handling of DROP events when ks name is case-sensitive (JAVA-678) | |
| 66 | -- [improvement] Use List<?> instead of List<Object> in QueryBuilder API | |
| 67 | - (JAVA-631) | |
| 68 | -- [improvement] Exclude Netty POM from META-INF in shaded JAR (JAVA-654) | |
| 69 | -- [bug] Quote single quotes contained in table comments in asCQLQuery method | |
| 70 | - (JAVA-655) | |
| 71 | -- [bug] Empty TokenRange returned in a one token cluster (JAVA-684) | |
| 72 | -- [improvement] Expose TokenRange#contains (JAVA-687) | |
| 73 | -- [bug] Prevent race between cancellation and query completion (JAVA-614) | |
| 74 | -- [bug] Prevent cancel and timeout from cancelling unrelated ResponseHandler if | |
| 75 | - streamId was already released and reused (JAVA-632). | |
| 76 | -- [bug] Fix issue when newly opened pool fails before we could mark the node UP | |
| 77 | - (JAVA-642) | |
| 78 | -- [bug] Fix unwanted LBP notifications when a contact host is down (JAVA-613) | |
| 79 | -- [bug] Fix edge cases where a connection was released twice (JAVA-651). | |
| 80 | -- [bug] Fix edge cases in query cancellation (JAVA-653). | |
| 81 | - | |
| 82 | - | |
| 83 | -2.1.4: | |
| 84 | ------- | |
| 85 | - | |
| 86 | -Merged from 2.0 branch: | |
| 87 | - | |
| 88 | -- [improvement] Shade Netty dependency (JAVA-538) | |
| 89 | -- [improvement] Target schema refreshes more precisely (JAVA-543) | |
| 90 | -- [bug] Don't check rpc_address for control host (JAVA-546) | |
| 91 | -- [improvement] Improve message of NoHostAvailableException (JAVA-409) | |
| 92 | -- [bug] Rework connection reaper to avoid deadlock (JAVA-556) | |
| 93 | -- [bug] Avoid deadlock when multiple connections to the same host get write | |
| 94 | - errors (JAVA-557) | |
| 95 | -- [improvement] Make shuffle=true the default for TokenAwarePolicy (JAVA-504) | |
| 96 | -- [bug] Fix bug when SUSPECT reconnection succeeds, but one of the pooled | |
| 97 | - connections fails while bringing the node back up (JAVA-577) | |
| 98 | -- [bug] Prevent faulty control connection from ignoring reconnecting hosts | |
| 99 | - (JAVA-587) | |
| 100 | -- temporarily revert "Add idle timeout to the connection pool" (JAVA-419) | |
| 101 | -- [bug] Ensure updateCreatedPools does not add pools for suspected hosts | |
| 102 | - (JAVA-593) | |
| 103 | -- [bug] Ensure state change notifications for a given host are handled serially | |
| 104 | - (JAVA-594) | |
| 105 | -- [bug] Ensure control connection reconnects when control host is removed | |
| 106 | - (JAVA-597) | |
| 107 | - | |
| 108 | - | |
| 109 | -2.1.3: | |
| 110 | ------- | |
| 111 | - | |
| 112 | -- [bug] Ignore static fields in mapper (JAVA-510) | |
| 113 | -- [bug] Fix UDT parsing at init when using the default protocol version (JAVA-509) | |
| 114 | -- [bug] Fix toString, equals and hashCode on accessor proxies (JAVA-495) | |
| 115 | -- [bug] Allow empty name on Column and Field annotations (JAVA-528) | |
| 116 | - | |
| 117 | -Merged from 2.0 branch: | |
| 118 | - | |
| 119 | -- [bug] Ensure control connection does not trigger concurrent reconnects (JAVA-497) | |
| 120 | -- [improvement] Keep trying to reconnect on authentication errors (JAVA-472) | |
| 121 | -- [improvement] Expose close method on load balancing policy (JAVA-463) | |
| 122 | -- [improvement] Allow load balancing policy to trigger refresh for a single host (JAVA-459) | |
| 123 | -- [bug] Expose an API to cancel reconnection attempts (JAVA-493) | |
| 124 | -- [bug] Fix NPE when a connection fails during pool construction (JAVA-503) | |
| 125 | -- [improvement] Log datacenter name in DCAware policy's init when it is explicitly provided | |
| 126 | - (JAVA-423) | |
| 127 | -- [improvement] Shuffle the replicas in TokenAwarePolicy.newQueryPlan (JAVA-504) | |
| 128 | -- [improvement] Make schema agreement wait tuneable (JAVA-507) | |
| 129 | -- [improvement] Document how to inject the driver metrics into another registry (JAVA-494) | |
| 130 | -- [improvement] Add idle timeout to the connection pool (JAVA-419) | |
| 131 | -- [bug] LatencyAwarePolicy does not shutdown executor on invocation of close (JAVA-516) | |
| 132 | -- [improvement] Throw an exception when DCAwareRoundRobinPolicy is built with | |
| 133 | - an explicit but null or empty local datacenter (JAVA-451). | |
| 134 | -- [bug] Fix check for local contact points in DCAware policy's init (JAVA-511) | |
| 135 | -- [improvement] Make timeout on saturated pool customizable (JAVA-457) | |
| 136 | -- [improvement] Downgrade Guava to 14.0.1 (JAVA-521) | |
| 137 | -- [bug] Fix token awareness for case-sensitive keyspaces and tables (JAVA-526) | |
| 138 | -- [bug] Check maximum number of values passed to SimpleStatement (JAVA-515) | |
| 139 | -- [improvement] Expose the driver version through the API (JAVA-532) | |
| 140 | -- [improvement] Optimize session initialization when some hosts are not | |
| 141 | - responsive (JAVA-522) | |
| 142 | - | |
| 143 | - | |
| 144 | -2.1.2: | |
| 145 | ------- | |
| 146 | - | |
| 147 | -- [improvement] Support for native protocol v3 (JAVA-361, JAVA-364, JAVA-467) | |
| 148 | -- [bug] Fix UDT fields of type inet in QueryBuilder (JAVA-454) | |
| 149 | -- [bug] Exclude transient fields from Frozen checks (JAVA-455) | |
| 150 | -- [bug] Fix handling of null collections in mapper (JAVA-453) | |
| 151 | -- [improvement] Make implicit column names case-insensitive in mapper (JAVA-452) | |
| 152 | -- [bug] Fix named bind markers in QueryBuilder (JAVA-433) | |
| 153 | -- [bug] Fix handling of BigInteger in object mapper (JAVA-458) | |
| 154 | -- [bug] Ignore synthetic fields in mapper (JAVA-465) | |
| 155 | -- [improvement] Throw an exception when DCAwareRoundRobinPolicy is built with | |
| 156 | - an explicit but null or empty local datacenter (JAVA-451) | |
| 157 | -- [improvement] Add backwards-compatible DataType.serialize methods (JAVA-469) | |
| 158 | -- [bug] Handle null enum fields in object mapper (JAVA-487) | |
| 159 | -- [bug] Handle null UDT fields in object mapper (JAVA-499) | |
| 160 | - | |
| 161 | -Merged from 2.0 branch: | |
| 162 | - | |
| 163 | -- [bug] Handle null pool in PooledConnection.release (JAVA-449) | |
| 164 | -- [improvement] Defunct connection on request timeout (JAVA-425) | |
| 165 | -- [improvement] Try next host when we get a SERVER_ERROR (JAVA-426) | |
| 166 | -- [bug] Handle race between query timeout and completion (JAVA-449, JAVA-460, JAVA-471) | |
| 167 | -- [bug] Fix DCAwareRoundRobinPolicy datacenter auto-discovery (JAVA-496) | |
| 168 | - | |
| 169 | - | |
| 170 | -2.1.1: | |
| 171 | ------- | |
| 172 | - | |
| 173 | -- [new] Support for new "frozen" keyword (JAVA-441) | |
| 174 | - | |
| 175 | -Merged from 2.0 branch: | |
| 176 | - | |
| 177 | -- [bug] Check cluster name when connecting to a new node (JAVA-397) | |
| 178 | -- [bug] Add missing CAS delete support in QueryBuilder (JAVA-326) | |
| 179 | -- [bug] Add collection and data length checks during serialization (JAVA-363) | |
| 180 | -- [improvement] Surface number of retries in metrics (JAVA-329) | |
| 181 | -- [bug] Do not use a host when no rpc_address found for it (JAVA-428) | |
| 182 | -- [improvement] Add ResultSet.wasApplied() for conditional queries (JAVA-358) | |
| 183 | -- [bug] Fix negative HostConnectionPool open count (JAVA-349) | |
| 184 | -- [improvement] Log more connection details at trace and debug levels (JAVA-436) | |
| 185 | -- [bug] Fix cluster shutdown (JAVA-445) | |
| 186 | - | |
| 187 | - | |
| 188 | -2.1.0: | |
| 189 | ------- | |
| 190 | - | |
| 191 | -- [bug] ClusteringColumn annotation not working with specified ordering (JAVA-408) | |
| 192 | -- [improvement] Fail BoundStatement if null values are not set explicitly (JAVA-410) | |
| 193 | -- [bug] Handle UDT and tuples in BuiltStatement.toString (JAVA-416) | |
| 194 | - | |
| 195 | -Merged from 2.0 branch: | |
| 196 | - | |
| 197 | -- [bug] Release connections on ResultSetFuture#cancel (JAVA-407) | |
| 198 | -- [bug] Fix handling of SimpleStatement with values in query builder | |
| 199 | - batches (JAVA-393) | |
| 200 | -- [bug] Ensure pool is properly closed in onDown (JAVA-417) | |
| 201 | -- [bug] Fix tokenMap initialization at startup (JAVA-415) | |
| 202 | -- [bug] Avoid deadlock on close (JAVA-418) | |
| 203 | - | |
| 204 | - | |
| 205 | -2.1.0-rc1: | |
| 206 | ----------- | |
| 207 | - | |
| 208 | -Merged from 2.0 branch: | |
| 209 | - | |
| 210 | -- [bug] Ensure defunct connections are completely closed (JAVA-394) | |
| 211 | -- [bug] Fix memory and resource leak on closed Sessions (JAVA-342, JAVA-390) | |
| 212 | - | |
| 213 | - | |
| 214 | -2.1.0-beta1: | |
| 215 | ------------- | |
| 216 | - | |
| 217 | -- [new] Support for User Defined Types and tuples | |
| 218 | -- [new] Simple object mapper | |
| 219 | - | |
| 220 | -Merged from 2.0 branch: everything up to 2.0.3 (included), and the following. | |
| 221 | - | |
| 222 | -- [improvement] Better handling of dead connections (JAVA-204) | |
| 223 | -- [bug] Fix potential NPE in ControlConnection (JAVA-373) | |
| 224 | -- [bug] Throws NPE when passed null for a contact point (JAVA-291) | |
| 225 | -- [bug] Avoid LoadBalancingPolicy onDown+onUp at startup (JAVA-315) | |
| 226 | -- [bug] Avoid classloader leak in Tomcat (JAVA-343) | |
| 227 | -- [bug] Avoid deadlock in onAdd/onUp (JAVA-387) | |
| 228 | -- [bug] Make metadata parsing more lenient (JAVA-377, JAVA-391) | |
| 229 | - | |
| 230 | - | |
| 231 | -2.0.10: | |
| 232 | -------- | |
| 233 | - | |
| 234 | -- [new feature] Add AddressTranslater for EC2 multi-region deployment (JAVA-518) | |
| 235 | -- [improvement] Add connection heartbeat (JAVA-533) | |
| 236 | -- [improvement] Reduce level of logs on missing rpc_address (JAVA-568) | |
| 237 | -- [improvement] Expose node token and range information (JAVA-312, JAVA-681) | |
| 238 | -- [bug] Fix cluster name mismatch check at startup (JAVA-595) | |
| 239 | -- [bug] Fix guava dependency when using OSGI (JAVA-620) | |
| 240 | -- [bug] Fix handling of DROP events when ks name is case-sensitive (JAVA-678) | |
| 241 | -- [improvement] Use List<?> instead of List<Object> in QueryBuilder API | |
| 242 | - (JAVA-631) | |
| 243 | -- [improvement] Exclude Netty POM from META-INF in shaded JAR (JAVA-654) | |
| 244 | -- [bug] Quote single quotes contained in table comments in asCQLQuery method | |
| 245 | - (JAVA-655) | |
| 246 | -- [bug] Empty TokenRange returned in a one token cluster (JAVA-684) | |
| 247 | -- [improvement] Expose TokenRange#contains (JAVA-687) | |
| 248 | -- [new feature] Expose values of BoundStatement (JAVA-547) | |
| 249 | -- [new feature] Add getObject to BoundStatement and Row (JAVA-584) | |
| 250 | -- [improvement] Improve connection pool resizing algorithm (JAVA-419) | |
| 251 | -- [bug] Fix race condition between pool expansion and shutdown (JAVA-599) | |
| 252 | -- [improvement] Upgrade Netty to 4.0.27 (JAVA-622) | |
| 253 | -- [improvement] Coalesce frames before flushing them to the connection | |
| 254 | - (JAVA-562) | |
| 255 | -- [improvement] Rename threads to indicate that they are for the driver | |
| 256 | - (JAVA-583) | |
| 257 | -- [new feature] Expose paging state (JAVA-550) | |
| 258 | -- [new feature] Slow Query Logger (JAVA-646) | |
| 259 | -- [improvement] Exclude some errors from measurements in LatencyAwarePolicy | |
| 260 | - (JAVA-698) | |
| 261 | -- [bug] Fix issue when executing a PreparedStatement from another cluster | |
| 262 | - (JAVA-641) | |
| 263 | -- [improvement] Log keyspace xxx does not exist at WARN level (JAVA-534) | |
| 264 | -- [improvement] Allow Cluster subclasses to delegate to another instance | |
| 265 | - (JAVA-619) | |
| 266 | -- [new feature] Expose an API to check for schema agreement after a | |
| 267 | - schema-altering statement (JAVA-669) | |
| 268 | -- [improvement] Make connection and pool creation fully async (JAVA-692) | |
| 269 | -- [improvement] Optimize connection use after reconnection (JAVA-505) | |
| 270 | -- [improvement] Remove "suspected" mechanism (JAVA-617) | |
| 271 | -- [improvement] Don't mark connection defunct on client timeout (reverts | |
| 272 | - JAVA-425) | |
| 273 | -- [new feature] Speculative query executions (JAVA-561) | |
| 274 | -- [bug] Release connection before completing the ResultSetFuture (JAVA-666) | |
| 275 | -- [new feature BETA] Percentile-based variant of query logger and speculative | |
| 276 | - executions (JAVA-723) | |
| 277 | -- [bug] Fix buffer leaks when compression is enabled (JAVA-734). | |
| 278 | - | |
| 279 | -Merged from 2.0.9_fixes branch: | |
| 280 | - | |
| 281 | -- [bug] Prevent race between cancellation and query completion (JAVA-614) | |
| 282 | -- [bug] Prevent cancel and timeout from cancelling unrelated ResponseHandler if | |
| 283 | - streamId was already released and reused (JAVA-632). | |
| 284 | -- [bug] Fix issue when newly opened pool fails before we could mark the node UP | |
| 285 | - (JAVA-642) | |
| 286 | -- [bug] Fix unwanted LBP notifications when a contact host is down (JAVA-613) | |
| 287 | -- [bug] Fix edge cases where a connection was released twice (JAVA-651). | |
| 288 | -- [bug] Fix edge cases in query cancellation (JAVA-653). | |
| 289 | - | |
| 290 | - | |
| 291 | -2.0.9.2: | |
| 292 | --------- | |
| 293 | - | |
| 294 | -- [bug] Fix edge cases where a connection was released twice (JAVA-651). | |
| 295 | -- [bug] Fix edge cases in query cancellation (JAVA-653). | |
| 296 | - | |
| 297 | - | |
| 298 | -2.0.9.1: | |
| 299 | --------- | |
| 300 | - | |
| 301 | -- [bug] Prevent race between cancellation and query completion (JAVA-614) | |
| 302 | -- [bug] Prevent cancel and timeout from cancelling unrelated ResponseHandler if | |
| 303 | - streamId was already released and reused (JAVA-632). | |
| 304 | -- [bug] Fix issue when newly opened pool fails before we could mark the node UP | |
| 305 | - (JAVA-642) | |
| 306 | -- [bug] Fix unwanted LBP notifications when a contact host is down (JAVA-613) | |
| 307 | - | |
| 308 | - | |
| 309 | -2.0.9: | |
| 310 | ------- | |
| 311 | - | |
| 312 | -- [improvement] Shade Netty dependency (JAVA-538) | |
| 313 | -- [improvement] Target schema refreshes more precisely (JAVA-543) | |
| 314 | -- [bug] Don't check rpc_address for control host (JAVA-546) | |
| 315 | -- [improvement] Improve message of NoHostAvailableException (JAVA-409) | |
| 316 | -- [bug] Rework connection reaper to avoid deadlock (JAVA-556) | |
| 317 | -- [bug] Avoid deadlock when multiple connections to the same host get write | |
| 318 | - errors (JAVA-557) | |
| 319 | -- [improvement] Make shuffle=true the default for TokenAwarePolicy (JAVA-504) | |
| 320 | -- [bug] Fix bug when SUSPECT reconnection succeeds, but one of the pooled | |
| 321 | - connections fails while bringing the node back up (JAVA-577) | |
| 322 | -- [bug] Prevent faulty control connection from ignoring reconnecting hosts | |
| 323 | - (JAVA-587) | |
| 324 | -- temporarily revert "Add idle timeout to the connection pool" (JAVA-419) | |
| 325 | -- [bug] Ensure updateCreatedPools does not add pools for suspected hosts | |
| 326 | - (JAVA-593) | |
| 327 | -- [bug] Ensure state change notifications for a given host are handled serially | |
| 328 | - (JAVA-594) | |
| 329 | -- [bug] Ensure control connection reconnects when control host is removed | |
| 330 | - (JAVA-597) | |
| 331 | - | |
| 332 | - | |
| 333 | -2.0.8: | |
| 334 | ------- | |
| 335 | - | |
| 336 | -- [bug] Fix token awareness for case-sensitive keyspaces and tables (JAVA-526) | |
| 337 | -- [bug] Check maximum number of values passed to SimpleStatement (JAVA-515) | |
| 338 | -- [improvement] Expose the driver version through the API (JAVA-532) | |
| 339 | -- [improvement] Optimize session initialization when some hosts are not | |
| 340 | - responsive (JAVA-522) | |
| 341 | - | |
| 342 | - | |
| 343 | -2.0.7: | |
| 344 | ------- | |
| 345 | - | |
| 346 | -- [bug] Handle null pool in PooledConnection.release (JAVA-449) | |
| 347 | -- [improvement] Defunct connection on request timeout (JAVA-425) | |
| 348 | -- [improvement] Try next host when we get a SERVER_ERROR (JAVA-426) | |
| 349 | -- [bug] Handle race between query timeout and completion (JAVA-449, JAVA-460, JAVA-471) | |
| 350 | -- [bug] Fix DCAwareRoundRobinPolicy datacenter auto-discovery (JAVA-496) | |
| 351 | -- [bug] Ensure control connection does not trigger concurrent reconnects (JAVA-497) | |
| 352 | -- [improvement] Keep trying to reconnect on authentication errors (JAVA-472) | |
| 353 | -- [improvement] Expose close method on load balancing policy (JAVA-463) | |
| 354 | -- [improvement] Allow load balancing policy to trigger refresh for a single host (JAVA-459) | |
| 355 | -- [bug] Expose an API to cancel reconnection attempts (JAVA-493) | |
| 356 | -- [bug] Fix NPE when a connection fails during pool construction (JAVA-503) | |
| 357 | -- [improvement] Log datacenter name in DCAware policy's init when it is explicitly provided | |
| 358 | - (JAVA-423) | |
| 359 | -- [improvement] Shuffle the replicas in TokenAwarePolicy.newQueryPlan (JAVA-504) | |
| 360 | -- [improvement] Make schema agreement wait tuneable (JAVA-507) | |
| 361 | -- [improvement] Document how to inject the driver metrics into another registry (JAVA-494) | |
| 362 | -- [improvement] Add idle timeout to the connection pool (JAVA-419) | |
| 363 | -- [bug] LatencyAwarePolicy does not shutdown executor on invocation of close (JAVA-516) | |
| 364 | -- [improvement] Throw an exception when DCAwareRoundRobinPolicy is built with | |
| 365 | - an explicit but null or empty local datacenter (JAVA-451). | |
| 366 | -- [bug] Fix check for local contact points in DCAware policy's init (JAVA-511) | |
| 367 | -- [improvement] Make timeout on saturated pool customizable (JAVA-457) | |
| 368 | -- [improvement] Downgrade Guava to 14.0.1 (JAVA-521) | |
| 369 | - | |
| 370 | - | |
| 371 | -2.0.6: | |
| 372 | ------- | |
| 373 | - | |
| 374 | -- [bug] Check cluster name when connecting to a new node (JAVA-397) | |
| 375 | -- [bug] Add missing CAS delete support in QueryBuilder (JAVA-326) | |
| 376 | -- [bug] Add collection and data length checks during serialization (JAVA-363) | |
| 377 | -- [improvement] Surface number of retries in metrics (JAVA-329) | |
| 378 | -- [bug] Do not use a host when no rpc_address found for it (JAVA-428) | |
| 379 | -- [improvement] Add ResultSet.wasApplied() for conditional queries (JAVA-358) | |
| 380 | -- [bug] Fix negative HostConnectionPool open count (JAVA-349) | |
| 381 | -- [improvement] Log more connection details at trace and debug levels (JAVA-436) | |
| 382 | -- [bug] Fix cluster shutdown (JAVA-445) | |
| 383 | -- [improvement] Expose child policy in chainable load balancing policies (JAVA-439) | |
| 384 | - | |
| 385 | - | |
| 386 | -2.0.5: | |
| 387 | ------- | |
| 388 | - | |
| 389 | -- [bug] Release connections on ResultSetFuture#cancel (JAVA-407) | |
| 390 | -- [bug] Fix handling of SimpleStatement with values in query builder | |
| 391 | - batches (JAVA-393) | |
| 392 | -- [bug] Ensure pool is properly closed in onDown (JAVA-417) | |
| 393 | -- [bug] Fix tokenMap initialization at startup (JAVA-415) | |
| 394 | -- [bug] Avoid deadlock on close (JAVA-418) | |
| 395 | - | |
| 396 | - | |
| 397 | -2.0.4: | |
| 398 | ------- | |
| 399 | - | |
| 400 | -- [improvement] Better handling of dead connections (JAVA-204) | |
| 401 | -- [bug] Fix potential NPE in ControlConnection (JAVA-373) | |
| 402 | -- [bug] Throws NPE when passed null for a contact point (JAVA-291) | |
| 403 | -- [bug] Avoid LoadBalancingPolicy onDown+onUp at startup (JAVA-315) | |
| 404 | -- [bug] Avoid classloader leak in Tomcat (JAVA-343) | |
| 405 | -- [bug] Avoid deadlock in onAdd/onUp (JAVA-387) | |
| 406 | -- [bug] Make metadata parsing more lenient (JAVA-377, JAVA-391) | |
| 407 | -- [bug] Ensure defunct connections are completely closed (JAVA-394) | |
| 408 | -- [bug] Fix memory and resource leak on closed Sessions (JAVA-342, JAVA-390) | |
| 409 | - | |
| 410 | - | |
| 411 | -2.0.3: | |
| 412 | ------- | |
| 413 | - | |
| 414 | -- [new] The new AbsractSession makes mocking of Session easier. | |
| 415 | -- [new] Allow to trigger a refresh of connected hosts (JAVA-309) | |
| 416 | -- [new] New Session#getState method allows to grab information on | |
| 417 | - which nodes a session is connected to (JAVA-265) | |
| 418 | -- [new] Add QueryBuilder syntax for tuples in where clauses (syntax | |
| 419 | - introduced in Cassandra 2.0.6) (JAVA-327) | |
| 420 | -- [improvement] Properly validate arguments of PoolingOptions methods | |
| 421 | - (JAVA-359) | |
| 422 | -- [bug] Fix bogus rejection of BigInteger in 'execute with values' | |
| 423 | - (JAVA-368) | |
| 424 | -- [bug] Signal connection failure sooner to avoid missing them | |
| 425 | - (JAVA-367) | |
| 426 | -- [bug] Throw UnsupportedOperationException for protocol batch | |
| 427 | - setSerialCL (JAVA-337) | |
| 428 | - | |
| 429 | -Merged from 1.0 branch: | |
| 430 | - | |
| 431 | -- [bug] Fix periodic reconnection to down hosts (JAVA-325) | |
| 432 | - | |
| 433 | - | |
| 434 | -2.0.2: | |
| 435 | ------- | |
| 436 | - | |
| 437 | -- [api] The type of the map key returned by NoHostAvailable#getErrors has changed from | |
| 438 | - InetAddress to InetSocketAddress. Same for Initializer#getContactPoints return and | |
| 439 | - for AuthProvider#newAuthenticator. | |
| 440 | -- [api] The default load balacing policy is now DCAwareRoundRobinPolicy, and the local | |
| 441 | - datacenter is automatically picked based on the first connected node. Furthermore, | |
| 442 | - the TokenAwarePolicy is also used by default (JAVA-296) | |
| 443 | -- [new] New optional AddressTranslater (JAVA-145) | |
| 444 | -- [bug] Don't remove quotes on keyspace in the query builder (JAVA-321) | |
| 445 | -- [bug] Fix potential NPE while cluster undergo schema changes (JAVA-320) | |
| 446 | -- [bug] Fix thread-safety of page fetching (JAVA-319) | |
| 447 | -- [bug] Fix potential NPE using fetchMoreResults (JAVA-318) | |
| 448 | - | |
| 449 | -Merged from 1.0 branch: | |
| 450 | - | |
| 451 | -- [new] Expose the name of the partitioner in use in the cluster metadata (JAVA-179) | |
| 452 | -- [new] Add new WhiteListPolicy to limit the nodes connected to a particular list | |
| 453 | -- [improvement] Do not hop DC for LOCAL_* CL in DCAwareRoundRobinPolicy (JAVA-289) | |
| 454 | -- [bug] Revert back to longs for dates in the query builder (JAVA-313) | |
| 455 | -- [bug] Don't reconnect to nodes ignored by the load balancing policy (JAVA-314) | |
| 456 | - | |
| 457 | - | |
| 458 | -2.0.1: | |
| 459 | ------- | |
| 460 | - | |
| 461 | -- [improvement] Handle the static columns introduced in Cassandra 2.0.6 (JAVA-278) | |
| 462 | -- [improvement] Add Cluster#newSession method to create Session without connecting | |
| 463 | - right away (JAVA-208) | |
| 464 | -- [bug] Add missing iso8601 patterns for parsing dates (JAVA-279) | |
| 465 | -- [bug] Properly parse BytesType as the blob type | |
| 466 | -- [bug] Potential NPE when parsing schema of pre-CQL tables of C* 1.2 nodes (JAVA-280) | |
| 467 | - | |
| 468 | -Merged from 1.0 branch: | |
| 469 | - | |
| 470 | -- [bug] LatencyAwarePolicy.Builder#withScale doesn't set the scale (JAVA-275) | |
| 471 | -- [new] Add methods to check if a Cluster/Session instance has been closed already (JAVA-114) | |
| 472 | - | |
| 473 | - | |
| 474 | -2.0.0: | |
| 475 | ------- | |
| 476 | - | |
| 477 | -- [api] Case sensitive identifier by default in Metadata (JAVA-269) | |
| 478 | -- [bug] Fix potential NPE in Cluster#connect (JAVA-274) | |
| 479 | - | |
| 480 | -Merged from 1.0 branch: | |
| 481 | - | |
| 482 | -- [bug] Always return the PreparedStatement object that is cache internally (JAVA-263) | |
| 483 | -- [bug] Fix race when multiple connect are done in parallel (JAVA-261) | |
| 484 | -- [bug] Don't connect at all to nodes that are ignored by the load balancing | |
| 485 | - policy (JAVA-270) | |
| 486 | - | |
| 487 | - | |
| 488 | -2.0.0-rc3: | |
| 489 | ----------- | |
| 490 | - | |
| 491 | -- [improvement] The protocol version 1 is now supported (features only supported by the | |
| 492 | - version 2 of the protocol throw UnsupportedFeatureException). | |
| 493 | -- [improvement] Make most main objects interface to facilitate testing/mocking (JAVA-195) | |
| 494 | -- [improvement] Adds new getStatements and clear methods to BatchStatement. | |
| 495 | -- [api] Renamed shutdown to closeAsync and ShutdownFuture to CloseFuture. Clustering | |
| 496 | - and Session also now implement Closeable (JAVA-247). | |
| 497 | -- [bug] Fix potential thread leaks when shutting down Metrics (JAVA-232) | |
| 498 | -- [bug] Fix potential NPE in HostConnectionPool (JAVA-231) | |
| 499 | -- [bug] Avoid NPE when node is in an unconfigured DC (JAVA-244) | |
| 500 | -- [bug] Don't block for scheduled reconnections on Cluster#close (JAVA-258) | |
| 501 | - | |
| 502 | -Merged from 1.0 branch: | |
| 503 | - | |
| 504 | -- [new] Added Session#prepareAsync calls (JAVA-224) | |
| 505 | -- [new] Added Cluster#getLoggedKeyspace (JAVA-249) | |
| 506 | -- [improvement] Avoid preparing a statement multiple time per host with multiple sessions | |
| 507 | -- [bug] Make sure connections are returned to the right pools (JAVA-255) | |
| 508 | -- [bug] Use date string in query build to work-around CASSANDRA-6718 (JAVA-264) | |
| 509 | - | |
| 510 | - | |
| 511 | -2.0.0-rc2: | |
| 512 | ----------- | |
| 513 | - | |
| 514 | -- [new] Add LOCAL_ONE consistency level support (requires using C* 2.0.2+) (JAVA-207) | |
| 515 | -- [bug] Fix parsing of counter types (JAVA-219) | |
| 516 | -- [bug] Fix missing whitespace for IN clause in the query builder (JAVA-218) | |
| 517 | -- [bug] Fix replicas computation for token aware balancing (JAVA-221) | |
| 518 | - | |
| 519 | -Merged from 1.0 branch: | |
| 520 | - | |
| 521 | -- [bug] Fix regression from JAVA-201 (JAVA-213) | |
| 522 | -- [improvement] New getter to obtain a snapshot of the scores maintained by | |
| 523 | - LatencyAwarePolicy. | |
| 524 | - | |
| 525 | - | |
| 526 | -2.0.0-rc1: | |
| 527 | ----------- | |
| 528 | - | |
| 529 | -- [new] Mark compression dependencies optional in maven (JAVA-199). | |
| 530 | -- [api] Renamed TableMetadata#getClusteringKey to TableMetadata#getClusteringColumns. | |
| 531 | - | |
| 532 | -Merged from 1.0 branch: | |
| 533 | - | |
| 534 | -- [new] OSGi bundle (JAVA-142) | |
| 535 | -- [improvement] Make collections returned by Row immutable (JAVA-205) | |
| 536 | -- [improvement] Limit internal thread pool size (JAVA-203) | |
| 537 | -- [bug] Don't retain unused PreparedStatement in memory (JAVA-201) | |
| 538 | -- [bug] Add missing clustering order info in TableMetadata | |
| 539 | -- [bug] Allow bind markers for collections in the query builder (JAVA-196) | |
| 540 | - | |
| 541 | - | |
| 542 | -2.0.0-beta2: | |
| 543 | ------------- | |
| 544 | - | |
| 545 | -- [api] BoundStatement#setX(String, X) methods now set all values (if there is | |
| 546 | - more than one) having the provided name, not just the first occurence. | |
| 547 | -- [api] The Authenticator interface now has a onAuthenticationSuccess method that | |
| 548 | - allows to handle the potential last token sent by the server. | |
| 549 | -- [new] The query builder don't serialize large values to strings anymore by | |
| 550 | - default by making use the new ability to send values alongside the query string. | |
| 551 | -- [new] The query builder has been updated for new CQL features (JAVA-140). | |
| 552 | -- [bug] Fix exception when a conditional write timeout C* side. | |
| 553 | -- [bug] Ensure connection is created when Cluster metadata are asked for | |
| 554 | - (JAVA-182). | |
| 555 | -- [bug] Fix potential NPE during authentication (JAVA-187) | |
| 556 | - | |
| 557 | - | |
| 558 | -2.0.0-beta1: | |
| 559 | ------------ | |
| 560 | - | |
| 561 | -- [api] The 2.0 version is an API-breaking upgrade of the driver. While most | |
| 562 | - of the breaking changes are minor, there are too numerous to be listed here | |
| 563 | - and you are encouraged to look at the Upgrade_guide_to_2.0 file that describe | |
| 564 | - those changes in details. | |
| 565 | -- [new] LZ4 compression is supported for the protocol. | |
| 566 | -- [new] The driver does not depend on cassandra-all anymore (JAVA-39) | |
| 567 | -- [new] New BatchStatement class allows to execute batch other statements. | |
| 568 | -- [new] Large ResultSet are now paged (incrementally fetched) by default. | |
| 569 | -- [new] SimpleStatement support values for bind-variables, to allow | |
| 570 | - prepare+execute behavior with one roundtrip. | |
| 571 | -- [new] Query parameters defaults (Consistency level, page size, ...) can be | |
| 572 | - configured globally. | |
| 573 | -- [new] New Cassandra 2.0 SERIAL and LOCAL_SERIAL consistency levels are | |
| 574 | - supported. | |
| 575 | -- [new] Cluster#shutdown now waits for ongoing queries to complete by default | |
| 576 | - (JAVA-116). | |
| 577 | -- [new] Generic authentication through SASL is now exposed. | |
| 578 | -- [bug] TokenAwarePolicy now takes all replica into account, instead of only the | |
| 579 | - first one (JAVA-88). | |
| 580 | - | |
| 581 | - | |
| 582 | -1.0.5: | |
| 583 | ------- | |
| 584 | - | |
| 585 | -- [new] OSGi bundle (JAVA-142) | |
| 586 | -- [new] Add support for ConsistencyLevel.LOCAL_ONE; note that this | |
| 587 | - require Cassandra 1.2.12+ (JAVA-207) | |
| 588 | -- [improvement] Make collections returned by Row immutable (JAVA-205) | |
| 589 | -- [improvement] Limit internal thread pool size (JAVA-203) | |
| 590 | -- [improvement] New getter to obtain a snapshot of the scores maintained by | |
| 591 | - LatencyAwarePolicy. | |
| 592 | -- [improvement] Avoid synchronization when getting codec for collection | |
| 593 | - types (JAVA-222) | |
| 594 | -- [bug] Don't retain unused PreparedStatement in memory (JAVA-201, JAVA-213) | |
| 595 | -- [bug] Add missing clustering order info in TableMetadata | |
| 596 | -- [bug] Allow bind markers for collections in the query builder (JAVA-196) | |
| 597 | - | |
| 598 | - | |
| 599 | -1.0.4: | |
| 600 | ------- | |
| 601 | - | |
| 602 | -- [api] The Cluster.Builder#poolingOptions and Cluster.Builder#socketOptions | |
| 603 | - are now deprecated. They are replaced by the new withPoolingOptions and | |
| 604 | - withSocketOptions methods (JAVA-163). | |
| 605 | -- [new] A new LatencyAwarePolicy wrapping policy has been added, allowing to | |
| 606 | - add latency awareness to a wrapped load balancing policy (JAVA-129). | |
| 607 | -- [new] Allow defering cluster initialization (Cluster.Builder#deferInitialization) | |
| 608 | - (JAVA-161) | |
| 609 | -- [new] Add truncate statement in query builder (JAVA-117). | |
| 610 | -- [new] Support empty IN in the query builder (JAVA-106). | |
| 611 | -- [bug] Fix spurious "No current pool set; this should not happen" error | |
| 612 | - message (JAVA-166) | |
| 613 | -- [bug] Fix potential overflow in RoundRobinPolicy and correctly errors if | |
| 614 | - a balancing policy throws (JAVA-184) | |
| 615 | -- [bug] Don't release Stream ID for timeouted queries (unless we do get back | |
| 616 | - the response) | |
| 617 | -- [bug] Correctly escape identifiers and use fully qualified table names when | |
| 618 | - exporting schema as string. | |
| 619 | - | |
| 620 | - | |
| 621 | -1.0.3: | |
| 622 | ------- | |
| 623 | - | |
| 624 | -- [api] The query builder now correctly throw an exception when given a value | |
| 625 | - of a type it doesn't know about. | |
| 626 | -- [new] SocketOptions#setReadTimeout allows to set a timeout on how long we | |
| 627 | - wait for the answer of one node. See the javadoc for more details. | |
| 628 | -- [new] New Session#prepare method that takes a Statement. | |
| 629 | -- [bug] Always take per-query CL, tracing, etc. into account for QueryBuilder | |
| 630 | - statements (JAVA-143). | |
| 631 | -- [bug] Temporary fixup for TimestampType when talking to C* 2.0 nodes. | |
| 632 | - | |
| 633 | - | |
| 634 | -1.0.2: | |
| 635 | ------- | |
| 636 | - | |
| 637 | -- [api] Host#getMonitor and all Host.HealthMonitor methods have been | |
| 638 | - deprecated. The new Host#isUp method is now prefered to the method | |
| 639 | - in the monitor and you should now register Host.StateListener against | |
| 640 | - the Cluster object directly (registering against a host HealthMonitor | |
| 641 | - was much more limited anyway). | |
| 642 | -- [new] New serialize/deserialize methods in DataType to serialize/deserialize | |
| 643 | - values to/from bytes (JAVA-92). | |
| 644 | -- [new] New getIndexOf() method in ColumnDefinitions to find the index of | |
| 645 | - a given column name (JAVA-128). | |
| 646 | -- [bug] Fix a bug when thread could get blocked while setting the current | |
| 647 | - keyspace (JAVA-131). | |
| 648 | -- [bug] Quote inet addresses in the query builder since CQL3 requires it | |
| 649 | - (JAVA-136) | |
| 650 | - | |
| 651 | - | |
| 652 | -1.0.1: | |
| 653 | ------- | |
| 654 | - | |
| 655 | -- [api] Function call handling in the query builder has been modified in a | |
| 656 | - backward incompatible way. Function calls are not parsed from string values | |
| 657 | - anymore as this wasn't safe. Instead the new 'fcall' method should be used | |
| 658 | - (JAVA-100). | |
| 659 | -- [api] Some typos in method names in PoolingOptions have been fixed in a | |
| 660 | - backward incompatible way before the API get widespread. | |
| 661 | -- [bug] Don't destroy composite partition key with BoundStatement and | |
| 662 | - TokenAwarePolicy (JAVA-123). | |
| 663 | -- [new] null values support in the query builder. | |
| 664 | -- [new] SSL support (requires C* >= 1.2.1) (JAVA-5). | |
| 665 | -- [new] Allow generating unlogged batch in the query builder (JAVA-113). | |
| 666 | -- [improvement] Better error message when no host are available. | |
| 667 | -- [improvement] Improves performance of the stress example application been. | |
| 668 | - | |
| 669 | - | |
| 670 | -1.0.0: | |
| 671 | ------- | |
| 672 | - | |
| 673 | -- [api] The AuthInfoProvider has be (temporarily) removed. Instead, the | |
| 674 | - Cluster builder has a new withCredentials() method to provide a username | |
| 675 | - and password for use with Cassandra's PasswordAuthenticator. Custom | |
| 676 | - authenticator will be re-introduced in a future version but are not | |
| 677 | - supported at the moment. | |
| 678 | -- [api] The isMetricsEnabled() method in Configuration has been replaced by | |
| 679 | - getMetricsOptions(). An option to disabled JMX reporting (on by default) | |
| 680 | - has been added. | |
| 681 | -- [bug] Don't make default load balancing policy a static singleton since it | |
| 682 | - is stateful (JAVA-91). | |
| 683 | - | |
| 684 | - | |
| 685 | -1.0.0-RC1: | |
| 686 | ----------- | |
| 687 | - | |
| 688 | -- [new] Null values are now supported in BoundStatement (but you will need at | |
| 689 | - least Cassandra 1.2.3 for it to work). The API of BoundStatement has been | |
| 690 | - slightly changed so that not binding a variable is not an error anymore, | |
| 691 | - the variable is simply considered null by default. The isReady() method has | |
| 692 | - been removed (JAVA-79). | |
| 693 | -- [improvement] The Cluster/Session shutdown methods now properly block until | |
| 694 | - the shutdown is complete. A version with at timeout has been added (JAVA-75). | |
| 695 | -- [bug] Fix use of CQL3 functions in the query builder (JAVA-44). | |
| 696 | -- [bug] Fix case where multiple schema changes too quickly wouldn't work | |
| 697 | - (only triggered when 0.0.0.0 was use for the rpc_address on the Cassandra | |
| 698 | - nodes) (JAVA-77). | |
| 699 | -- [bug] Fix IllegalStateException thrown due to a reconnection made on an I/O | |
| 700 | - thread (JAVA-72). | |
| 701 | -- [bug] Correctly reports errors during authentication phase (JAVA-82). | |
| 702 | - | |
| 703 | - | |
| 704 | -1.0.0-beta2: | |
| 705 | ------------- | |
| 706 | - | |
| 707 | -- [new] Support blob constants, BigInteger, BigDecimal and counter batches in | |
| 708 | - the query builder (JAVA-51, JAVA-60, JAVA-58) | |
| 709 | -- [new] Basic support for custom CQL3 types (JAVA-61) | |
| 710 | -- [new] Add "execution infos" for a result set (this also move the query | |
| 711 | - trace in the new ExecutionInfos object, so users of beta1 will have to | |
| 712 | - update) (JAVA-65) | |
| 713 | -- [bug] Fix failover bug in DCAwareRoundRobinPolicy (JAVA-62) | |
| 714 | -- [bug] Fix use of bind markers for routing keys in the query builder | |
| 715 | - (JAVA-66) | |
| 716 | - | |
| 717 | - | |
| 718 | -1.0.0-beta1: | |
| 719 | ------------- | |
| 720 | - | |
| 721 | -- initial release |
deleted driver-core/README.rst +0 −100
| @@ -1,100 +0,0 @@ | ||
| 1 | -Driver Core | |
| 2 | -=========== | |
| 3 | - | |
| 4 | -This is the core module of the DataStax Java Driver for Apache Cassandra (C*), | |
| 5 | -which offers a simple (as in, not abstracted) but complete API to work with | |
| 6 | -CQL3. The main goal of the module is to handle all the functionality related | |
| 7 | -to managing connections to a Cassandra cluster (but leaving higher level | |
| 8 | -abstraction like object mapping to separate modules). | |
| 9 | - | |
| 10 | - | |
| 11 | -Features | |
| 12 | --------- | |
| 13 | - | |
| 14 | -The features provided by the core module includes: | |
| 15 | - - Asynchronous: the driver uses the new CQL binary protocol asynchronous | |
| 16 | - capabilities. Only a relatively low number of connections per nodes needs to | |
| 17 | - be maintained open to achieve good performance. | |
| 18 | - - Nodes discovery: the driver automatically discovers and uses all nodes of the | |
| 19 | - C* cluster, including newly bootstrapped ones. | |
| 20 | - - Configurable load balancing: the driver allows for custom routing and load | |
| 21 | - balancing of queries to C* nodes. Out of the box, round robin is provided | |
| 22 | - with optional data-center awareness (only nodes from the local data-center | |
| 23 | - are queried (and have connections maintained to)) and optional token | |
| 24 | - awareness (that is, the ability to prefer a replica for the query as coordinator). | |
| 25 | - - Transparent fail-over: if C* nodes fail or become unreachable, the driver | |
| 26 | - automatically and transparently tries other nodes and schedules | |
| 27 | - reconnection to the dead nodes in the background. | |
| 28 | - - C* trace handling: tracing can be set on a per-query basis and the driver | |
| 29 | - provides a convenient API to retrieve the trace. | |
| 30 | - - Convenient schema access: the driver exposes a C* schema in a usable way. | |
| 31 | - - Configurable retry policy: a retry policy can be set to define a precise | |
| 32 | - behavior to adopt on query execution exceptions (for example, timeouts, | |
| 33 | - unavailability). This avoids polluting client code with retry-related code. | |
| 34 | - | |
| 35 | - | |
| 36 | -Prerequisite | |
| 37 | ------------- | |
| 38 | - | |
| 39 | -The driver uses Casandra's native protocol which is available starting from | |
| 40 | -Cassandra 1.2. Some of the features (result set paging, BatchStatement, ...) of | |
| 41 | -this version 2.0 of the driver require Cassandra 2.0 however and will throw | |
| 42 | -'unsupported feature' exceptions if used against a Cassandra 1.2 cluster. | |
| 43 | - | |
| 44 | -If you are having issues connecting to the cluster (seeing ``NoHostAvailableConnection`` | |
| 45 | -exceptions) please check the `connection requirements <https://github.com/datastax/java-driver/wiki/Connection-requirements>`_. | |
| 46 | - | |
| 47 | -If you want to run the unit tests provided with this driver, you will also need | |
| 48 | -to have ccm installed (http://github.com/pcmanus/ccm) as the tests use it. Also | |
| 49 | -note that the first time you run the tests, ccm will download/compile the | |
| 50 | -source of C* under the hood, which may require some time (that depends on your | |
| 51 | -Internet connection or machine). | |
| 52 | - | |
| 53 | - | |
| 54 | -Installing | |
| 55 | ----------- | |
| 56 | - | |
| 57 | -The last release of the driver is available on Maven Central. You can install | |
| 58 | -it in your application using the following Maven dependency:: | |
| 59 | - | |
| 60 | - <dependency> | |
| 61 | - <groupId>com.datastax.cassandra</groupId> | |
| 62 | - <artifactId>cassandra-driver-core</artifactId> | |
| 63 | - <version>2.1.6</version> | |
| 64 | - </dependency> | |
| 65 | - | |
| 66 | - | |
| 67 | -Upgrading from 1.x branch | |
| 68 | -------------------------- | |
| 69 | - | |
| 70 | -If you are upgrading from the 1.x branch of the driver, be sure to have a look at | |
| 71 | -the `upgrade guide <https://github.com/datastax/java-driver/blob/2.0/driver-core/Upgrade_guide_to_2.0.rst>`_. | |
| 72 | - | |
| 73 | -We used the opportunity of a major version bump to incorporate your feedback and improve the API, | |
| 74 | -to fix a number of inconsistencies and remove cruft. | |
| 75 | -Unfortunately this means there are some breaking changes, but the new API should be both simpler and more complete. | |
| 76 | - | |
| 77 | - | |
| 78 | -Getting Started | |
| 79 | ---------------- | |
| 80 | - | |
| 81 | -Suppose you have a Cassandra cluster running on 3 nodes whose hostnames are: | |
| 82 | -cass1, cass2 and cass3. A simple example using this core driver could be:: | |
| 83 | - | |
| 84 | - Cluster cluster = Cluster.builder() | |
| 85 | - .addContactPoints("cass1", "cass2") | |
| 86 | - .build(); | |
| 87 | - Session session = cluster.connect("db1"); | |
| 88 | - | |
| 89 | - for (Row row : session.execute("SELECT * FROM table1")) | |
| 90 | - // do something ... | |
| 91 | - | |
| 92 | -Please note that when we build the Cluster object, we only provide the address | |
| 93 | -to 2 Cassandra hosts. We could have provided only one host or the 3 of them, | |
| 94 | -this doesn't matter as long as the driver is able to contact one of the host | |
| 95 | -provided as "contact points". Even if only one host was provided, the driver | |
| 96 | -would use this host to discover the other ones and use the whole cluster | |
| 97 | -automatically. This is also true for new nodes joining the cluster. | |
| 98 | - | |
| 99 | -For now, please refer to the API reference (http://docs.datastax.com/en/drivers/java/2.0). | |
| 100 | -More informations and documentation will come later. |
deleted driver-core/Upgrade_guide_to_2.0.rst +0 −224
| @@ -1,224 +0,0 @@ | ||
| 1 | -Upgrade Guide to 2.0 | |
| 2 | -==================== | |
| 3 | - | |
| 4 | -The purpose of this guide is to detail the changes made by version 2.0 of | |
| 5 | -the Java Driver. | |
| 6 | - | |
| 7 | - | |
| 8 | -1.0 to 2.0 | |
| 9 | ----------- | |
| 10 | - | |
| 11 | -We used the opportunity of a major version bump to incorporate your feedback | |
| 12 | -and improve the API, to fix a number of inconsistencies and remove cruft. | |
| 13 | -Unfortunately this means there are some breaking changes, but the new API should | |
| 14 | -be both simpler and more complete. | |
| 15 | - | |
| 16 | -The following describes the changes for 2.0 that are breaking changes of the | |
| 17 | -1.0 API. For ease of use, we distinguish two categories of API changes: the "main" | |
| 18 | -ones and the "other" ones. | |
| 19 | - | |
| 20 | -The "main" API changes are the ones that are either | |
| 21 | -likely to affect most upgraded apps or are incompatible changes that, even if minor, | |
| 22 | -will not be detected at compile time. Upgraders are highly encouraged to check | |
| 23 | -this list of "main" changes while upgrading their application to 2.0 (even | |
| 24 | -though most applications are likely to be affected by only a handful of | |
| 25 | -changes). | |
| 26 | - | |
| 27 | -The "other" list is, well, other changes: those that are likely to | |
| 28 | -affect a minor number of applications and will be detected by compile time | |
| 29 | -errors anyway. It is ok to skip those initially and only come back to them if | |
| 30 | -you have trouble compiling your application after an upgrade. | |
| 31 | - | |
| 32 | -Main API changes | |
| 33 | -~~~~~~~~~~~~~~~~ | |
| 34 | - | |
| 35 | -1. The ``Query`` class has been renamed into ``Statement`` (it was confusing to some | |
| 36 | - that the ``BoundStatement`` was not a ``Statement``). | |
| 37 | - | |
| 38 | - To allow this, the old ``Statement`` class has been renamed to ``RegularStatement``. | |
| 39 | - | |
| 40 | -2. The ``Cluster`` and ``Session`` shutdown API has changed. There is now a ``closeAsync`` | |
| 41 | - that is asynchronous but returns a ``Future`` on the completion of the shutdown | |
| 42 | - process. | |
| 43 | - | |
| 44 | - There is also a ``close`` shortcut that does the same but blocks. | |
| 45 | - Also, ``close`` now waits for ongoing queries to complete by default (but you | |
| 46 | - can force the closing of all connections if you want to). | |
| 47 | - | |
| 48 | -3. ``NoHostAvailableException#getErrors`` now returns the full exception objects for | |
| 49 | - each node instead of just a message. In other words, it returns a | |
| 50 | - ``Map<InetAddress, Throwable>`` instead of a ``Map<InetAddress, String>``. | |
| 51 | - | |
| 52 | -4. ``Statement#getConsistencyLevel`` (previously ``Query#getConsistencyLevel``, see | |
| 53 | - first point) will now return ``null`` by default (instead of ``CL.ONE``), with the | |
| 54 | - meaning of "use the default consistency level". | |
| 55 | - | |
| 56 | - The default consistency level can now be configured through the new ``QueryOptions`` | |
| 57 | - object in the cluster ``Configuration``. | |
| 58 | - | |
| 59 | -5. The ``Metrics`` class now uses the Codahale metrics library version 3 (version 2 was | |
| 60 | - used previously). This new major version of the library has many API changes | |
| 61 | - compared to its version 2 (see http://metrics.codahale.com/about/release-notes/ for details), | |
| 62 | - which can thus impact consumers of the Metrics class. | |
| 63 | - Furthermore, the default JmxReporter now includes a name specific to the | |
| 64 | - cluster instance (to avoid conflicts when multiple Cluster instances are created | |
| 65 | - in the same JVM). As a result, tools that were polling JMX info will | |
| 66 | - have to be updated accordingly. | |
| 67 | - | |
| 68 | -6. The ``QueryBuilder#in`` method now has the following special case: using | |
| 69 | - ``QueryBuilder.in(QueryBuilder.bindMarker())`` will generate the string ``IN ?``, | |
| 70 | - not ``IN (?)`` as was the case in 1.0. The reasoning being that the former | |
| 71 | - syntax, made valid by https://issues.apache.org/jira/browse/CASSANDRA-4210 | |
| 72 | - is a lot more useful than "IN (?)", as the latter can more simply use an | |
| 73 | - equality. | |
| 74 | - | |
| 75 | - Note that if you really want to output "IN (?)" with the query | |
| 76 | - builder, you can use QueryBuilder.in(QueryBuilder.raw("?")). | |
| 77 | - | |
| 78 | -7. When binding values by name in ``BoundStatement`` (i.e. using the | |
| 79 | - ``setX(String, X)`` methods), if more than one variable have the same name, | |
| 80 | - then all values corresponding to that variable | |
| 81 | - name are set instead of just the first occurrence. | |
| 82 | - | |
| 83 | -8. The ``QueryBuilder#raw`` method does not automatically add quotes anymore, but | |
| 84 | - rather output its result without any change (as the raw name implies). | |
| 85 | - | |
| 86 | - This means for instance that ``eq("x", raw(foo))`` will output ``x = foo``, | |
| 87 | - not ``x = 'foo'`` (you don't need the raw method to output the latter string). | |
| 88 | - | |
| 89 | - | |
| 90 | -9. The ``QueryBuilder`` will now sometime use the new ability to send value as | |
| 91 | - bytes instead of serializing everything to string. In general the QueryBuilder | |
| 92 | - will do the right thing, but if you were calling the ``getQueryString()`` method | |
| 93 | - on a Statement created with a QueryBuilder (for other reasons than to prepare a query) | |
| 94 | - then the returned string may contain bind markers in place of some of the values | |
| 95 | - provided (and in that case, ``getValues()`` will contain the values corresponding | |
| 96 | - to those markers). If need be, it is possible to force the old behavior by | |
| 97 | - using the new ``setForceNoValues()`` method. | |
| 98 | - | |
| 99 | - | |
| 100 | -Other API Changes | |
| 101 | -~~~~~~~~~~~~~~~~~ | |
| 102 | - | |
| 103 | -1. Creating a Cluster instance (through Cluster#buildFrom or the | |
| 104 | - Cluster.Builder#build method) **does not create any connection right away | |
| 105 | - anymore** (and thus cannot throw a NoHostAvailableException or an | |
| 106 | - AuthenticationException). Instead, the initial contact points are checked | |
| 107 | - the first time a call to ``Cluster#connect`` is done. If for some reason you | |
| 108 | - want to emulate the previous behavior, you can use the new method | |
| 109 | - Cluster#init: Cluster.builder().build() in 1.0 is equivalent to | |
| 110 | - Cluster.builder().build().init() in 2.0. | |
| 111 | - | |
| 112 | -2. Methods from Metadata, KeyspaceMetadata and TableMetadata now use by default | |
| 113 | - case insensitive identifiers (for keyspace, table and column names in | |
| 114 | - parameter). You can double-quote an identifier if you want it to be a | |
| 115 | - case sensitive one (as you would do in CQL) and there is a Metadata.quote | |
| 116 | - helper method for that. | |
| 117 | - | |
| 118 | -3. The TableMetadata#getClusteringKey method has been renamed | |
| 119 | - TableMetadata#getClusteringColumns to match the "official" vocabulary. | |
| 120 | - | |
| 121 | -4. The UnavailableException#getConsistency method has been renamed to | |
| 122 | - UnavailableException#getConsistencyLevel for consistency with the method of | |
| 123 | - QueryTimeoutException. | |
| 124 | - | |
| 125 | -5. The RegularStatement class (ex-Statement class, see above) must now | |
| 126 | - implement two additional methods: RegularStatement#getKeyspace and | |
| 127 | - RegularStatement#getValues. If you had extended this class, you will have to | |
| 128 | - implement those new methods, but both can return null if they are not useful | |
| 129 | - in your case. | |
| 130 | - | |
| 131 | -6. The Cluster.Initializer interface should now implement 2 new methods: | |
| 132 | - Cluster.Initializer#getInitialListeners (which can return an empty | |
| 133 | - collection) and Cluster.Initializer#getClusterName (which can return null). | |
| 134 | - | |
| 135 | -7. The Metadata#getReplicas method now takes 2 arguments. On top of the | |
| 136 | - partition key, you must now provide the keyspace too. The previous behavior | |
| 137 | - was buggy: it's impossible to properly return the full list of replica for a | |
| 138 | - partition key without knowing the keyspace since replication may depend on | |
| 139 | - the keyspace). | |
| 140 | - | |
| 141 | -8. The method LoadBalancingPolicy#newQueryPlan() method now takes the currently | |
| 142 | - logged keyspace as 2nd argument. This information is necessary to do proper | |
| 143 | - token aware balancing (see preceding point). | |
| 144 | - | |
| 145 | -9. The ResultSetFuture#set and ResultSetFuture#setException methods have been | |
| 146 | - removed (from the public API at least). They were never meant to be exposed | |
| 147 | - publicly: a resultSetFuture is always set by the driver itself and should | |
| 148 | - not be set manually. | |
| 149 | - | |
| 150 | -10. The deprecated since 1.0.2 Host.HealthMonitor class has been removed. You | |
| 151 | - will now need to use Host#isUp and Cluster#register if you were using that | |
| 152 | - class. | |
| 153 | - | |
| 154 | - | |
| 155 | -2.0.10 | |
| 156 | ------- | |
| 157 | - | |
| 158 | -1. LatencyTracker#update now has a different signature and takes two new | |
| 159 | - parameters: the statement that has been executed (never null), and the exception | |
| 160 | - thrown while executing the query (or null, if the query executed successfully). | |
| 161 | - Existing implementations of this interface, once upgraded to the new method | |
| 162 | - signature, should continue to work as before. | |
| 163 | - | |
| 164 | -2. SocketOptions#getTcpNoDelay() is now TRUE by default (it was previously undefined). | |
| 165 | - This reflects the new behavior of Netty (which was upgraded from version 3.9.0 to | |
| 166 | - 4.0.27): TCP_NODELAY is now turned on by default, instead of depending on the OS | |
| 167 | - default like in previous versions. | |
| 168 | - | |
| 169 | -3. Netty is not shaded anymore in the default Maven artifact. However we publish a | |
| 170 | - shaded artifact under a different classifier. See `Using the shaded JAR<http://datastax.github.io/java-driver/features/shaded_jar/>`_ | |
| 171 | - for more information. | |
| 172 | - | |
| 173 | -4. The internal initialization sequence of the Cluster object has been slightly changed: | |
| 174 | - some fields that were previously initialized in the constructor are now set when | |
| 175 | - the init() method is called. This is unlikely to affect regular driver users. | |
| 176 | - | |
| 177 | - | |
| 178 | -Features available only with Cassandra 2.0 | |
| 179 | ------------------------------------------- | |
| 180 | - | |
| 181 | -This section details the biggest additions to 2.0 API wise. It is not an | |
| 182 | -exhaustive list of new features in 2.0. | |
| 183 | - | |
| 184 | -1. The new ``BatchStatement`` class allows to group any type of insert Statements | |
| 185 | - (BoundStatement or RegularStatement) for execution as a batch. For instance, | |
| 186 | - you can do something like:: | |
| 187 | - | |
| 188 | - List<String> values = ...; | |
| 189 | - PreparedStatement ps = session.prepare("INSERT INTO myTable(value) VALUES (?)"); | |
| 190 | - BatchStatement bs = new BatchStatement(); | |
| 191 | - for (String value : values) | |
| 192 | - bs.add(ps.bind(value)); | |
| 193 | - session.execute(bs); | |
| 194 | - | |
| 195 | -2. ``SimpleStatement`` can now take a list of values in addition to the query. This | |
| 196 | - allows to do the equivalent of a prepare+execute but with only one round-trip | |
| 197 | - to the server and without keeping the prepared statement after the | |
| 198 | - execution. | |
| 199 | - | |
| 200 | - This is typically useful if a given query should be executed only | |
| 201 | - once (i.e. you don't want to prepare it) but you also don't want to | |
| 202 | - serialize all values into strings. Shortcut Session#execute() and | |
| 203 | - Session#executeAsync() methods are also provided so you that you can do:: | |
| 204 | - | |
| 205 | - String imgName = ...; | |
| 206 | - ByteBuffer imgBytes = ...; | |
| 207 | - session.execute("INSERT INTO images(name, bytes) VALUES (?, ?)", imgName, imgBytes); | |
| 208 | - | |
| 209 | -3. SELECT queries are now "paged" under the hood. In other words, if a query | |
| 210 | - yields a very large result, only the beginning of the ResultSet will be fetch | |
| 211 | - initially, the rest being fetch "on-demand". In practice, this means that:: | |
| 212 | - | |
| 213 | - for (Row r : session.execute("SELECT * FROM mytable")) | |
| 214 | - ... process r ... | |
| 215 | - | |
| 216 | - should not timeout or OOM the server anymore even if "mytable" contains a lot | |
| 217 | - of data. In general paging should be transparent for the application (as in | |
| 218 | - the example above), but the implementation provides a number of knobs to | |
| 219 | - fine tune the behavior of that paging: | |
| 220 | - | |
| 221 | - * the size of each "page" can be set per-query (Statement#setFetchSize()) | |
| 222 | - * the ResultSet object provides 2 methods to check the state of paging | |
| 223 | - (ResultSet#getAvailableWithoutFetching and ResultSet#isFullyFetched) | |
| 224 | - as well as a mean to force the pre-fetching of the next page (ResultSet#fetchMoreResults). |
deleted driver-core/Upgrade_guide_to_2.1.rst +0 −114
| @@ -1,114 +0,0 @@ | ||
| 1 | -Upgrade Guide to 2.1 | |
| 2 | -==================== | |
| 3 | - | |
| 4 | -The purpose of this guide is to detail the changes made by version 2.1 of | |
| 5 | -the Java Driver. | |
| 6 | - | |
| 7 | -2.1.0 | |
| 8 | ------ | |
| 9 | - | |
| 10 | -User API Changes | |
| 11 | -~~~~~~~~~~~~~~~~ | |
| 12 | - | |
| 13 | -1. The ``getCaching`` method of ``TableMetadata#Options`` now returns a | |
| 14 | - ``Map`` to account for changes to Cassandra 2.1. Also, the | |
| 15 | - ``getIndexInterval`` method now returns an ``Integer`` instead of an ``int`` | |
| 16 | - which will be ``null`` when connected to Cassandra 2.1 nodes. | |
| 17 | - | |
| 18 | -2. ``BoundStatement`` variables that have not been set explicitly will no | |
| 19 | - longer default to ``null``. Instead, all variables must be bound explicitly, | |
| 20 | - otherwise the execution of the statement will fail (this also applies to | |
| 21 | - statements inside of a ``BatchStatement``). For variables that map to a | |
| 22 | - primitive Java type, a new ``setToNull`` method has been added. | |
| 23 | - We made this change because the driver might soon distinguish between unset | |
| 24 | - and null variables, so we don't want clients relying on the "leave unset to | |
| 25 | - set to ``null``" behavior. | |
| 26 | - | |
| 27 | - | |
| 28 | -Internal API Changes | |
| 29 | -~~~~~~~~~~~~~~~~~~~~ | |
| 30 | - | |
| 31 | -The changes listed in this section should normally not impact end users of the | |
| 32 | -driver, but rather third-party frameworks and tools. | |
| 33 | - | |
| 34 | -1. The ``serialize`` and ``deserialize`` methods in ``DataType`` now take an | |
| 35 | - additional parameter: the protocol version. As explained in the javadoc, | |
| 36 | - if unsure, the proper value to use for this parameter is the protocol version | |
| 37 | - in use by the driver, i.e. the value returned by | |
| 38 | - ``cluster.getConfiguration().getProtocolOptions().getProtocolVersion()``. | |
| 39 | - | |
| 40 | -2. The ``parse`` method in ``DataType`` now returns a Java object, not a | |
| 41 | - ``ByteBuffer``. The previous behavior can be obtained by calling the | |
| 42 | - ``serialize`` method on the returned object. | |
| 43 | - | |
| 44 | -3. The ``getValues`` method of ``RegularStatement`` now takes the protocol | |
| 45 | - version as a parameter. As above, the proper value if unsure is almost surely | |
| 46 | - the protocol version in use | |
| 47 | - (``cluster.getConfiguration().getProtocolOptions().getProtocolVersion()``). | |
| 48 | - | |
| 49 | - | |
| 50 | -2.1.1 | |
| 51 | ------ | |
| 52 | - | |
| 53 | -Internal API Changes | |
| 54 | -~~~~~~~~~~~~~~~~~~~~ | |
| 55 | - | |
| 56 | -1. The ``ResultSet`` interface has a new ``wasApplied()`` method. This will | |
| 57 | - only affect clients that provide their own implementation of this interface. | |
| 58 | - | |
| 59 | - | |
| 60 | -2.1.2 | |
| 61 | ------ | |
| 62 | - | |
| 63 | -2.1.2 brings important internal changes with native protocol v3 support, but | |
| 64 | -the impact on the public API has been kept as low as possible. | |
| 65 | - | |
| 66 | -User API Changes | |
| 67 | -~~~~~~~~~~~~~~~~ | |
| 68 | - | |
| 69 | -1. The native protocol version is now modelled as an enum: ``ProtocolVersion``. | |
| 70 | - Most public methods that take it as an argument have a backward-compatible | |
| 71 | - version that takes an ``int`` (the exception being ``RegularStatement``, | |
| 72 | - described below). For new code, prefer the enum version. | |
| 73 | - | |
| 74 | -Internal API Changes | |
| 75 | -~~~~~~~~~~~~~~~~~~~~ | |
| 76 | - | |
| 77 | -1. ``RegularStatement.getValues`` now takes the protocol version as a | |
| 78 | - ``ProtocolVersion`` instead of an ``int``. This is transparent for callers | |
| 79 | - since there is a backward-compatible alternative, but if you happened to | |
| 80 | - extend the class you'll need to update your implementation. | |
| 81 | - | |
| 82 | -2. ``BatchStatement.setSerialConsistencyLevel`` now returns ``BatchStatement`` | |
| 83 | - instead of ``Statement``. Again, this only matters if you extended this | |
| 84 | - class (if so, it might be a good idea to also have a covariant return in | |
| 85 | - your child class). | |
| 86 | - | |
| 87 | -3. The constructor of ``UnsupportedFeatureException`` now takes a | |
| 88 | - ``ProtocolVersion`` as a parameter. This should impact few users, as there's | |
| 89 | - hardly any reason to build instances of that class from client code. | |
| 90 | - | |
| 91 | -New features | |
| 92 | -~~~~~~~~~~~~ | |
| 93 | - | |
| 94 | -These features are only active when the native protocol v3 is in use. | |
| 95 | - | |
| 96 | -1. The driver now uses a single connection per host (as opposed to a pool in | |
| 97 | - 2.1.1). Most options in ``PoolingOptions`` are ignored, except for a new one | |
| 98 | - called ``maxSimultaneousRequestsPerHostThreshold``. See the class's Javadocs | |
| 99 | - for detailed explanations. | |
| 100 | - | |
| 101 | -2. You can now provide a default timestamp with each query (but it will be | |
| 102 | - ignored if the CQL query string already contains a ``USING TIMESTAMP`` | |
| 103 | - clause). This can be done on a per-statement basis with | |
| 104 | - ``Statement.setDefaultTimestamp``, or automatically with a | |
| 105 | - ``TimestampGenerator`` specified with | |
| 106 | - ``Cluster.Builder.withTimestampGenerator`` (two implementations are | |
| 107 | - provided: ``ThreadLocalMonotonicTimestampGenerator`` and | |
| 108 | - ``AtomicMonotonicTimestampGenerator``). If you specify both, the statement's | |
| 109 | - timestamp takes precedence over the generator. By default, the driver has | |
| 110 | - the same behavior as 2.1.1 (no generator, timestamps are assigned by | |
| 111 | - Cassandra unless ``USING TIMESTAMP`` was specified). | |
| 112 | - | |
| 113 | -3. ``BatchStatement.setSerialConsistencyLevel`` no longer throws an exception, | |
| 114 | - it will honor the serial consistency level for the batch. |
modified driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java +1 −0
| @@ -120,6 +120,7 @@ | ||
| 120 | 120 | |
| 121 | 121 | // Ensure that bs.getObject() also returns the expected value. |
| 122 | 122 | assertThat(bs.getObject(0)).isEqualTo(table.sampleValue); |
| 123 | + assertThat(bs.getObject("v")).isEqualTo(table.sampleValue); | |
| 123 | 124 | } |
| 124 | 125 | |
| 125 | 126 | /** |
modified driver-core/src/test/java/com/datastax/driver/core/SessionTest.java +1 −1
| @@ -209,7 +209,7 @@ | ||
| 209 | 209 | startLatch.countDown(); |
| 210 | 210 | |
| 211 | 211 | executor.shutdown(); |
| 212 | - boolean normalShutdown = executor.awaitTermination(500, TimeUnit.MILLISECONDS); | |
| 212 | + boolean normalShutdown = executor.awaitTermination(1, TimeUnit.SECONDS); | |
| 213 | 213 | assertTrue(normalShutdown); |
| 214 | 214 | |
| 215 | 215 | // The deadlock occurred here before JAVA-418 |
added driver-examples/osgi/README.md +30 −0
| @@ -0,0 +1,30 @@ | ||
| 1 | +# OSGi Example | |
| 2 | + | |
| 3 | +A simple example application that demonstrates using the Java Driver in | |
| 4 | +an OSGi service. | |
| 5 | + | |
| 6 | +MailboxService is an activated service that uses Cassandra to | |
| 7 | +persist a Mailbox by email address. | |
| 8 | + | |
| 9 | +## Usage | |
| 10 | + | |
| 11 | +To build the bundle and run tests execute the following maven task:: | |
| 12 | + | |
| 13 | + mvn integration-test -P short | |
| 14 | + | |
| 15 | +The short profile needs to be activated since the tests run under | |
| 16 | +this group. | |
| 17 | + | |
| 18 | +After which the bundle jar will be present in the target/ directory. | |
| 19 | + | |
| 20 | +The project includes an integration test that verifies the service can | |
| 21 | +be activated and used in an OSGi container. It also verifies that | |
| 22 | +driver-core can be used in an OSGi container in the following | |
| 23 | +configurations: | |
| 24 | + | |
| 25 | +1. Default (default classifier with all dependencies) | |
| 26 | +2. Netty-Shaded (shaded classifier with all depedencies w/o Netty) | |
| 27 | +3. Guava 15 (default classifier with Guava 15.0) | |
| 28 | +4. Guava 16 | |
| 29 | +5. Guava 17 | |
| 30 | +6. Guava 18 |
deleted driver-examples/osgi/README.rst +0 −32
| @@ -1,32 +0,0 @@ | ||
| 1 | -OSGi Example | |
| 2 | -============ | |
| 3 | - | |
| 4 | -A simple example application that demonstrates using the Java Driver in | |
| 5 | -an OSGi service. | |
| 6 | - | |
| 7 | -MailboxService is an activated service that uses Cassandra to | |
| 8 | -persist a Mailbox by email address. | |
| 9 | - | |
| 10 | -Usage | |
| 11 | ------ | |
| 12 | - | |
| 13 | -To build the bundle and run tests execute the following maven task:: | |
| 14 | - | |
| 15 | - mvn integration-test -P short | |
| 16 | - | |
| 17 | -The short profile needs to be activated since the tests run under | |
| 18 | -this group. | |
| 19 | - | |
| 20 | -After which the bundle jar will be present in the target/ directory. | |
| 21 | - | |
| 22 | -The project includes an integration test that verifies the service can | |
| 23 | -be activated and used in an OSGi container. It also verifies that | |
| 24 | -driver-core can be used in an OSGi container in the following | |
| 25 | -configurations: | |
| 26 | - | |
| 27 | -1. Default (default classifier with all dependencies) | |
| 28 | -2. Netty-Shaded (shaded classifier with all depedencies w/o Netty) | |
| 29 | -3. Guava 15 (default classifier with Guava 15.0) | |
| 30 | -4. Guava 16 | |
| 31 | -5. Guava 17 | |
| 32 | -6. Guava 18 |
added driver-examples/stress/README.md +25 −0
| @@ -0,0 +1,25 @@ | ||
| 1 | +# Stress application | |
| 2 | + | |
| 3 | +A simple example application that uses the java driver to stress test | |
| 4 | +Cassandra. This also somewhat stress test the java driver as a result. | |
| 5 | + | |
| 6 | +Please note that this simple example is far from being a complete stress | |
| 7 | +application. In particular it currently supports a very limited number of | |
| 8 | +stress scenario. | |
| 9 | + | |
| 10 | +## Usage | |
| 11 | + | |
| 12 | +You will need to build the stress application fist: | |
| 13 | + | |
| 14 | + ./bin/build | |
| 15 | + | |
| 16 | +After which you can run it using for instance: | |
| 17 | + | |
| 18 | + ./bin/stress insert_prepared | |
| 19 | + | |
| 20 | +Of course, you will need to have at least one Cassandra node running (on | |
| 21 | +127.0.0.1 by default) for this to work. Please refer to: | |
| 22 | + | |
| 23 | + ./bin/stress -h | |
| 24 | + | |
| 25 | +for more details on the options available. |
deleted driver-examples/stress/README.rst +0 −27
| @@ -1,27 +0,0 @@ | ||
| 1 | -Stress application | |
| 2 | -================== | |
| 3 | - | |
| 4 | -A simple example application that uses the java driver to stress test | |
| 5 | -Cassandra. This also somewhat stress test the java driver as a result. | |
| 6 | - | |
| 7 | -Please note that this simple example is far from being a complete stress | |
| 8 | -application. In particular it currently supports a very limited number of | |
| 9 | -stress scenario. | |
| 10 | - | |
| 11 | -Usage | |
| 12 | ------ | |
| 13 | - | |
| 14 | -You will need to build the stress application fist: | |
| 15 | - | |
| 16 | - ./bin/build | |
| 17 | - | |
| 18 | -After which you can run it using for instance: | |
| 19 | - | |
| 20 | - ./bin/stress insert_prepared | |
| 21 | - | |
| 22 | -Of course, you will need to have at least one Cassandra node running (on | |
| 23 | -127.0.0.1 by default) for this to work. Please refer to: | |
| 24 | - | |
| 25 | - ./bin/stress -h | |
| 26 | - | |
| 27 | -for more details on the options available. |
added faq/README.md +16 −0
| @@ -0,0 +1,16 @@ | ||
| 1 | +## Frequently Asked Questions | |
| 2 | + | |
| 3 | +### How do I implement paging? | |
| 4 | + | |
| 5 | +When using [native protocol](../features/native_protocol/) version 2 or | |
| 6 | +higher, the driver automatically pages large result sets under the hood. | |
| 7 | +You can also save the paging state to resume iteration later. See [this | |
| 8 | +page](../features/paging/) for more information. | |
| 9 | + | |
| 10 | +Native protocol v1 does not support paging, but you can emulate it in | |
| 11 | +CQL with `LIMIT` and the `token()` function. See | |
| 12 | +[this conversation](https://groups.google.com/a/lists.datastax.com/d/msg/java-driver-user/U2KzAHruWO4/6vDmUVDDkOwJ) on the mailing list. | |
| 13 | + | |
| 14 | +There is no trivial solution for offset queries (e.g. jump to page 20 | |
| 15 | +directly). Cassandra does not implement them out of the box, see | |
| 16 | +[CASSANDRA-6511](https://issues.apache.org/jira/browse/CASSANDRA-6511). |
added upgrade_guide/README.md +321 −0
| @@ -0,0 +1,321 @@ | ||
| 1 | +## Upgrade guide | |
| 2 | + | |
| 3 | +The purpose of this guide is to detail changes made by successive | |
| 4 | +versions of the Java driver. | |
| 5 | + | |
| 6 | +### 2.1.2 | |
| 7 | + | |
| 8 | +2.1.2 brings important internal changes with native protocol v3 support, but | |
| 9 | +the impact on the public API has been kept as low as possible. | |
| 10 | + | |
| 11 | +#### User API Changes | |
| 12 | + | |
| 13 | +1. The native protocol version is now modelled as an enum: `ProtocolVersion`. | |
| 14 | + Most public methods that take it as an argument have a backward-compatible | |
| 15 | + version that takes an `int` (the exception being `RegularStatement`, | |
| 16 | + described below). For new code, prefer the enum version. | |
| 17 | + | |
| 18 | +#### Internal API Changes | |
| 19 | + | |
| 20 | +1. `RegularStatement.getValues` now takes the protocol version as a | |
| 21 | + `ProtocolVersion` instead of an `int`. This is transparent for callers | |
| 22 | + since there is a backward-compatible alternative, but if you happened to | |
| 23 | + extend the class you'll need to update your implementation. | |
| 24 | + | |
| 25 | +2. `BatchStatement.setSerialConsistencyLevel` now returns `BatchStatement` | |
| 26 | + instead of `Statement`. Again, this only matters if you extended this | |
| 27 | + class (if so, it might be a good idea to also have a covariant return in | |
| 28 | + your child class). | |
| 29 | + | |
| 30 | +3. The constructor of `UnsupportedFeatureException` now takes a | |
| 31 | + `ProtocolVersion` as a parameter. This should impact few users, as there's | |
| 32 | + hardly any reason to build instances of that class from client code. | |
| 33 | + | |
| 34 | +#### New features | |
| 35 | + | |
| 36 | +These features are only active when the native protocol v3 is in use. | |
| 37 | + | |
| 38 | +1. The driver now uses a single connection per host (as opposed to a pool in | |
| 39 | + 2.1.1). Most options in `PoolingOptions` are ignored, except for a new one | |
| 40 | + called `maxSimultaneousRequestsPerHostThreshold`. See the class's Javadocs | |
| 41 | + for detailed explanations. | |
| 42 | + | |
| 43 | +2. You can now provide a default timestamp with each query (but it will be | |
| 44 | + ignored if the CQL query string already contains a `USING TIMESTAMP` | |
| 45 | + clause). This can be done on a per-statement basis with | |
| 46 | + `Statement.setDefaultTimestamp`, or automatically with a | |
| 47 | + `TimestampGenerator` specified with | |
| 48 | + `Cluster.Builder.withTimestampGenerator` (two implementations are | |
| 49 | + provided: `ThreadLocalMonotonicTimestampGenerator` and | |
| 50 | + `AtomicMonotonicTimestampGenerator`). If you specify both, the statement's | |
| 51 | + timestamp takes precedence over the generator. By default, the driver has | |
| 52 | + the same behavior as 2.1.1 (no generator, timestamps are assigned by | |
| 53 | + Cassandra unless `USING TIMESTAMP` was specified). | |
| 54 | + | |
| 55 | +3. `BatchStatement.setSerialConsistencyLevel` no longer throws an exception, | |
| 56 | + it will honor the serial consistency level for the batch. | |
| 57 | + | |
| 58 | + | |
| 59 | +### 2.1.1 | |
| 60 | + | |
| 61 | +#### Internal API Changes | |
| 62 | + | |
| 63 | +1. The `ResultSet` interface has a new `wasApplied()` method. This will | |
| 64 | + only affect clients that provide their own implementation of this interface. | |
| 65 | + | |
| 66 | + | |
| 67 | +### 2.1.0 | |
| 68 | + | |
| 69 | +#### User API Changes | |
| 70 | + | |
| 71 | +1. The `getCaching` method of `TableMetadata#Options` now returns a | |
| 72 | + `Map` to account for changes to Cassandra 2.1. Also, the | |
| 73 | + `getIndexInterval` method now returns an `Integer` instead of an `int` | |
| 74 | + which will be `null` when connected to Cassandra 2.1 nodes. | |
| 75 | + | |
| 76 | +2. `BoundStatement` variables that have not been set explicitly will no | |
| 77 | + longer default to `null`. Instead, all variables must be bound explicitly, | |
| 78 | + otherwise the execution of the statement will fail (this also applies to | |
| 79 | + statements inside of a `BatchStatement`). For variables that map to a | |
| 80 | + primitive Java type, a new `setToNull` method has been added. | |
| 81 | + We made this change because the driver might soon distinguish between unset | |
| 82 | + and null variables, so we don't want clients relying on the "leave unset to | |
| 83 | + set to `null`" behavior. | |
| 84 | + | |
| 85 | + | |
| 86 | +#### Internal API Changes | |
| 87 | + | |
| 88 | +The changes listed in this section should normally not impact end users of the | |
| 89 | +driver, but rather third-party frameworks and tools. | |
| 90 | + | |
| 91 | +1. The `serialize` and `deserialize` methods in `DataType` now take an | |
| 92 | + additional parameter: the protocol version. As explained in the javadoc, | |
| 93 | + if unsure, the proper value to use for this parameter is the protocol version | |
| 94 | + in use by the driver, i.e. the value returned by | |
| 95 | + `cluster.getConfiguration().getProtocolOptions().getProtocolVersion()`. | |
| 96 | + | |
| 97 | +2. The `parse` method in `DataType` now returns a Java object, not a | |
| 98 | + `ByteBuffer`. The previous behavior can be obtained by calling the | |
| 99 | + `serialize` method on the returned object. | |
| 100 | + | |
| 101 | +3. The `getValues` method of `RegularStatement` now takes the protocol | |
| 102 | + version as a parameter. As above, the proper value if unsure is almost surely | |
| 103 | + the protocol version in use | |
| 104 | + (`cluster.getConfiguration().getProtocolOptions().getProtocolVersion()`). | |
| 105 | + | |
| 106 | + | |
| 107 | +### 2.0.x to 2.0.10 | |
| 108 | + | |
| 109 | +We try to avoid breaking changes within a branch (2.0.x to 2.0.y), but | |
| 110 | +2.0.10 saw a lot of new features and internal improvements. There is one | |
| 111 | +breaking change: | |
| 112 | + | |
| 113 | +1. `LatencyTracker#update` now has a different signature and takes two new | |
| 114 | + parameters: the statement that has been executed (never null), and the exception | |
| 115 | + thrown while executing the query (or null, if the query executed successfully). | |
| 116 | + Existing implementations of this interface, once upgraded to the new method | |
| 117 | + signature, should continue to work as before. | |
| 118 | + | |
| 119 | +The following might also be of interest: | |
| 120 | + | |
| 121 | +2. `SocketOptions#getTcpNoDelay()` is now TRUE by default (it was previously undefined). | |
| 122 | + This reflects the new behavior of Netty (which was upgraded from version 3.9.0 to | |
| 123 | + 4.0.27): `TCP_NODELAY` is now turned on by default, instead of depending on the OS | |
| 124 | + default like in previous versions. | |
| 125 | + | |
| 126 | +3. Netty is not shaded anymore in the default Maven artifact. However we publish a | |
| 127 | + [shaded artifact](../features/shaded_jar/) under a different classifier. | |
| 128 | + | |
| 129 | +4. The internal initialization sequence of the Cluster object has been slightly changed: | |
| 130 | + some fields that were previously initialized in the constructor are now set when | |
| 131 | + the `init()` method is called. This is unlikely to affect regular driver users. | |
| 132 | + | |
| 133 | +### 1.0 to 2.0 | |
| 134 | + | |
| 135 | +We used the opportunity of a major version bump to incorporate your feedback | |
| 136 | +and improve the API, to fix a number of inconsistencies and remove cruft. | |
| 137 | +Unfortunately this means there are some breaking changes, but the new API should | |
| 138 | +be both simpler and more complete. | |
| 139 | + | |
| 140 | +The following describes the changes for 2.0 that are breaking changes of the | |
| 141 | +1.0 API. For ease of use, we distinguish two categories of API changes: the "main" | |
| 142 | +ones and the "other" ones. | |
| 143 | + | |
| 144 | +The "main" API changes are the ones that are either | |
| 145 | +likely to affect most upgraded apps or are incompatible changes that, even if minor, | |
| 146 | +will not be detected at compile time. Upgraders are highly encouraged to check | |
| 147 | +this list of "main" changes while upgrading their application to 2.0 (even | |
| 148 | +though most applications are likely to be affected by only a handful of | |
| 149 | +changes). | |
| 150 | + | |
| 151 | +The "other" list is, well, other changes: those that are likely to | |
| 152 | +affect a minor number of applications and will be detected by compile time | |
| 153 | +errors anyway. It is ok to skip those initially and only come back to them if | |
| 154 | +you have trouble compiling your application after an upgrade. | |
| 155 | + | |
| 156 | +#### Main API changes | |
| 157 | + | |
| 158 | +1. The `Query` class has been renamed into `Statement` (it was confusing | |
| 159 | + to some that the `BoundStatement` was not a `Statement`). To allow | |
| 160 | + this, the old `Statement` class has been renamed to `RegularStatement`. | |
| 161 | + | |
| 162 | +2. The `Cluster` and `Session` shutdown API has changed. There is now a | |
| 163 | + `closeAsync` that is asynchronous but returns a `Future` on the | |
| 164 | + completion of the shutdown process. There is also a `close` shortcut | |
| 165 | + that does the same but blocks. Also, `close` now waits for ongoing | |
| 166 | + queries to complete by default (but you can force the closing of all | |
| 167 | + connections if you want to). | |
| 168 | + | |
| 169 | +3. `NoHostAvailableException#getErrors` now returns the full exception objects for | |
| 170 | + each node instead of just a message. In other words, it returns a | |
| 171 | + `Map<InetAddress, Throwable>` instead of a `Map<InetAddress, String>`. | |
| 172 | + | |
| 173 | +4. `Statement#getConsistencyLevel` (previously `Query#getConsistencyLevel`, see | |
| 174 | + first point) will now return `null` by default (instead of `CL.ONE`), with the | |
| 175 | + meaning of "use the default consistency level". | |
| 176 | + The default consistency level can now be configured through the new `QueryOptions` | |
| 177 | + object in the cluster `Configuration`. | |
| 178 | + | |
| 179 | +5. The `Metrics` class now uses the Codahale metrics library version 3 (version 2 was | |
| 180 | + used previously). This new major version of the library has many API changes | |
| 181 | + compared to its version 2 (see the [release notes](https://dropwizard.github.io/metrics/3.1.0/about/release-notes/) for details), | |
| 182 | + which can thus impact consumers of the Metrics class. | |
| 183 | + Furthermore, the default `JmxReporter` now includes a name specific to the | |
| 184 | + cluster instance (to avoid conflicts when multiple Cluster instances are created | |
| 185 | + in the same JVM). As a result, tools that were polling JMX info will | |
| 186 | + have to be updated accordingly. | |
| 187 | + | |
| 188 | +6. The `QueryBuilder#in` method now has the following special case: using | |
| 189 | + `QueryBuilder.in(QueryBuilder.bindMarker())` will generate the string `IN ?`, | |
| 190 | + not `IN (?)` as was the case in 1.0. The reasoning being that the former | |
| 191 | + syntax, made valid by [CASSANDRA-4210](https://issues.apache.org/jira/browse/CASSANDRA-4210) | |
| 192 | + is a lot more useful than `IN (?)`, as the latter can more simply use an | |
| 193 | + equality. | |
| 194 | + Note that if you really want to output `IN (?)` with the query | |
| 195 | + builder, you can use `QueryBuilder.in(QueryBuilder.raw("?"))`. | |
| 196 | + | |
| 197 | +7. When binding values by name in `BoundStatement` (i.e. using the | |
| 198 | + `setX(String, X)` methods), if more than one variable have the same name, | |
| 199 | + then all values corresponding to that variable | |
| 200 | + name are set instead of just the first occurrence. | |
| 201 | + | |
| 202 | +8. The `QueryBuilder#raw` method does not automatically add quotes anymore, but | |
| 203 | + rather output its result without any change (as the raw name implies). | |
| 204 | + This means for instance that `eq("x", raw(foo))` will output `x = foo`, | |
| 205 | + not `x = 'foo'` (you don't need the raw method to output the latter string). | |
| 206 | + | |
| 207 | + | |
| 208 | +9. The `QueryBuilder` will now sometimes use the new ability to send value as | |
| 209 | + bytes instead of serializing everything to string. In general the QueryBuilder | |
| 210 | + will do the right thing, but if you were calling the `getQueryString()` method | |
| 211 | + on a Statement created with a QueryBuilder (for other reasons than to prepare a query) | |
| 212 | + then the returned string may contain bind markers in place of some of the values | |
| 213 | + provided (and in that case, `getValues()` will contain the values corresponding | |
| 214 | + to those markers). If need be, it is possible to force the old behavior by | |
| 215 | + using the new `setForceNoValues()` method. | |
| 216 | + | |
| 217 | +#### Other API Changes | |
| 218 | + | |
| 219 | +1. Creating a Cluster instance (through `Cluster#buildFrom` or the | |
| 220 | + `Cluster.Builder#build` method) **does not create any connection right away | |
| 221 | + anymore** (and thus cannot throw a `NoHostAvailableException` or an | |
| 222 | + `AuthenticationException`). Instead, the initial contact points are checked | |
| 223 | + the first time a call to `Cluster#connect` is done. If for some reason you | |
| 224 | + want to emulate the previous behavior, you can use the new method | |
| 225 | + `Cluster#init`: `Cluster.builder().build()` in 1.0 is equivalent to | |
| 226 | + `Cluster.builder().build().init()` in 2.0. | |
| 227 | + | |
| 228 | +2. Methods from `Metadata`, `KeyspaceMetadata` and `TableMetadata` now use by default | |
| 229 | + case insensitive identifiers (for keyspace, table and column names in | |
| 230 | + parameter). You can double-quote an identifier if you want it to be a | |
| 231 | + case sensitive one (as you would do in CQL) and there is a `Metadata.quote` | |
| 232 | + helper method for that. | |
| 233 | + | |
| 234 | +3. The `TableMetadata#getClusteringKey` method has been renamed | |
| 235 | + `TableMetadata#getClusteringColumns` to match the "official" vocabulary. | |
| 236 | + | |
| 237 | +4. The `UnavailableException#getConsistency` method has been renamed to | |
| 238 | + `UnavailableException#getConsistencyLevel` for consistency with the method of | |
| 239 | + `QueryTimeoutException`. | |
| 240 | + | |
| 241 | +5. The `RegularStatement` class (ex-`Statement` class, see above) must now | |
| 242 | + implement two additional methods: `RegularStatement#getKeyspace` and | |
| 243 | + `RegularStatement#getValues`. If you had extended this class, you will have to | |
| 244 | + implement those new methods, but both can return null if they are not useful | |
| 245 | + in your case. | |
| 246 | + | |
| 247 | +6. The `Cluster.Initializer` interface should now implement 2 new methods: | |
| 248 | + `Cluster.Initializer#getInitialListeners` (which can return an empty | |
| 249 | + collection) and `Cluster.Initializer#getClusterName` (which can return null). | |
| 250 | + | |
| 251 | +7. The `Metadata#getReplicas` method now takes 2 arguments. On top of the | |
| 252 | + partition key, you must now provide the keyspace too. The previous behavior | |
| 253 | + was buggy: it's impossible to properly return the full list of replica for a | |
| 254 | + partition key without knowing the keyspace since replication may depend on | |
| 255 | + the keyspace). | |
| 256 | + | |
| 257 | +8. The method `LoadBalancingPolicy#newQueryPlan()` method now takes the currently | |
| 258 | + logged keyspace as 2nd argument. This information is necessary to do proper | |
| 259 | + token aware balancing (see preceding point). | |
| 260 | + | |
| 261 | +9. The `ResultSetFuture#set` and `ResultSetFuture#setException` methods have been | |
| 262 | + removed (from the public API at least). They were never meant to be exposed | |
| 263 | + publicly: a `resultSetFuture` is always set by the driver itself and should | |
| 264 | + not be set manually. | |
| 265 | + | |
| 266 | +10. The deprecated since 1.0.2 `Host.HealthMonitor` class has been removed. You | |
| 267 | + will now need to use `Host#isUp` and `Cluster#register` if you were using that | |
| 268 | + class. | |
| 269 | + | |
| 270 | +#### Features available only with Cassandra 2.0 | |
| 271 | + | |
| 272 | +This section details the biggest additions to 2.0 API wise. It is not an | |
| 273 | +exhaustive list of new features in 2.0. | |
| 274 | + | |
| 275 | +1. The new `BatchStatement` class allows to group any type of insert Statements | |
| 276 | + (`BoundStatement` or `RegularStatement`) for execution as a batch. For instance, | |
| 277 | + you can do something like: | |
| 278 | + | |
| 279 | + ```java | |
| 280 | + List<String> values = ...; | |
| 281 | + PreparedStatement ps = session.prepare("INSERT INTO myTable(value) VALUES (?)"); | |
| 282 | + BatchStatement bs = new BatchStatement(); | |
| 283 | + for (String value : values) | |
| 284 | + bs.add(ps.bind(value)); | |
| 285 | + session.execute(bs); | |
| 286 | + ``` | |
| 287 | + | |
| 288 | +2. `SimpleStatement` can now take a list of values in addition to the query. This | |
| 289 | + allows to do the equivalent of a prepare+execute but with only one round-trip | |
| 290 | + to the server and without keeping the prepared statement after the | |
| 291 | + execution. | |
| 292 | + | |
| 293 | + This is typically useful if a given query should be executed only | |
| 294 | + once (i.e. you don't want to prepare it) but you also don't want to | |
| 295 | + serialize all values into strings. Shortcut `Session#execute()` and | |
| 296 | + `Session#executeAsync()` methods are also provided so you that you can do: | |
| 297 | + | |
| 298 | + ```java | |
| 299 | + String imgName = ...; | |
| 300 | + ByteBuffer imgBytes = ...; | |
| 301 | + session.execute("INSERT INTO images(name, bytes) VALUES (?, ?)", imgName, imgBytes); | |
| 302 | + ``` | |
| 303 | + | |
| 304 | +3. SELECT queries are now "paged" under the hood. In other words, if a query | |
| 305 | + yields a very large result, only the beginning of the `ResultSet` will be fetch | |
| 306 | + initially, the rest being fetch "on-demand". In practice, this means that: | |
| 307 | + | |
| 308 | + ```java | |
| 309 | + for (Row r : session.execute("SELECT * FROM mytable")) | |
| 310 | + ... process r ... | |
| 311 | + ``` | |
| 312 | + | |
| 313 | + should not timeout or OOM the server anymore even if "mytable" contains a lot | |
| 314 | + of data. In general paging should be transparent for the application (as in | |
| 315 | + the example above), but the implementation provides a number of knobs to | |
| 316 | + fine tune the behavior of that paging: | |
| 317 | + | |
| 318 | + * the size of each "page" can be set per-query (`Statement#setFetchSize()`) | |
| 319 | + * the `ResultSet` object provides 2 methods to check the state of paging | |
| 320 | + (`ResultSet#getAvailableWithoutFetching` and `ResultSet#isFullyFetched`) | |
| 321 | + as well as a mean to force the pre-fetching of the next page (`ResultSet#fetchMoreResults`). |