kikocis/java-driver public
Changesets · Branches · Tags · Compare
| Changeset | 741b3ef633c35cbec6fabab4117e56c89cc28022ff7330af9515d9b584647c24 |
|---|---|
| Author | olim7t <omichallat+github@gmail.com> · 2015-05-11 19:22 +02:00 |
| Committer | olim7t <omichallat+github@gmail.com> · 2015-05-11 19:22 +02:00 |
| Parents | 132f1f86c7d9 |
4 files changed
modified features/logging/README.md +6 −7
| @@ -110,11 +110,10 @@ | ||
| 110 | 110 | |
| 111 | 111 | ### Logging query latencies |
| 112 | 112 | |
| 113 | -Version 2.0.10 of the driver introduces a new feature: the `QueryLogger`. | |
| 114 | - | |
| 115 | -This new API provides clients with the ability to log queries executed by the driver, | |
| 116 | -and especially, it allows client to track slow queries, i.e. queries that take longer to | |
| 117 | -complete than a configured threshold in milliseconds. | |
| 113 | +The `QueryLogger` provides clients with the ability to log queries | |
| 114 | +executed by the driver, and especially, it allows client to track slow | |
| 115 | +queries, i.e. queries that take longer to complete than a configured | |
| 116 | +threshold in milliseconds. | |
| 118 | 117 | |
| 119 | 118 | To turn on this feature, you first need to instantiate and register a `QueryLogger` instance: |
| 120 | 119 | |
| @@ -179,7 +178,7 @@ | ||
| 179 | 178 | a constant threshold in milliseconds (which is the default behavior), or |
| 180 | 179 | a dynamic threshold based on per-host latency percentiles, as computed by `PerHostPercentileTracker`. |
| 181 | 180 | |
| 182 | -**Dynamic thresholds are still a beta feature as of version 2.0.10: they | |
| 181 | +**Dynamic thresholds are still a beta feature as of version 2.1.6: they | |
| 183 | 182 | haven't been extensively tested yet, and the API is still subject to |
| 184 | 183 | change.** |
| 185 | 184 | |
| @@ -301,4 +300,4 @@ | ||
| 301 | 300 | </log4j:configuration> |
| 302 | 301 | ``` |
| 303 | 302 | |
| 304 | -[query_logger]:http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/QueryLogger.html | |
| No newline at the end of the file | ||
| 303 | +[query_logger]:http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/QueryLogger.html |
modified features/metadata/README.md +17 −17
| @@ -4,7 +4,7 @@ | ||
| 4 | 4 | is connected to. It is available via |
| 5 | 5 | [Cluster#getMetadata()][getMetadata]. |
| 6 | 6 | |
| 7 | -[getMetadata]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Cluster.html#getMetadata() | |
| 7 | +[getMetadata]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Cluster.html#getMetadata() | |
| 8 | 8 | |
| 9 | 9 | ### Schema metadata |
| 10 | 10 | |
| @@ -12,8 +12,8 @@ | ||
| 12 | 12 | to get keyspace-level metadata. From there you can access the keyspace's |
| 13 | 13 | objects (tables, and UDTs and UDFs if relevant). |
| 14 | 14 | |
| 15 | -[getKeyspace]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html#getKeyspace(java.lang.String) | |
| 16 | -[getKeyspaces]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html#getKeyspaces() | |
| 15 | +[getKeyspace]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html#getKeyspace(java.lang.String) | |
| 16 | +[getKeyspaces]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html#getKeyspaces() | |
| 17 | 17 | |
| 18 | 18 | #### Refreshes |
| 19 | 19 | |
| @@ -112,9 +112,9 @@ | ||
| 112 | 112 | |
| 113 | 113 | Check out the API docs for the features in this section: |
| 114 | 114 | |
| 115 | -* [withMaxSchemaAgreementWaitSeconds(int)](http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Cluster.Builder.html#withMaxSchemaAgreementWaitSeconds(int)) | |
| 116 | -* [isSchemaInAgreement()](http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/ExecutionInfo.html#isSchemaInAgreement()) | |
| 117 | -* [checkSchemaAgreement()](http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html#checkSchemaAgreement()) | |
| 115 | +* [withMaxSchemaAgreementWaitSeconds(int)](http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Cluster.Builder.html#withMaxSchemaAgreementWaitSeconds(int)) | |
| 116 | +* [isSchemaInAgreement()](http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/ExecutionInfo.html#isSchemaInAgreement()) | |
| 117 | +* [checkSchemaAgreement()](http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html#checkSchemaAgreement()) | |
| 118 | 118 | |
| 119 | 119 | |
| 120 | 120 | ### Token metadata |
| @@ -158,14 +158,14 @@ | ||
| 158 | 158 | table (see |
| 159 | 159 | [CASSANDRA-7688](https://issues.apache.org/jira/browse/CASSANDRA-7688)). |
| 160 | 160 | |
| 161 | -[metadata]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html | |
| 162 | -[getTokenRanges]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html#getTokenRanges() | |
| 163 | -[getTokenRanges2]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html#getTokenRanges(java.lang.String,%20com.datastax.driver.core.Host) | |
| 164 | -[getReplicas]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html#getReplicas(java.lang.String,%20com.datastax.driver.core.TokenRange) | |
| 165 | -[newToken]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html#newToken(java.lang.String) | |
| 166 | -[newTokenRange]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metadata.html#newTokenRange(com.datastax.driver.core.Token,%20com.datastax.driver.core.Token) | |
| 167 | -[TokenRange]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/TokenRange.html | |
| 168 | -[getTokens]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Host.html#getTokens() | |
| 169 | -[setToken]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/BoundStatement.html#setToken(int,%20com.datastax.driver.core.Token) | |
| 170 | -[getToken]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Row.html#getToken(int) | |
| 171 | -[getPKToken]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Row.html#getPartitionKeyToken() | |
| 161 | +[metadata]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html | |
| 162 | +[getTokenRanges]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html#getTokenRanges() | |
| 163 | +[getTokenRanges2]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html#getTokenRanges(java.lang.String,%20com.datastax.driver.core.Host) | |
| 164 | +[getReplicas]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html#getReplicas(java.lang.String,%20com.datastax.driver.core.TokenRange) | |
| 165 | +[newToken]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html#newToken(java.lang.String) | |
| 166 | +[newTokenRange]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metadata.html#newTokenRange(com.datastax.driver.core.Token,%20com.datastax.driver.core.Token) | |
| 167 | +[TokenRange]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/TokenRange.html | |
| 168 | +[getTokens]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Host.html#getTokens() | |
| 169 | +[setToken]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/BoundStatement.html#setToken(int,%20com.datastax.driver.core.Token) | |
| 170 | +[getToken]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Row.html#getToken(int) | |
| 171 | +[getPKToken]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Row.html#getPartitionKeyToken() |
modified features/paging/README.md +2 −2
| @@ -171,5 +171,5 @@ | ||
| 171 | 171 | } |
| 172 | 172 | ``` |
| 173 | 173 | |
| 174 | -[result_set]:http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/ResultSet.html | |
| 175 | -[paging_state]:http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/PagingState.html | |
| No newline at the end of the file | ||
| 174 | +[result_set]:http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/ResultSet.html | |
| 175 | +[paging_state]:http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/PagingState.html |
modified features/speculative_execution/README.md +13 −13
| @@ -79,7 +79,7 @@ | ||
| 79 | 79 | |
| 80 | 80 | * **`Statement#isIdempotent()` is only computed automatically for |
| 81 | 81 | statements built with [QueryBuilder][QueryBuilder]**. Note that there |
| 82 | - is a known issue in 2.0.10 where calls to `now()` or `uuid()` are not | |
| 82 | + is a known issue in 2.1.6 where calls to `now()` or `uuid()` are not | |
| 83 | 83 | taken into account (see |
| 84 | 84 | [JAVA-733](https://datastax-oss.atlassian.net/browse/JAVA-733)). If |
| 85 | 85 | you're using these CQL functions with built statements, force |
| @@ -106,8 +106,8 @@ | ||
| 106 | 106 | cluster.getConfiguration().getQueryOptions().setDefaultIdempotence(true); |
| 107 | 107 | ``` |
| 108 | 108 | |
| 109 | -[isIdempotent]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Statement.html#isIdempotent() | |
| 110 | -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/querybuilder/QueryBuilder.html | |
| 109 | +[isIdempotent]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Statement.html#isIdempotent() | |
| 110 | +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/querybuilder/QueryBuilder.html | |
| 111 | 111 | |
| 112 | 112 | ### Enabling speculative executions |
| 113 | 113 | |
| @@ -116,7 +116,7 @@ | ||
| 116 | 116 | `Cluster`. This policy defines the threshold after which a new |
| 117 | 117 | speculative execution will be triggered. |
| 118 | 118 | |
| 119 | -[sep]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html | |
| 119 | +[sep]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html | |
| 120 | 120 | |
| 121 | 121 | Two implementations are provided with the driver: |
| 122 | 122 | |
| @@ -144,14 +144,14 @@ | ||
| 144 | 144 | * if no response has been received at t0 + 1000 milliseconds, start |
| 145 | 145 | another speculative execution on a third node. |
| 146 | 146 | |
| 147 | -[csep]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html | |
| 147 | +[csep]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html | |
| 148 | 148 | |
| 149 | 149 | #### [PercentileSpeculativeExecutionPolicy][psep] |
| 150 | 150 | |
| 151 | 151 | This policy sets the threshold at a given latency percentile for the |
| 152 | 152 | current host, based on recent statistics. |
| 153 | 153 | |
| 154 | -**As of 2.0.10, this class is provided as a beta preview: it hasn't been | |
| 154 | +**As of 2.1.6, this class is provided as a beta preview: it hasn't been | |
| 155 | 155 | extensively tested yet, and the API is still subject to change.** |
| 156 | 156 | |
| 157 | 157 | First and foremost, make sure that the [HdrHistogram][hdr] library (used |
| @@ -205,9 +205,9 @@ | ||
| 205 | 205 | logger (see the [Logging](../logging/) section). In that case, you would |
| 206 | 206 | create a single tracker object and share it with both components. |
| 207 | 207 | |
| 208 | -[psep]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html | |
| 208 | +[psep]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html | |
| 209 | 209 | [hdr]: http://hdrhistogram.github.io/HdrHistogram/ |
| 210 | -[phpt]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/PerHostPercentileTracker.html | |
| 210 | +[phpt]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/PerHostPercentileTracker.html | |
| 211 | 211 | |
| 212 | 212 | #### Using your own |
| 213 | 213 | |
| @@ -261,7 +261,7 @@ | ||
| 261 | 261 | The only impact is that all executions of the same query always share |
| 262 | 262 | the same query plan, so each host will be used by at most one execution. |
| 263 | 263 | |
| 264 | -[retry_policy]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/policies/RetryPolicy.html | |
| 264 | +[retry_policy]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/policies/RetryPolicy.html | |
| 265 | 265 | |
| 266 | 266 | ### Tuning and practical details |
| 267 | 267 | |
| @@ -276,8 +276,8 @@ | ||
| 276 | 276 | It should only be a few percents of the total number of requests |
| 277 | 277 | ([cluster.getMetrics().getRequestsTimer().getCount()][request_metric]). |
| 278 | 278 | |
| 279 | -[se_metric]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metrics.Errors.html#getSpeculativeExecutions() | |
| 280 | -[request_metric]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Metrics.html#getRequestsTimer() | |
| 279 | +[se_metric]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metrics.Errors.html#getSpeculativeExecutions() | |
| 280 | +[request_metric]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Metrics.html#getRequestsTimer() | |
| 281 | 281 | |
| 282 | 282 | #### Stream id exhaustion |
| 283 | 283 | |
| @@ -306,8 +306,8 @@ | ||
| 306 | 306 | using, you can check with |
| 307 | 307 | [cluster.getConfiguration().getProtocolOptions().getProtocolVersion()][protocol_version]. |
| 308 | 308 | |
| 309 | -[session_state]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/Session.State.html | |
| 310 | -[protocol_version]: http://docs.datastax.com/en/drivers/java/2.0/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion() | |
| 309 | +[session_state]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/Session.State.html | |
| 310 | +[protocol_version]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion() | |
| 311 | 311 | |
| 312 | 312 | #### Request ordering and client timestamps |
| 313 | 313 |