From 3c16b6e304df6d6159400f5b6eeab8fa4cacd426 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Tue, 3 Jan 2017 18:15:33 +0100 Subject: [PATCH 001/512] Prepare for 3.0.6 release --- README.md | 14 +++++++------- changelog/README.md | 2 +- manual/compression/README.md | 2 +- manual/custom_codecs/extras/README.md | 2 +- manual/object_mapper/README.md | 2 +- manual/shaded_jar/README.md | 6 +++--- pom.xml | 2 +- 7 files changed, 15 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 65f920e76a9..8b6adb0743d 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ not yet have been released. You can find the documentation for latest version through [Java driver docs](http://datastax.github.io/java-driver/) or via the release tags, [e.g. -3.0.5](https://github.com/datastax/java-driver/tree/3.0.5).* +3.0.6](https://github.com/datastax/java-driver/tree/3.0.6).* A modern, [feature-rich](manual/) and highly tunable Java client library for Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using @@ -55,7 +55,7 @@ The driver contains the following modules: start material and technical details about the driver and its features. - API: http://www.datastax.com/drivers/java/3.0 - [changelog](changelog/) -- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.0.5.tar.gz) +- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.0.6.tar.gz) **Feeback requested:** help us focus our efforts, provide your input on the [Platform and Runtime Survey](http://goo.gl/forms/qwUE6qnL7U) (we kept it short). @@ -68,7 +68,7 @@ it in your application using the following Maven dependency: com.datastax.cassandra cassandra-driver-core - 3.0.5 + 3.0.6 ``` @@ -78,7 +78,7 @@ Note that the object mapper is published as a separate artifact: com.datastax.cassandra cassandra-driver-mapping - 3.0.5 + 3.0.6 ``` @@ -88,7 +88,7 @@ The 'extras' module is also published as a separate artifact: com.datastax.cassandra cassandra-driver-extras - 3.0.5 + 3.0.6 ``` @@ -97,12 +97,12 @@ We also provide a [shaded JAR](manual/shaded_jar/) to avoid the explicit dependency to Netty. If you can't use a dependency management tool, a -[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.0.5.tar.gz) +[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.0.6.tar.gz) is available for download. ## Compatibility -The Java client driver 3.0.5 ([branch 3.0.x](https://github.com/datastax/java-driver/tree/3.0.x)) is compatible with Apache +The Java client driver 3.0.6 ([branch 3.0.x](https://github.com/datastax/java-driver/tree/3.0.x)) is compatible with Apache Cassandra 1.2, 2.0, 2.1, 2.2 and 3.0 (see [this page](http://datastax.github.io/java-driver/manual/native_protocol) for the most up-to-date compatibility information). diff --git a/changelog/README.md b/changelog/README.md index 51b788d047f..97a3b114af1 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,6 +1,6 @@ ## Changelog -### 3.0.6 (in progress) +### 3.0.6 - [bug] JAVA-1330: Add un/register for SchemaChangeListener in DelegatingCluster - [bug] JAVA-1351: Include Custom Payload in Request.copy. diff --git a/manual/compression/README.md b/manual/compression/README.md index edd617806f5..aa8468e39ac 100644 --- a/manual/compression/README.md +++ b/manual/compression/README.md @@ -85,4 +85,4 @@ cluster = Cluster.builder() .build(); ``` -[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.0.5/cassandra-driver-parent-3.0.5.pom +[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.0.6/cassandra-driver-parent-3.0.6.pom diff --git a/manual/custom_codecs/extras/README.md b/manual/custom_codecs/extras/README.md index 605ae0046cb..dfc1210f47f 100644 --- a/manual/custom_codecs/extras/README.md +++ b/manual/custom_codecs/extras/README.md @@ -10,7 +10,7 @@ The module is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-extras - 3.0.5 + 3.0.6 ``` diff --git a/manual/object_mapper/README.md b/manual/object_mapper/README.md index 2e62330ef05..1a40bdd43ce 100644 --- a/manual/object_mapper/README.md +++ b/manual/object_mapper/README.md @@ -11,7 +11,7 @@ The mapper is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-mapping - 3.0.5 + 3.0.6 ``` diff --git a/manual/shaded_jar/README.md b/manual/shaded_jar/README.md index fc1814c1515..34608036a1f 100644 --- a/manual/shaded_jar/README.md +++ b/manual/shaded_jar/README.md @@ -12,7 +12,7 @@ package name: com.datastax.cassandra cassandra-driver-core - 3.0.5 + 3.0.6 shaded @@ -32,7 +32,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-core - 3.0.5 + 3.0.6 shaded @@ -44,7 +44,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-mapping - 3.0.5 + 3.0.6 com.datastax.cassandra diff --git a/pom.xml b/pom.xml index eac561b7daa..f928817d2fc 100644 --- a/pom.xml +++ b/pom.xml @@ -285,7 +285,7 @@ - 3.0.3 + 3.0.5 ../clirr-ignores.xml @@ -32,7 +32,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-core - 3.0.6 + 3.0.7 shaded @@ -44,7 +44,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-mapping - 3.0.6 + 3.0.7 com.datastax.cassandra diff --git a/pom.xml b/pom.xml index c64ed450aa1..b864d5c28e0 100644 --- a/pom.xml +++ b/pom.xml @@ -285,7 +285,7 @@ - 3.0.5 + 3.0.6 ../clirr-ignores.xml @@ -32,7 +32,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-core - 3.1.3 + 3.1.4 shaded @@ -44,7 +44,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-mapping - 3.1.3 + 3.1.4 com.datastax.cassandra diff --git a/pom.xml b/pom.xml index e26593fd5d0..72f482cdb5f 100644 --- a/pom.xml +++ b/pom.xml @@ -287,7 +287,7 @@ - 3.1.2 + 3.1.3 ../clirr-ignores.xml - + jar @@ -224,7 +224,7 @@ JNR does not provide OSGi bundles, so exclude it; the driver can live without it Explicitly import javax.security.cert because it's required by Netty, but Netty has been explicitly excluded --> - + com.datastax.shaded.* diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractAddressableByIndexData.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractAddressableByIndexData.java index c1b21810e5f..fc795b29578 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractAddressableByIndexData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractAddressableByIndexData.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.reflect.TypeToken; import java.math.BigDecimal; @@ -280,7 +280,7 @@ public boolean equals(Object o) { Object thisValue = this.codecFor(i).deserialize(this.values[i], this.protocolVersion); Object thatValue = that.codecFor(i).deserialize(that.values[i], that.protocolVersion); - if (!Objects.equal(thisValue, thatValue)) + if (!MoreObjects.equal(thisValue, thatValue)) return false; } return true; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractData.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractData.java index d4144162c26..80eaed6a2c4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractData.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.reflect.TypeToken; import java.math.BigDecimal; @@ -575,7 +575,7 @@ public boolean equals(Object o) { Object thisValue = this.codecFor(i).deserialize(this.values[i], this.protocolVersion); Object thatValue = that.codecFor(i).deserialize(that.values[i], that.protocolVersion); - if (!Objects.equal(thisValue, thatValue)) + if (!MoreObjects.equal(thisValue, thatValue)) return false; } return true; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java index e0717c7f133..635d2538bc0 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java @@ -16,7 +16,7 @@ package com.datastax.driver.core; import com.datastax.driver.core.utils.Bytes; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; import org.slf4j.Logger; @@ -376,11 +376,11 @@ public boolean equals(Object other) { AggregateMetadata that = (AggregateMetadata) other; return this.keyspace.getName().equals(that.keyspace.getName()) && this.argumentTypes.equals(that.argumentTypes) && - Objects.equal(this.finalFuncFullName, that.finalFuncFullName) && + MoreObjects.equal(this.finalFuncFullName, that.finalFuncFullName) && // Note: this might be a problem if a custom codec has been registered for the initCond's type, with a target Java type that // does not properly implement equals. We don't have any control over this, at worst this would lead to spurious change // notifications. - Objects.equal(this.initCond, that.initCond) && + MoreObjects.equal(this.initCond, that.initCond) && this.returnType.equals(that.returnType) && this.stateFuncFullName.equals(that.stateFuncFullName) && this.stateType.equals(that.stateType); @@ -390,7 +390,6 @@ public boolean equals(Object other) { @Override public int hashCode() { - return Objects.hashCode(this.keyspace.getName(), this.argumentTypes, - this.finalFuncFullName, this.initCond, this.returnType, this.stateFuncFullName, this.stateType); + return MoreObjects.hashCode(this.keyspace.getName(), this.argumentTypes, this.finalFuncFullName, this.initCond, this.returnType, this.stateFuncFullName, this.stateType); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java b/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java index c72ae8fc28b..51effb25775 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java @@ -28,7 +28,7 @@ * additional {@link #force} method that can be used to expedite the shutdown * process (see below). *

- * Note that this class implements Guava's {@code + * Note that this class implements Guava's {@code * ListenableFuture} and can so be used with Guava's future utilities. */ public abstract class CloseFuture extends AbstractFuture { diff --git a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java index d4e6ea05bed..54cf8667179 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java @@ -64,8 +64,8 @@ public class Cluster implements Closeable { private static final Logger logger = LoggerFactory.getLogger(Cluster.class); static { - // Perform sanity checks to inform user of possible environment misconfiguration. - SanityChecks.check(); + // Force initialization to fail fast if there is an issue detecting the version + GuavaCompatibility.init(); } @VisibleForTesting @@ -334,15 +334,15 @@ public ListenableFuture connectAsync(final String keyspace) { return sessionInitialized; } else { final String useQuery = "USE " + keyspace; - ListenableFuture keyspaceSet = Futures.transform(sessionInitialized, new AsyncFunction() { + ListenableFuture keyspaceSet = GuavaCompatibility.INSTANCE.transformAsync(sessionInitialized, new AsyncFunction() { @Override public ListenableFuture apply(Session session) throws Exception { return session.executeAsync(useQuery); } }); - ListenableFuture withErrorHandling = Futures.withFallback(keyspaceSet, new FutureFallback() { + ListenableFuture withErrorHandling = GuavaCompatibility.INSTANCE.withFallback(keyspaceSet, new AsyncFunction() { @Override - public ListenableFuture create(Throwable t) throws Exception { + public ListenableFuture apply(Throwable t) throws Exception { session.closeAsync(); if (t instanceof SyntaxError) { // Give a more explicit message, because it's probably caused by a bad keyspace name @@ -2373,7 +2373,7 @@ public void run() { rs.getExecutionInfo().setSchemaInAgreement(finalSchemaInAgreement); future.setResult(rs); } - }, MoreExecutors.sameThreadExecutor()); + }, GuavaCompatibility.INSTANCE.sameThreadExecutor()); } catch (Exception e) { logger.warn("Error while waiting for schema agreement", e); diff --git a/driver-core/src/main/java/com/datastax/driver/core/CodecRegistry.java b/driver-core/src/main/java/com/datastax/driver/core/CodecRegistry.java index e62957f8f71..2e8ef03dfa7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CodecRegistry.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CodecRegistry.java @@ -16,7 +16,7 @@ package com.datastax.driver.core; import com.datastax.driver.core.exceptions.CodecNotFoundException; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.cache.*; import com.google.common.reflect.TypeToken; import com.google.common.util.concurrent.UncheckedExecutionException; @@ -216,12 +216,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; CacheKey cacheKey = (CacheKey) o; - return Objects.equal(cqlType, cacheKey.cqlType) && Objects.equal(javaType, cacheKey.javaType); + return MoreObjects.equal(cqlType, cacheKey.cqlType) && MoreObjects.equal(javaType, cacheKey.javaType); } @Override public int hashCode() { - return Objects.hashCode(cqlType, javaType); + return MoreObjects.hashCode(cqlType, javaType); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java index 0e754721c1d..c4eb68e1b0d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import java.util.Arrays; import java.util.HashMap; @@ -116,7 +116,7 @@ public boolean equals(Object other) { @Override public int hashCode() { - return Objects.hashCode(name, isStatic, type); + return MoreObjects.hashCode(name, isStatic, type); } @Override diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index fc27f1262da..04727f8d388 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -18,8 +18,8 @@ import com.datastax.driver.core.Responses.Result.SetKeyspace; import com.datastax.driver.core.exceptions.*; import com.datastax.driver.core.utils.MoreFutures; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Objects; import com.google.common.collect.Lists; import com.google.common.collect.MapMaker; import com.google.common.util.concurrent.*; @@ -179,13 +179,13 @@ public void operationComplete(ChannelFuture future) throws Exception { Executor initExecutor = factory.manager.configuration.getPoolingOptions().getInitializationExecutor(); - ListenableFuture initializeTransportFuture = Futures.transform(channelReadyFuture, + ListenableFuture initializeTransportFuture = GuavaCompatibility.INSTANCE.transformAsync(channelReadyFuture, onChannelReady(protocolVersion, initExecutor), initExecutor); // Fallback on initializeTransportFuture so we can properly propagate specific exceptions. - ListenableFuture initFuture = Futures.withFallback(initializeTransportFuture, new FutureFallback() { + ListenableFuture initFuture = GuavaCompatibility.INSTANCE.withFallback(initializeTransportFuture, new AsyncFunction() { @Override - public ListenableFuture create(Throwable t) throws Exception { + public ListenableFuture apply(Throwable t) throws Exception { SettableFuture future = SettableFuture.create(); // Make sure the connection gets properly closed. if (t instanceof ClusterNameMismatchException || t instanceof UnsupportedProtocolVersionException) { @@ -233,7 +233,7 @@ private AsyncFunction onChannelReady(final ProtocolVersion protocolV public ListenableFuture apply(Void input) throws Exception { ProtocolOptions.Compression compression = factory.configuration.getProtocolOptions().getCompression(); Future startupResponseFuture = write(new Requests.Startup(compression)); - return Futures.transform(startupResponseFuture, + return GuavaCompatibility.INSTANCE.transformAsync(startupResponseFuture, onStartupResponse(protocolVersion, initExecutor), initExecutor); } }; @@ -297,7 +297,7 @@ private ListenableFuture checkClusterName(ProtocolVersion protocolVersion, DefaultResultSetFuture clusterNameFuture = new DefaultResultSetFuture(null, protocolVersion, new Requests.Query("select cluster_name from system.local")); try { write(clusterNameFuture); - return Futures.transform(clusterNameFuture, + return GuavaCompatibility.INSTANCE.transformAsync(clusterNameFuture, new AsyncFunction() { @Override public ListenableFuture apply(ResultSet rs) throws Exception { @@ -323,7 +323,7 @@ private ListenableFuture authenticateV1(Authenticator authenticator, final Requests.Credentials creds = new Requests.Credentials(((ProtocolV1Authenticator) authenticator).getCredentials()); try { Future authResponseFuture = write(creds); - return Futures.transform(authResponseFuture, + return GuavaCompatibility.INSTANCE.transformAsync(authResponseFuture, new AsyncFunction() { @Override public ListenableFuture apply(Message.Response authResponse) throws Exception { @@ -350,7 +350,7 @@ private ListenableFuture authenticateV2(final Authenticator authenticator, try { Future authResponseFuture = write(new Requests.AuthResponse(initialResponse)); - return Futures.transform(authResponseFuture, onV2AuthResponse(authenticator, protocolVersion, executor), executor); + return GuavaCompatibility.INSTANCE.transformAsync(authResponseFuture, onV2AuthResponse(authenticator, protocolVersion, executor), executor); } catch (Exception e) { return Futures.immediateFailedFuture(e); } @@ -376,7 +376,7 @@ public ListenableFuture apply(Message.Response authResponse) throws Except // Otherwise, send the challenge response back to the server logger.trace("{} Sending Auth response to challenge", this); Future nextResponseFuture = write(new Requests.AuthResponse(responseToServer)); - return Futures.transform(nextResponseFuture, onV2AuthResponse(authenticator, protocolVersion, executor), executor); + return GuavaCompatibility.INSTANCE.transformAsync(nextResponseFuture, onV2AuthResponse(authenticator, protocolVersion, executor), executor); } case ERROR: // This is not very nice, but we're trying to identify if we @@ -471,7 +471,7 @@ void setKeyspace(String keyspace) throws ConnectionException { if (keyspace == null) return; - if (Objects.equal(keyspace(), keyspace)) + if (MoreObjects.equal(keyspace(), keyspace)) return; try { @@ -497,7 +497,7 @@ void setKeyspace(String keyspace) throws ConnectionException { ListenableFuture setKeyspaceAsync(final String keyspace) throws ConnectionException, BusyConnectionException { SetKeyspaceAttempt existingAttempt = targetKeyspace.get(); - if (Objects.equal(existingAttempt.keyspace, keyspace)) + if (MoreObjects.equal(existingAttempt.keyspace, keyspace)) return existingAttempt.future; final SettableFuture ksFuture = SettableFuture.create(); diff --git a/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java b/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java index d785b8e057a..1483190abb2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java @@ -16,8 +16,8 @@ package com.datastax.driver.core; import com.datastax.driver.core.exceptions.*; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Objects; import com.google.common.util.concurrent.ListenableFuture; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -519,7 +519,7 @@ private static void updateInfo(Host host, Row row, Cluster.Manager cluster, bool } private static void updateLocationInfo(Host host, String datacenter, String rack, boolean isInitialConnection, Cluster.Manager cluster) { - if (Objects.equal(host.getDatacenter(), datacenter) && Objects.equal(host.getRack(), rack)) + if (MoreObjects.equal(host.getDatacenter(), datacenter) && MoreObjects.equal(host.getRack(), rack)) return; // If the dc/rack information changes for an existing node, we need to update the load balancing policy. diff --git a/driver-core/src/main/java/com/datastax/driver/core/DataType.java b/driver-core/src/main/java/com/datastax/driver/core/DataType.java index 4849f6367c0..f92f4255371 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DataType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DataType.java @@ -16,7 +16,7 @@ package com.datastax.driver.core; import com.datastax.driver.core.exceptions.DriverInternalError; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableSet; import io.netty.buffer.ByteBuf; @@ -662,7 +662,7 @@ public List getTypeArguments() { @Override public final int hashCode() { - return Objects.hashCode(name, typeArguments); + return MoreObjects.hashCode(name, typeArguments); } @Override @@ -740,7 +740,7 @@ public String getCustomTypeClassName() { @Override public final int hashCode() { - return Objects.hashCode(name, customClassName); + return MoreObjects.hashCode(name, customClassName); } @Override @@ -749,7 +749,7 @@ public final boolean equals(Object o) { return false; DataType.CustomType d = (DataType.CustomType) o; - return name == d.name && Objects.equal(customClassName, d.customClassName); + return name == d.name && MoreObjects.equal(customClassName, d.customClassName); } @Override diff --git a/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java index fdbfdaab522..523dfeb9718 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.collect.ImmutableMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -321,6 +321,6 @@ public boolean equals(Object other) { @Override public int hashCode() { - return Objects.hashCode(keyspace.getName(), arguments, body, calledOnNullInput, language, returnType); + return MoreObjects.hashCode(keyspace.getName(), arguments, body, calledOnNullInput, language, returnType); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java new file mode 100644 index 00000000000..9ff0de2ff69 --- /dev/null +++ b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java @@ -0,0 +1,276 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import com.datastax.driver.core.exceptions.DriverInternalError; +import com.google.common.base.Preconditions; +import com.google.common.reflect.TypeToken; +import com.google.common.util.concurrent.*; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Type; +import java.net.URL; +import java.util.Enumeration; +import java.util.concurrent.Executor; +import java.util.concurrent.ThreadPoolExecutor; +import java.util.jar.Attributes; +import java.util.jar.Manifest; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * A compatibility layer to support a wide range of Guava versions. + *

+ * The driver is compatible with Guava 16.0.1 or higher, but Guava 20 introduced incompatible breaking changes in its + * API, that could in turn be breaking for legacy driver clients if we simply upgraded our dependency. We don't want to + * increment our major version "just" for Guava (we have other changes planned). + *

+ * Therefore we depend on Guava 19, which has both the deprecated and the new APIs, and detect the actual version at + * runtime in order to call the relevant methods. + *

+ * This is a hack, and might not work with subsequent Guava releases; the real fix is to stop exposing Guava in our + * public API. We'll address that in version 4 of the driver. + */ +@SuppressWarnings("deprecation") +public abstract class GuavaCompatibility { + + private static final Logger logger = LoggerFactory.getLogger(GuavaCompatibility.class); + private static final Pattern GA_VERSION_EXTRACTOR = Pattern.compile("(\\d+\\.\\d+\\.\\d+).*"); + + /** + * The unique instance of this class, that is compatible with the Guava version found in the classpath. + */ + public static final GuavaCompatibility INSTANCE = selectImplementation(); + + /** + * Force the initialization of the class. This should be called early to ensure a fast failure if an incompatible + * version of Guava is in the classpath (the driver code calls it when loading the {@link Cluster} class). + */ + public static void init() { + // nothing to do, we just want the static initializers to run + } + + /** + * Returns a {@code Future} whose result is taken from the given primary + * {@code input} or, if the primary input fails, from the {@code Future} + * provided by the {@code fallback}. + * + * @see Futures#withFallback(ListenableFuture, FutureFallback) + * @see Futures#catchingAsync(ListenableFuture, Class, AsyncFunction) + */ + public abstract ListenableFuture withFallback(ListenableFuture input, + AsyncFunction fallback); + + /** + * Returns a {@code Future} whose result is taken from the given primary + * {@code input} or, if the primary input fails, from the {@code Future} + * provided by the {@code fallback}. + * + * @see Futures#withFallback(ListenableFuture, FutureFallback, Executor) + * @see Futures#catchingAsync(ListenableFuture, Class, AsyncFunction, Executor) + */ + public abstract ListenableFuture withFallback(ListenableFuture input, + AsyncFunction fallback, Executor executor); + + /** + * Returns a new {@code ListenableFuture} whose result is asynchronously + * derived from the result of the given {@code Future}. More precisely, the + * returned {@code Future} takes its result from a {@code Future} produced by + * applying the given {@code AsyncFunction} to the result of the original + * {@code Future}. + * + * @see Futures#transform(ListenableFuture, AsyncFunction) + * @see Futures#transformAsync(ListenableFuture, AsyncFunction) + */ + public abstract ListenableFuture transformAsync(ListenableFuture input, + AsyncFunction function); + + /** + * Returns a new {@code ListenableFuture} whose result is asynchronously + * derived from the result of the given {@code Future}. More precisely, the + * returned {@code Future} takes its result from a {@code Future} produced by + * applying the given {@code AsyncFunction} to the result of the original + * {@code Future}. + * + * @see Futures#transform(ListenableFuture, AsyncFunction, Executor) + * @see Futures#transformAsync(ListenableFuture, AsyncFunction, Executor) + */ + public abstract ListenableFuture transformAsync(ListenableFuture input, + AsyncFunction function, + Executor executor); + + /** + * Returns true if {@code target} is a supertype of {@code argument}. "Supertype" is defined + * according to the rules for type arguments introduced with Java generics. + * + * @see TypeToken#isAssignableFrom(Type) + * @see TypeToken#isSupertypeOf(Type) + */ + public abstract boolean isSupertypeOf(TypeToken target, TypeToken argument); + + /** + * Returns an {@link Executor} that runs each task in the thread that invokes + * {@link Executor#execute execute}, as in {@link ThreadPoolExecutor.CallerRunsPolicy}. + * + * @see MoreExecutors#sameThreadExecutor() + * @see MoreExecutors#directExecutor() + */ + public abstract Executor sameThreadExecutor(); + + private static GuavaCompatibility selectImplementation() { + String fullVersion = getBundleVersion(loadGuavaManifest()); + // Get rid of potential rc qualifier, as it could throw off the lexical comparisons + String version = stripQualifiers(fullVersion); + if (version.compareTo("16.0.1") < 0) { + throw new DriverInternalError(String.format( + "Detected incompatible version of Guava in the classpath (%s). " + + "You need 16.0.1 or higher.", fullVersion)); + } else if (version.compareTo("19.0") < 0) { + logger.info("Detected Guava {} in the classpath, using pre-19 compatibility layer", fullVersion); + return new Version18OrLower(); + } else { + logger.info("Detected Guava {} in the classpath, using 19+ compatibility layer", fullVersion); + return new Version19OrHigher(); + } + } + + private static Manifest loadGuavaManifest() { + InputStream in = null; + try { + Enumeration resources = Preconditions.class.getClassLoader() + .getResources("META-INF/MANIFEST.MF"); + while (resources.hasMoreElements()) { + in = resources.nextElement().openStream(); + Manifest manifest = new Manifest(in); + Attributes mainAttributes = manifest.getMainAttributes(); + String symbolicName = mainAttributes.getValue("Bundle-SymbolicName"); + if ("com.google.guava".equals(symbolicName)) { + return manifest; + } + } + throw new DriverInternalError("Error while looking up Guava manifest: " + + "no manifest with symbolic name 'com.google.guava' found in classpath."); + } catch (Exception e) { + throw new DriverInternalError("Error while looking up Guava manifest", e); + } finally { + if (in != null) { + try { + in.close(); + } catch (IOException e) { + // ignore + } + } + } + } + + private static String getBundleVersion(Manifest manifest) { + return manifest.getMainAttributes().getValue("Bundle-Version"); + } + + private static String stripQualifiers(String fullVersion) { + Matcher matcher = GA_VERSION_EXTRACTOR.matcher(fullVersion); + if (matcher.matches()) { + return matcher.group(1); + } else { + throw new DriverInternalError(String.format("Could not strip qualifiers from full Guava version %s", fullVersion)); + } + } + + private static class Version18OrLower extends GuavaCompatibility { + + @Override + public ListenableFuture withFallback(ListenableFuture input, + final AsyncFunction fallback) { + return Futures.withFallback(input, new FutureFallback() { + @Override + public ListenableFuture create(Throwable t) throws Exception { + return fallback.apply(t); + } + }); + } + + @Override + public ListenableFuture withFallback(ListenableFuture input, + final AsyncFunction fallback, + Executor executor) { + return Futures.withFallback(input, new FutureFallback() { + @Override + public ListenableFuture create(Throwable t) throws Exception { + return fallback.apply(t); + } + }, executor); + } + + @Override + public ListenableFuture transformAsync(ListenableFuture input, AsyncFunction function) { + return Futures.transform(input, function); + } + + @Override + public ListenableFuture transformAsync(ListenableFuture input, AsyncFunction function, Executor executor) { + return Futures.transform(input, function, executor); + } + + @Override + public boolean isSupertypeOf(TypeToken target, TypeToken argument) { + return target.isAssignableFrom(argument); + } + + @Override + public Executor sameThreadExecutor() { + return MoreExecutors.sameThreadExecutor(); + } + } + + private static class Version19OrHigher extends GuavaCompatibility { + + @Override + public ListenableFuture withFallback(ListenableFuture input, + AsyncFunction fallback) { + return Futures.catchingAsync(input, Throwable.class, fallback); + } + + @Override + public ListenableFuture withFallback(ListenableFuture input, + AsyncFunction fallback, Executor executor) { + return Futures.catchingAsync(input, Throwable.class, fallback, executor); + } + + @Override + public ListenableFuture transformAsync(ListenableFuture input, AsyncFunction function) { + return Futures.transformAsync(input, function); + } + + @Override + public ListenableFuture transformAsync(ListenableFuture input, AsyncFunction function, Executor executor) { + return Futures.transformAsync(input, function, executor); + } + + @Override + public boolean isSupertypeOf(TypeToken target, TypeToken argument) { + return target.isSupertypeOf(argument); + } + + @Override + public Executor sameThreadExecutor() { + return MoreExecutors.directExecutor(); + } + } +} diff --git a/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java b/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java index 4d80ea57f2b..1dcfb336e6e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java +++ b/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java @@ -167,9 +167,9 @@ public void onFailure(Throwable t) { } private ListenableFuture handleErrors(ListenableFuture connectionInitFuture, Executor executor) { - return Futures.withFallback(connectionInitFuture, new FutureFallback() { + return GuavaCompatibility.INSTANCE.withFallback(connectionInitFuture, new AsyncFunction() { @Override - public ListenableFuture create(Throwable t) throws Exception { + public ListenableFuture apply(Throwable t) throws Exception { // Propagate these exceptions because they mean no connection will ever succeed. They will be handled // accordingly in SessionManager#maybeAddPool. Throwables.propagateIfInstanceOf(t, ClusterNameMismatchException.class); @@ -639,7 +639,7 @@ public void run() { if (connection.state.compareAndSet(OPEN, GONE)) open.decrementAndGet(); } - }, MoreExecutors.sameThreadExecutor()); + }, GuavaCompatibility.INSTANCE.sameThreadExecutor()); futures.add(future); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java index bf393104997..bf346b530b5 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.base.Predicate; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Iterables; @@ -240,7 +240,7 @@ public boolean apply(Map.Entry input) { } public int hashCode() { - return Objects.hashCode(name, kind, target, options); + return MoreObjects.hashCode(name, kind, target, options); } public boolean equals(Object obj) { @@ -252,10 +252,10 @@ public boolean equals(Object obj) { IndexMetadata other = (IndexMetadata) obj; - return Objects.equal(name, other.name) - && Objects.equal(kind, other.kind) - && Objects.equal(target, other.target) - && Objects.equal(options, other.options); + return MoreObjects.equal(name, other.name) + && MoreObjects.equal(kind, other.kind) + && MoreObjects.equal(target, other.target) + && MoreObjects.equal(options, other.options); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java index 7132328abfd..952541cb15e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java @@ -16,7 +16,7 @@ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -221,20 +221,19 @@ public boolean equals(Object other) { return false; MaterializedViewMetadata that = (MaterializedViewMetadata) other; - return Objects.equal(this.name, that.name) && - Objects.equal(this.id, that.id) && - Objects.equal(this.partitionKey, that.partitionKey) && - Objects.equal(this.clusteringColumns, that.clusteringColumns) && - Objects.equal(this.columns, that.columns) && - Objects.equal(this.options, that.options) && - Objects.equal(this.clusteringOrder, that.clusteringOrder) && - Objects.equal(this.baseTable.getName(), that.baseTable.getName()) && + return MoreObjects.equal(this.name, that.name) && + MoreObjects.equal(this.id, that.id) && + MoreObjects.equal(this.partitionKey, that.partitionKey) && + MoreObjects.equal(this.clusteringColumns, that.clusteringColumns) && + MoreObjects.equal(this.columns, that.columns) && + MoreObjects.equal(this.options, that.options) && + MoreObjects.equal(this.clusteringOrder, that.clusteringOrder) && + MoreObjects.equal(this.baseTable.getName(), that.baseTable.getName()) && this.includeAllColumns == that.includeAllColumns; } @Override public int hashCode() { - return Objects.hashCode(name, id, partitionKey, clusteringColumns, columns, options, clusteringOrder, - baseTable.getName(), includeAllColumns); + return MoreObjects.hashCode(name, id, partitionKey, clusteringColumns, columns, options, clusteringOrder, baseTable.getName(), includeAllColumns); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java b/driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java index 38a080cbe37..ec6544a3d20 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java @@ -17,7 +17,6 @@ import com.google.common.base.Preconditions; import com.google.common.collect.ImmutableMap; -import com.google.common.util.concurrent.MoreExecutors; import java.util.Map; import java.util.concurrent.Executor; @@ -142,7 +141,7 @@ public class PoolingOptions { */ public static final int DEFAULT_HEARTBEAT_INTERVAL_SECONDS = 30; - private static final Executor DEFAULT_INITIALIZATION_EXECUTOR = MoreExecutors.sameThreadExecutor(); + private static final Executor DEFAULT_INITIALIZATION_EXECUTOR = GuavaCompatibility.INSTANCE.sameThreadExecutor(); private volatile Cluster.Manager manager; private volatile ProtocolVersion protocolVersion; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ResultSetFuture.java b/driver-core/src/main/java/com/datastax/driver/core/ResultSetFuture.java index 52f9adeea1f..f91f3a10f81 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ResultSetFuture.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ResultSetFuture.java @@ -26,7 +26,7 @@ /** * A future on a {@link ResultSet}. *

- * Note that this class implements Guava's {@code + * Note that this class implements Guava's {@code * ListenableFuture} and can so be used with Guava's future utilities. */ public interface ResultSetFuture extends ListenableFuture { diff --git a/driver-core/src/main/java/com/datastax/driver/core/SanityChecks.java b/driver-core/src/main/java/com/datastax/driver/core/SanityChecks.java deleted file mode 100644 index c93020b4692..00000000000 --- a/driver-core/src/main/java/com/datastax/driver/core/SanityChecks.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright (C) 2012-2015 DataStax Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.datastax.driver.core; - -import com.google.common.reflect.TypeToken; - -import java.lang.reflect.ParameterizedType; -import java.lang.reflect.Type; -import java.util.Map; - -class SanityChecks { - - /** - * Performs a series of runtime checks to ensure the environment does not have any - * incompatible libraries or configurations. Depending on the severity of an - * incompatibility an {@link IllegalStateException} may be thrown or an ERROR or - * WARNING is logged. - * - * @throws IllegalStateException If an environment incompatibility is detected. - * @see #checkGuava - */ - static void check() { - checkGuava(); - } - - /** - * Detects if a version of guava older than 16.01 is present by attempting to create - * a {@link TypeToken} instance for Map<String,String> and ensures that the - * value type argument is of instance {@link String}. If using an older version of guava - * this will resolve to {@link Object} instead. In this case an {@link IllegalStateException} - * is thrown. - * - * @throws IllegalStateException if version of guava less than 16.01 is detected. - */ - static void checkGuava() { - boolean resolved = false; - TypeToken> mapOfString = TypeTokens.mapOf(String.class, String.class); - Type type = mapOfString.getType(); - if (type instanceof ParameterizedType) { - ParameterizedType pType = (ParameterizedType) type; - Type[] types = pType.getActualTypeArguments(); - if (types.length == 2) { - TypeToken valueType = TypeToken.of(types[1]); - resolved = valueType.getRawType().equals(String.class); - } - } - - if (!resolved) { - throw new IllegalStateException( - "Detected Guava issue #1635 which indicates that a version of Guava less than 16.01 is in use. " - + "This introduces codec resolution issues and potentially other incompatibility issues in the driver. " - + "Please upgrade to Guava 16.01 or later."); - } - } - -} diff --git a/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java b/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java index c9a15ac13f6..8702d24589c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java @@ -87,7 +87,7 @@ public ListenableFuture initAsync() { Collection hosts = cluster.getMetadata().allHosts(); ListenableFuture allPoolsCreatedFuture = createPools(hosts); - ListenableFuture allPoolsUpdatedFuture = Futures.transform(allPoolsCreatedFuture, + ListenableFuture allPoolsUpdatedFuture = GuavaCompatibility.INSTANCE.transformAsync(allPoolsCreatedFuture, new AsyncFunction() { @Override @SuppressWarnings("unchecked") @@ -193,7 +193,7 @@ public Session.State getState() { } private ListenableFuture toPreparedStatement(final String query, final Connection.Future future) { - return Futures.transform(future, new AsyncFunction() { + return GuavaCompatibility.INSTANCE.transformAsync(future, new AsyncFunction() { @Override public ListenableFuture apply(Response response) { switch (response.type) { @@ -433,7 +433,7 @@ ListenableFuture updateCreatedPools() { // Wait pool creation before removing, so we don't lose connectivity ListenableFuture allPoolsCreatedFuture = Futures.successfulAsList(poolCreatedFutures); - return Futures.transform(allPoolsCreatedFuture, new AsyncFunction>() { + return GuavaCompatibility.INSTANCE.transformAsync(allPoolsCreatedFuture, new AsyncFunction>() { @Override public ListenableFuture> apply(Object input) throws Exception { List> poolRemovedFuture = Lists.newArrayListWithCapacity(toRemove.size()); @@ -626,7 +626,7 @@ private ListenableFuture prepare(final PreparedStatement stat // the prepared query. So don't wait if no connection is available, simply abort. ListenableFuture connectionFuture = entry.getValue().borrowConnection( 0, TimeUnit.MILLISECONDS, 0); - ListenableFuture prepareFuture = Futures.transform(connectionFuture, + ListenableFuture prepareFuture = GuavaCompatibility.INSTANCE.transformAsync(connectionFuture, new AsyncFunction() { @Override public ListenableFuture apply(final Connection c) throws Exception { diff --git a/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java index 2e9e6b1713f..3ff0cbdeadd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -439,19 +439,19 @@ public boolean equals(Object other) { TableMetadata that = (TableMetadata) other; - return Objects.equal(this.name, that.name) && - Objects.equal(this.id, that.id) && - Objects.equal(this.partitionKey, that.partitionKey) && - Objects.equal(this.clusteringColumns, that.clusteringColumns) && - Objects.equal(this.columns, that.columns) && - Objects.equal(this.options, that.options) && - Objects.equal(this.clusteringOrder, that.clusteringOrder) && - Objects.equal(this.indexes, that.indexes) && - Objects.equal(this.views, that.views); + return MoreObjects.equal(this.name, that.name) && + MoreObjects.equal(this.id, that.id) && + MoreObjects.equal(this.partitionKey, that.partitionKey) && + MoreObjects.equal(this.clusteringColumns, that.clusteringColumns) && + MoreObjects.equal(this.columns, that.columns) && + MoreObjects.equal(this.options, that.options) && + MoreObjects.equal(this.clusteringOrder, that.clusteringOrder) && + MoreObjects.equal(this.indexes, that.indexes) && + MoreObjects.equal(this.views, that.views); } @Override public int hashCode() { - return Objects.hashCode(name, id, partitionKey, clusteringColumns, columns, options, clusteringOrder, indexes, views); + return MoreObjects.hashCode(name, id, partitionKey, clusteringColumns, columns, options, clusteringOrder, indexes, views); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/TableOptionsMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/TableOptionsMetadata.java index cd0b290d9ed..49c1dfc7254 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TableOptionsMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TableOptionsMetadata.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.collect.ImmutableMap; import java.nio.ByteBuffer; @@ -398,30 +398,30 @@ public boolean equals(Object other) { TableOptionsMetadata that = (TableOptionsMetadata) other; return this.isCompactStorage == that.isCompactStorage && - Objects.equal(this.comment, that.comment) && + MoreObjects.equal(this.comment, that.comment) && this.readRepair == that.readRepair && this.localReadRepair == that.localReadRepair && this.replicateOnWrite == that.replicateOnWrite && this.gcGrace == that.gcGrace && this.bfFpChance == that.bfFpChance && - Objects.equal(this.caching, that.caching) && + MoreObjects.equal(this.caching, that.caching) && this.populateCacheOnFlush == that.populateCacheOnFlush && this.memtableFlushPeriodMs == that.memtableFlushPeriodMs && this.defaultTTL == that.defaultTTL && this.cdc == that.cdc && - Objects.equal(this.speculativeRetry, that.speculativeRetry) && - Objects.equal(this.indexInterval, that.indexInterval) && - Objects.equal(this.minIndexInterval, that.minIndexInterval) && - Objects.equal(this.maxIndexInterval, that.maxIndexInterval) && - Objects.equal(this.compaction, that.compaction) && - Objects.equal(this.compression, that.compression) && - Objects.equal(this.crcCheckChance, that.crcCheckChance) && - Objects.equal(this.extensions, that.extensions); + MoreObjects.equal(this.speculativeRetry, that.speculativeRetry) && + MoreObjects.equal(this.indexInterval, that.indexInterval) && + MoreObjects.equal(this.minIndexInterval, that.minIndexInterval) && + MoreObjects.equal(this.maxIndexInterval, that.maxIndexInterval) && + MoreObjects.equal(this.compaction, that.compaction) && + MoreObjects.equal(this.compression, that.compression) && + MoreObjects.equal(this.crcCheckChance, that.crcCheckChance) && + MoreObjects.equal(this.extensions, that.extensions); } @Override public int hashCode() { - return Objects.hashCode(isCompactStorage, comment, readRepair, localReadRepair, replicateOnWrite, gcGrace, + return MoreObjects.hashCode(isCompactStorage, comment, readRepair, localReadRepair, replicateOnWrite, gcGrace, bfFpChance, caching, populateCacheOnFlush, memtableFlushPeriodMs, defaultTTL, speculativeRetry, indexInterval, minIndexInterval, maxIndexInterval, compaction, compression, crcCheckChance, extensions, cdc); diff --git a/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java b/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java index 3b91c638075..81c9b1bc1c7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java @@ -15,8 +15,8 @@ */ package com.datastax.driver.core; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.annotations.VisibleForTesting; -import com.google.common.base.Objects; import com.google.common.collect.ImmutableList; import com.google.common.collect.Lists; @@ -295,15 +295,15 @@ public boolean equals(Object other) { return true; if (other instanceof TokenRange) { TokenRange that = (TokenRange) other; - return Objects.equal(this.start, that.start) && - Objects.equal(this.end, that.end); + return MoreObjects.equal(this.start, that.start) && + MoreObjects.equal(this.end, that.end); } return false; } @Override public int hashCode() { - return Objects.hashCode(start, end); + return MoreObjects.hashCode(start, end); } @Override diff --git a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java index 4af6073848b..b58c98cf3d1 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java @@ -23,6 +23,7 @@ import java.io.DataInput; import java.io.IOException; +import java.lang.reflect.Type; import java.math.BigDecimal; import java.math.BigInteger; import java.net.InetAddress; @@ -627,7 +628,7 @@ public boolean accepts(DataType cqlType) { * Implementation notes: *

    *
  1. The default implementation is covariant with respect to the passed - * argument (through the usage of {@link TypeToken#isAssignableFrom(TypeToken)} + * argument (through the usage of {@link TypeToken#isAssignableFrom(TypeToken)} or {@link TypeToken#isSupertypeOf(Type)}) * and it's strongly recommended not to modify this behavior. * This means that, by default, a codec will accept * any subtype of the Java type that it has been created for.
  2. @@ -647,7 +648,7 @@ public boolean accepts(DataType cqlType) { */ public boolean accepts(Object value) { checkNotNull(value, "Parameter value cannot be null"); - return this.javaType.isAssignableFrom(TypeToken.of(value.getClass())); + return GuavaCompatibility.INSTANCE.isSupertypeOf(this.javaType, TypeToken.of(value.getClass())); } @Override diff --git a/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java b/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java index 4dd4012d625..2efa03f136d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java +++ b/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.core; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import java.util.Arrays; import java.util.Collections; @@ -228,12 +228,12 @@ public boolean equals(Object other) { && this.patch == that.patch && this.dsePatch == that.dsePatch && (this.preReleases == null ? that.preReleases == null : Arrays.equals(this.preReleases, that.preReleases)) - && Objects.equal(this.build, that.build); + && MoreObjects.equal(this.build, that.build); } @Override public int hashCode() { - return Objects.hashCode(major, minor, patch, dsePatch, preReleases, build); + return MoreObjects.hashCode(major, minor, patch, dsePatch, preReleases, build); } @Override diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java b/driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java index 943eb454781..20ede451e01 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java @@ -17,7 +17,6 @@ import com.datastax.driver.core.AtomicMonotonicTimestampGenerator; import com.datastax.driver.core.TimestampGenerator; -import com.google.common.base.Objects; /** * Policies configured for a {@link com.datastax.driver.core.Cluster} instance. @@ -280,12 +279,12 @@ public Builder withSpeculativeExecutionPolicy(SpeculativeExecutionPolicy specula */ public Policies build() { return new Policies( - loadBalancingPolicy == null ? Policies.defaultLoadBalancingPolicy() : loadBalancingPolicy, - Objects.firstNonNull(reconnectionPolicy, Policies.defaultReconnectionPolicy()), - Objects.firstNonNull(retryPolicy, Policies.defaultRetryPolicy()), - Objects.firstNonNull(addressTranslator, Policies.defaultAddressTranslator()), - Objects.firstNonNull(timestampGenerator, Policies.defaultTimestampGenerator()), - Objects.firstNonNull(speculativeExecutionPolicy, Policies.defaultSpeculativeExecutionPolicy())); + loadBalancingPolicy == null ? defaultLoadBalancingPolicy() : loadBalancingPolicy, + reconnectionPolicy == null ? defaultReconnectionPolicy() : reconnectionPolicy, + retryPolicy == null ? defaultRetryPolicy() : retryPolicy, + addressTranslator == null ? defaultAddressTranslator() : addressTranslator, + timestampGenerator == null ? defaultTimestampGenerator() : timestampGenerator, + speculativeExecutionPolicy == null ? defaultSpeculativeExecutionPolicy() : speculativeExecutionPolicy); } } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Create.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Create.java index 6e6b07274a9..101473bf8b4 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Create.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Create.java @@ -16,8 +16,8 @@ package com.datastax.driver.core.schemabuilder; import com.datastax.driver.core.DataType; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.base.Joiner; -import com.google.common.base.Objects; import com.google.common.base.Optional; import com.google.common.collect.Lists; @@ -238,14 +238,14 @@ public boolean equals(Object o) { } if (o instanceof ClusteringOrder) { ClusteringOrder that = (ClusteringOrder) o; - return Objects.equal(this.clusteringColumnName, that.clusteringColumnName) && Objects.equal(this.direction, that.direction); + return MoreObjects.equal(this.clusteringColumnName, that.clusteringColumnName) && MoreObjects.equal(this.direction, that.direction); } return false; } @Override public int hashCode() { - return Objects.hashCode(clusteringColumnName, direction); + return MoreObjects.hashCode(clusteringColumnName, direction); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/utils/MoreObjects.java b/driver-core/src/main/java/com/datastax/driver/core/utils/MoreObjects.java new file mode 100644 index 00000000000..4e7b32d1285 --- /dev/null +++ b/driver-core/src/main/java/com/datastax/driver/core/utils/MoreObjects.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core.utils; + +import java.util.Arrays; + +/** + * Driver-specific implementation of utility object methods. + *

    + * They are available in some versions of Java/Guava, but not across all versions ranges supported by the driver, hence + * the custom implementation. + */ +public class MoreObjects { + public static boolean equal(Object first, Object second) { + return (first == second) || (first != null && first.equals(second)); + } + + public static int hashCode(Object... objects) { + return Arrays.hashCode(objects); + } +} diff --git a/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java b/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java index a7f1a58ab66..1054a767109 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java @@ -97,7 +97,7 @@ public void should_init_cluster_and_session_if_needed() throws Exception { @Test(groups = "short", dataProvider = "keyspace", enabled = false, description = "disabled because the blocking USE call in the current pool implementation makes it deadlock") public void should_chain_query_on_async_session_init_with_same_executor(String keyspace) throws Exception { - ListenableFuture resultFuture = connectAndQuery(keyspace, MoreExecutors.sameThreadExecutor()); + ListenableFuture resultFuture = connectAndQuery(keyspace, GuavaCompatibility.INSTANCE.sameThreadExecutor()); Integer result = Uninterruptibles.getUninterruptibly(resultFuture); assertThat(result).isEqualTo(1); @@ -117,7 +117,7 @@ public void should_chain_query_on_async_session_init_with_different_executor(Str @Test(groups = "short") public void should_propagate_error_to_chained_query_if_session_init_fails() throws Exception { - ListenableFuture resultFuture = connectAndQuery("wrong_keyspace", MoreExecutors.sameThreadExecutor()); + ListenableFuture resultFuture = connectAndQuery("wrong_keyspace", GuavaCompatibility.INSTANCE.sameThreadExecutor()); try { Uninterruptibles.getUninterruptibly(resultFuture); @@ -209,7 +209,7 @@ private boolean isFailed(ListenableFuture future, Class expectedExcep private ListenableFuture connectAndQuery(String keyspace, Executor executor) { ListenableFuture sessionFuture = cluster().connectAsync(keyspace); - ListenableFuture queryFuture = Futures.transform(sessionFuture, new AsyncFunction() { + ListenableFuture queryFuture = GuavaCompatibility.INSTANCE.transformAsync(sessionFuture, new AsyncFunction() { @Override public ListenableFuture apply(Session session) throws Exception { return session.executeAsync("select v from foo where k = 1"); diff --git a/driver-core/src/test/java/com/datastax/driver/core/AsyncResultSetTest.java b/driver-core/src/test/java/com/datastax/driver/core/AsyncResultSetTest.java index 5074c9cfab2..fd440c25758 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AsyncResultSetTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AsyncResultSetTest.java @@ -58,7 +58,7 @@ private void should_iterate_result_set_asynchronously(int totalCount, int fetchS Statement statement = new SimpleStatement("select * from ints").setFetchSize(fetchSize); ResultsAccumulator results = new ResultsAccumulator(); - ListenableFuture future = Futures.transform( + ListenableFuture future = GuavaCompatibility.INSTANCE.transformAsync( session().executeAsync(statement), results); @@ -85,7 +85,7 @@ public ListenableFuture apply(ResultSet rs) throws Exception { if (wasLastPage) return Futures.immediateFuture(rs); else - return Futures.transform(rs.fetchMoreResults(), this); + return GuavaCompatibility.INSTANCE.transformAsync(rs.fetchMoreResults(), this); } } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java index 9b27359f084..4aa06e7f7ed 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java @@ -18,7 +18,6 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; import com.google.common.util.concurrent.AsyncFunction; -import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import org.scassandra.http.client.PrimingRequest; import org.testng.annotations.Test; @@ -97,7 +96,7 @@ public void should_release_connection_before_completing_future() throws Exceptio mockFutures.add(session.executeAsync("mock query")); - ListenableFuture future = Futures.transform(session.executeAsync("select c from test1 where k=1"), + ListenableFuture future = GuavaCompatibility.INSTANCE.transformAsync(session.executeAsync("select c from test1 where k=1"), new AsyncFunction() { @Override public ListenableFuture apply(ResultSet result) { diff --git a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java index 20aac776a3d..ca649db9f93 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java @@ -18,6 +18,7 @@ import com.datastax.driver.core.policies.DelegatingLoadBalancingPolicy; import com.datastax.driver.core.policies.LoadBalancingPolicy; import com.datastax.driver.core.policies.RoundRobinPolicy; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.base.Objects; import com.google.common.collect.Lists; import org.slf4j.Logger; @@ -156,12 +157,12 @@ public boolean equals(Object other) { @Override public int hashCode() { - return Objects.hashCode(action, host); + return MoreObjects.hashCode(action, host); } @Override public String toString() { - return Objects.toStringHelper(this).add("action", action).add("host", host).toString(); + return String.format("Entry(action=%s, host=%s)", action, host); } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataCDCTest.java b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataCDCTest.java index 00cadee257d..6c1bc3cfe6a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataCDCTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataCDCTest.java @@ -20,8 +20,8 @@ import static org.assertj.core.api.Assertions.assertThat; -@CCMConfig(config = {"cdc_enabled:true"}) -@CassandraVersion(major = 3.8, description = "Requires CASSANDRA-12041 added in 3.8") +@CCMConfig(config = "cdc_enabled:true") +@CassandraVersion(value = "3.8", description = "Requires CASSANDRA-12041 added in 3.8") public class TableMetadataCDCTest extends CCMTestsSupport { /** diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecEncapsulationIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecEncapsulationIntegrationTest.java index 8d278d82517..de3fd0578d4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecEncapsulationIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecEncapsulationIntegrationTest.java @@ -18,7 +18,7 @@ import com.datastax.driver.core.exceptions.InvalidTypeException; import com.datastax.driver.core.querybuilder.BuiltStatement; import com.datastax.driver.core.utils.CassandraVersion; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.reflect.TypeParameter; import com.google.common.reflect.TypeToken; import org.testng.annotations.BeforeMethod; @@ -274,12 +274,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; NumberBox numberBox = (NumberBox) o; - return Objects.equal(number, numberBox.number); + return MoreObjects.equal(number, numberBox.number); } @Override public int hashCode() { - return Objects.hashCode(number); + return MoreObjects.hashCode(number); } } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedCollectionsIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedCollectionsIntegrationTest.java index 25b2e44abe6..07306c47d3b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedCollectionsIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedCollectionsIntegrationTest.java @@ -18,7 +18,7 @@ import com.datastax.driver.core.exceptions.InvalidTypeException; import com.datastax.driver.core.querybuilder.BuiltStatement; import com.datastax.driver.core.utils.CassandraVersion; -import com.google.common.base.Objects; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.collect.ImmutableMap; import com.google.common.reflect.TypeToken; import org.testng.annotations.BeforeClass; @@ -168,12 +168,12 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; MyInt myInt = (MyInt) o; - return Objects.equal(i, myInt.i); + return MoreObjects.equal(i, myInt.i); } @Override public int hashCode() { - return Objects.hashCode(i); + return MoreObjects.hashCode(i); } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java b/driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java index 8628257cfc7..8b869cdd784 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java @@ -19,7 +19,6 @@ import com.datastax.driver.core.Host; import com.datastax.driver.core.HostDistance; import com.datastax.driver.core.Statement; -import com.google.common.collect.Sets; import java.util.*; import java.util.concurrent.ConcurrentHashMap; @@ -40,8 +39,8 @@ public class LimitingLoadBalancingPolicy extends DelegatingLoadBalancingPolicy { private final int maxHosts; private final int threshold; - private final Set liveHosts = Sets.newSetFromMap(new ConcurrentHashMap()); - private final Set chosenHosts = Sets.newSetFromMap(new ConcurrentHashMap()); + private final Set liveHosts = Collections.newSetFromMap(new ConcurrentHashMap()); + private final Set chosenHosts = Collections.newSetFromMap(new ConcurrentHashMap()); private final Lock updateLock = new ReentrantLock(); private volatile Cluster cluster; diff --git a/driver-core/src/test/resources/log4j.properties b/driver-core/src/test/resources/log4j.properties index 12786f47391..8f9c901dcdb 100644 --- a/driver-core/src/test/resources/log4j.properties +++ b/driver-core/src/test/resources/log4j.properties @@ -31,6 +31,7 @@ log4j.logger.spray.can=ERROR #log4j.logger.org.scassandra.http.client=ERROR # These loggers can be quite verbose +log4j.logger.com.datastax.driver.core=INFO log4j.logger.com.datastax.driver.core.Cluster=ERROR log4j.logger.com.datastax.driver.core.policies.DCAwareRoundRobinPolicy=ERROR diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index f7ec269f27d..197c04906a5 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -230,7 +230,7 @@ com.datastax.driver.extras ${project.version} <_include>-osgi.bnd - + jar diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodecTest.java index b7688bc0a25..cb172cb75c9 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodecTest.java @@ -18,9 +18,9 @@ import com.datastax.driver.core.*; import com.datastax.driver.core.querybuilder.BuiltStatement; import com.datastax.driver.core.utils.CassandraVersion; +import com.datastax.driver.core.utils.MoreObjects; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import com.google.common.base.Objects; import com.google.common.collect.Lists; import org.testng.annotations.Test; @@ -204,13 +204,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; User user = (User) o; - return Objects.equal(id, user.id) && - Objects.equal(name, user.name); + return MoreObjects.equal(id, user.id) && + MoreObjects.equal(name, user.name); } @Override public int hashCode() { - return Objects.hashCode(id, name); + return MoreObjects.hashCode(id, name); } } } diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 9c3aaf07217..a96ddf9974a 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -158,7 +158,7 @@ com.datastax.driver.mapping ${project.version} <_include>-osgi.bnd - + jar diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java index 80eb804f6ea..699e8fbc2ff 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java @@ -19,12 +19,12 @@ import com.datastax.driver.core.querybuilder.Delete; import com.datastax.driver.core.querybuilder.Insert; import com.datastax.driver.core.querybuilder.QueryBuilder; +import com.datastax.driver.core.utils.MoreObjects; import com.datastax.driver.mapping.Mapper.Option.SaveNullFields; import com.datastax.driver.mapping.annotations.Accessor; import com.datastax.driver.mapping.annotations.Computed; import com.google.common.base.Function; import com.google.common.base.Functions; -import com.google.common.base.Objects; import com.google.common.base.Preconditions; import com.google.common.util.concurrent.*; import org.slf4j.Logger; @@ -324,7 +324,7 @@ public ListenableFuture saveAsync(T entity, Option... options) { } private ListenableFuture submitVoidQueryAsync(ListenableFuture bsFuture) { - ListenableFuture rsFuture = Futures.transform(bsFuture, new AsyncFunction() { + ListenableFuture rsFuture = GuavaCompatibility.INSTANCE.transformAsync(bsFuture, new AsyncFunction() { @Override public ListenableFuture apply(BoundStatement bs) throws Exception { return session().executeAsync(bs); @@ -449,7 +449,7 @@ public T get(Object... objects) { */ public ListenableFuture getAsync(final Object... objects) { ListenableFuture bsFuture = getQueryAsync(objects); - ListenableFuture rsFuture = Futures.transform(bsFuture, new AsyncFunction() { + ListenableFuture rsFuture = GuavaCompatibility.INSTANCE.transformAsync(bsFuture, new AsyncFunction() { @Override public ListenableFuture apply(BoundStatement bs) throws Exception { return session().executeAsync(bs); @@ -1161,7 +1161,7 @@ public boolean equals(Object other) { @Override public int hashCode() { - return Objects.hashCode(queryType, optionTypes, columns); + return MoreObjects.hashCode(queryType, optionTypes, columns); } } } diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncTest.java index a57a1cf3e27..4087c77da6d 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncTest.java @@ -19,12 +19,12 @@ import com.datastax.driver.core.Cluster; import com.datastax.driver.core.Session; import com.datastax.driver.core.utils.MoreFutures.SuccessCallback; +import com.datastax.driver.core.utils.MoreObjects; import com.datastax.driver.core.utils.UUIDs; import com.datastax.driver.mapping.annotations.Column; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; import com.google.common.base.Function; -import com.google.common.base.Objects; import com.google.common.util.concurrent.Futures; import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.Uninterruptibles; @@ -172,14 +172,14 @@ public boolean equals(Object other) { return false; User that = (User) other; - return Objects.equal(userId, that.userId) - && Objects.equal(name, that.name) - && Objects.equal(email, that.email); + return MoreObjects.equal(userId, that.userId) + && MoreObjects.equal(name, that.name) + && MoreObjects.equal(email, that.email); } @Override public int hashCode() { - return Objects.hashCode(userId, name, email); + return MoreObjects.hashCode(userId, name, email); } } diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java index 7fa9e7bfaf1..6a820125737 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java @@ -18,9 +18,9 @@ import com.datastax.driver.core.CCMTestsSupport; import com.datastax.driver.core.Session; import com.datastax.driver.core.utils.CassandraVersion; +import com.datastax.driver.core.utils.MoreObjects; import com.datastax.driver.core.utils.UUIDs; import com.datastax.driver.mapping.annotations.*; -import com.google.common.base.Objects; import org.testng.annotations.Test; import java.util.UUID; @@ -152,13 +152,13 @@ public boolean equals(Object other) { return false; Group that = (Group) other; - return Objects.equal(groupId, that.groupId) - && Objects.equal(name, that.name); + return MoreObjects.equal(groupId, that.groupId) + && MoreObjects.equal(name, that.name); } @Override public int hashCode() { - return Objects.hashCode(groupId, name); + return MoreObjects.hashCode(groupId, name); } } @@ -202,13 +202,13 @@ public boolean equals(Object other) { return false; Group2 that = (Group2) other; - return Objects.equal(groupId, that.groupId) - && Objects.equal(name, that.name); + return MoreObjects.equal(groupId, that.groupId) + && MoreObjects.equal(name, that.name); } @Override public int hashCode() { - return Objects.hashCode(groupId, name); + return MoreObjects.hashCode(groupId, name); } } @@ -246,7 +246,7 @@ public boolean equals(Object other) { @Override public int hashCode() { - return Objects.hashCode(name); + return MoreObjects.hashCode(name); } } diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java index 257408e6c0c..751ec0a9847 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java @@ -17,9 +17,9 @@ import com.datastax.driver.core.*; import com.datastax.driver.core.utils.CassandraVersion; +import com.datastax.driver.core.utils.MoreObjects; import com.datastax.driver.core.utils.UUIDs; import com.datastax.driver.mapping.annotations.*; -import com.google.common.base.Objects; import com.google.common.util.concurrent.ListenableFuture; import org.testng.annotations.Test; @@ -122,15 +122,15 @@ public boolean equals(Object other) { return false; User that = (User) other; - return Objects.equal(userId, that.userId) - && Objects.equal(name, that.name) - && Objects.equal(email, that.email) - && Objects.equal(year, that.year); + return MoreObjects.equal(userId, that.userId) + && MoreObjects.equal(name, that.name) + && MoreObjects.equal(email, that.email) + && MoreObjects.equal(year, that.year); } @Override public int hashCode() { - return Objects.hashCode(userId, name, email, year); + return MoreObjects.hashCode(userId, name, email, year); } } @@ -222,17 +222,17 @@ public boolean equals(Object other) { return false; Post that = (Post) other; - return Objects.equal(userId, that.userId) - && Objects.equal(postId, that.postId) - && Objects.equal(title, that.title) - && Objects.equal(content, that.content) - && Objects.equal(device, that.device) - && Objects.equal(tags, that.tags); + return MoreObjects.equal(userId, that.userId) + && MoreObjects.equal(postId, that.postId) + && MoreObjects.equal(title, that.title) + && MoreObjects.equal(content, that.content) + && MoreObjects.equal(device, that.device) + && MoreObjects.equal(tags, that.tags); } @Override public int hashCode() { - return Objects.hashCode(userId, postId, title, content, device, tags); + return MoreObjects.hashCode(userId, postId, title, content, device, tags); } } diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTCollectionsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTCollectionsTest.java index 58ce1267b64..90aa474aeb7 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTCollectionsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTCollectionsTest.java @@ -17,8 +17,8 @@ import com.datastax.driver.core.CCMTestsSupport; import com.datastax.driver.core.utils.CassandraVersion; +import com.datastax.driver.core.utils.MoreObjects; import com.datastax.driver.mapping.annotations.*; -import com.google.common.base.Objects; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Sets; import org.testng.annotations.Test; @@ -78,7 +78,7 @@ public boolean equals(Object other) { @Override public int hashCode() { - return Objects.hashCode(i); + return MoreObjects.hashCode(i); } } @@ -170,12 +170,12 @@ public void setM3(Map m3) { public boolean equals(Object other) { if (other instanceof CollectionExamples) { CollectionExamples that = (CollectionExamples) other; - return Objects.equal(this.id, that.id) && - Objects.equal(this.l, that.l) && - Objects.equal(this.s, that.s) && - Objects.equal(this.m1, that.m1) && - Objects.equal(this.m2, that.m2) && - Objects.equal(this.m3, that.m3); + return MoreObjects.equal(this.id, that.id) && + MoreObjects.equal(this.l, that.l) && + MoreObjects.equal(this.s, that.s) && + MoreObjects.equal(this.m1, that.m1) && + MoreObjects.equal(this.m2, that.m2) && + MoreObjects.equal(this.m3, that.m3); } return false; } diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java index d6452bd095c..d3933694ad9 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java @@ -20,9 +20,9 @@ import com.datastax.driver.core.exceptions.InvalidQueryException; import com.datastax.driver.core.querybuilder.BuiltStatement; import com.datastax.driver.core.utils.CassandraVersion; +import com.datastax.driver.core.utils.MoreObjects; import com.datastax.driver.core.utils.UUIDs; import com.datastax.driver.mapping.annotations.*; -import com.google.common.base.Objects; import com.google.common.collect.Maps; import org.assertj.core.data.MapEntry; import org.testng.annotations.AfterMethod; @@ -123,27 +123,23 @@ public boolean equals(Object other) { return true; if (other instanceof User) { User that = (User) other; - return Objects.equal(this.userId, that.userId) && - Objects.equal(this.name, that.name) && - Objects.equal(this.mainAddress, that.mainAddress) && - Objects.equal(this.otherAddresses, that.otherAddresses); + return MoreObjects.equal(this.userId, that.userId) && + MoreObjects.equal(this.name, that.name) && + MoreObjects.equal(this.mainAddress, that.mainAddress) && + MoreObjects.equal(this.otherAddresses, that.otherAddresses); } return false; } @Override public int hashCode() { - return Objects.hashCode(this.userId, this.name, this.mainAddress, this.otherAddresses); + return MoreObjects.hashCode(this.userId, this.name, this.mainAddress, this.otherAddresses); } @Override public String toString() { - return Objects.toStringHelper(User.class) - .add("userId", userId) - .add("name", name) - .add("mainAddress", mainAddress) - .add("otherAddresses", otherAddresses) - .toString(); + return String.format("User(userId=%s, name=%s, mainAddress=%s, otherAddresses=%s)", + userId, name, mainAddress, otherAddresses); } } @@ -213,27 +209,23 @@ public boolean equals(Object other) { return true; if (other instanceof Address) { Address that = (Address) other; - return Objects.equal(this.street, that.street) && - Objects.equal(this.city, that.city) && - Objects.equal(this.zipCode, that.zipCode) && - Objects.equal(this.phones, that.phones); + return MoreObjects.equal(this.street, that.street) && + MoreObjects.equal(this.city, that.city) && + MoreObjects.equal(this.zipCode, that.zipCode) && + MoreObjects.equal(this.phones, that.phones); } return false; } @Override public int hashCode() { - return Objects.hashCode(this.street, this.city, this.zipCode, this.phones); + return MoreObjects.hashCode(this.street, this.city, this.zipCode, this.phones); } @Override public String toString() { - return Objects.toStringHelper(Address.class) - .add("street", street) - .add("city", city) - .add("zip", zipCode) - .add("phones", phones) - .toString(); + return String.format("Address(street=%s, city=%s, zip=%d, phones=%s)", + street, city, zipCode, phones); } } diff --git a/driver-tests/osgi/README.md b/driver-tests/osgi/README.md index 6a495a387a8..b01ed55f05f 100644 --- a/driver-tests/osgi/README.md +++ b/driver-tests/osgi/README.md @@ -45,6 +45,7 @@ configurations: 1. Default (default classifier with all dependencies) 2. Netty-Shaded (shaded classifier with all dependencies w/o Netty) -5. Guava 17 -6. Guava 18 -7. Guava 19 +3. Guava 17 +4. Guava 18 +5. Guava 19 +6. Guava 20 diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 8322b8923b9..25423e9adab 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -229,7 +229,7 @@ com.datastax.driver.osgi.api,!com.datastax.driver.osgi.impl com.datastax.driver.osgi.impl.Activator <_include>-osgi.bnd - + jar diff --git a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxMessage.java b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxMessage.java index e2b9055c07b..10ca08b12ee 100644 --- a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxMessage.java +++ b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxMessage.java @@ -15,12 +15,12 @@ */ package com.datastax.driver.osgi.api; +import com.datastax.driver.core.utils.MoreObjects; import com.datastax.driver.extras.codecs.date.SimpleTimestampCodec; import com.datastax.driver.mapping.annotations.ClusteringColumn; import com.datastax.driver.mapping.annotations.Column; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; -import com.google.common.base.Objects; import static com.datastax.driver.osgi.api.MailboxMessage.TABLE; @@ -94,13 +94,13 @@ public boolean equals(Object o) { if (o == null || getClass() != o.getClass()) return false; MailboxMessage that = (MailboxMessage) o; return date == that.date && - Objects.equal(recipient, that.recipient) && - Objects.equal(sender, that.sender) && - Objects.equal(body, that.body); + MoreObjects.equal(recipient, that.recipient) && + MoreObjects.equal(sender, that.sender) && + MoreObjects.equal(body, that.body); } @Override public int hashCode() { - return Objects.hashCode(recipient, date, sender, body); + return MoreObjects.hashCode(recipient, date, sender, body); } } diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava20IT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava20IT.java new file mode 100644 index 00000000000..833d71380f1 --- /dev/null +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava20IT.java @@ -0,0 +1,57 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.osgi; + +import com.datastax.driver.osgi.api.MailboxException; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.testng.listener.PaxExam; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +import static com.datastax.driver.osgi.BundleOptions.*; +import static org.ops4j.pax.exam.CoreOptions.options; + +@Listeners({CCMBridgeListener.class, PaxExam.class}) +public class MailboxServiceGuava20IT extends MailboxServiceTests { + + @Configuration + public Option[] guava20Config() { + return options( + defaultOptions(), + nettyBundles(), + guavaBundle().version("20.0"), + driverBundle(), + extrasBundle(), + mappingBundle(), + mailboxBundle() + ); + } + + /** + * Exercises a 'mailbox' service provided by an OSGi bundle that depends on the driver with + * Guava 20 explicitly enforced. + * + * @test_category packaging + * @expected_result Can create, retrieve and delete data using the mailbox service. + * @jira_ticket JAVA-620 + * @since 2.0.10, 2.1.5 + */ + @Test(groups = "short") + public void test_guava_20() throws MailboxException { + checkService(); + } +} diff --git a/manual/async/README.md b/manual/async/README.md index 7c71cfcd148..c834abbfe8a 100644 --- a/manual/async/README.md +++ b/manual/async/README.md @@ -133,6 +133,6 @@ There are still a few places where the driver will block internally * trying to read fields from a [query trace] will block if the trace hasn't been fetched already. -[ListenableFuture]: https://code.google.com/p/guava-libraries/wiki/ListenableFutureExplained +[ListenableFuture]: https://github.com/google/guava/wiki/ListenableFutureExplained [init]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.html#init-- [query trace]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/QueryTrace.html diff --git a/pom.xml b/pom.xml index 8a7b5a52e76..486b7ebfc11 100644 --- a/pom.xml +++ b/pom.xml @@ -50,7 +50,7 @@ 1.6 1.2.17 1.7.6 - 16.0.1 + 19.0 4.1.8.Final 3.1.2 1.1.2.6 @@ -247,7 +247,7 @@ https://docs.oracle.com/javase/8/docs/api/ - http://docs.guava-libraries.googlecode.com/git-history/v16.0.1/javadoc/ + https://google.github.io/guava/releases/19.0/api/docs/ http://netty.io/4.0/api/ http://www.joda.org/joda-time/apidocs/ diff --git a/upgrade_guide/README.md b/upgrade_guide/README.md index 53cb3d0c6d7..1cce9a7610d 100644 --- a/upgrade_guide/README.md +++ b/upgrade_guide/README.md @@ -116,7 +116,7 @@ We've also seized the opportunity to remove code that was deprecated in 2.1. for `null` inputs. 3. The driver now depends on Guava 16.0.1 (instead of 14.0.1). - This update has been mainly motivated by Guava's [Issue #1635](https://code.google.com/p/guava-libraries/issues/detail?id=1635), + This update has been mainly motivated by Guava's [Issue #1635](https://github.com/google/guava/issues/1635), which affects `TypeToken`, and hence all `TypeCodec` implementations handling parameterized types. 4. `UDTMapper` (the type previously used to convert `@UDT`-annotated From 3c965483f2bd32fb885bc295621124ff0a153748 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Wed, 8 Feb 2017 19:08:14 +0100 Subject: [PATCH 037/512] JAVA-1364: Enable creation of SslHandler with remote address information Motivation: SSLOptions do not currently allow to create SslHandler instances with remote address information. This is needed to instantiate SSLEngine/SslHandler with remote address information set, which enables doing hostname verification (for example through a custom TrustManager). We cannot take this information from SocketChannel since it is not connected yet at the time Connection.Initializer creates the SslHandler. Modifications: Create a child interface to SSLOptions, RemoteEndpointAwareSSLOptions, that exposes a new method to create SslHandler instances with remote address information. Modify Connection class so that it detects instances of RemoteEndpointAwareSSLOptions and calls the new method instead of the old one. Create subclasses for JdkSSLOptions and NettySSLOptions that implement RemoteEndpointAwareSSLOptions: RemoteEndpointAwareJdkSSLOptions and RemoteEndpointAwareNettySSLOptions. Deprecate SSLOptions and direct implementations. Result: Remote endpoint information is now available to implementors of RemoteEndpointAwareSSLOptions, and to the driver built-in implementations RemoteEndpointAwareJdkSSLOptions and RemoteEndpointAwareNettySSLOptions. This commit is based on original work by Tim Lamballais Tessensohn (@wimtie). It also contains contributions by Andrew Tolbert (@tolbertam) and Olivier Michallat (@olim7t). --- changelog/README.md | 1 + .../com/datastax/driver/core/Cluster.java | 4 +- .../com/datastax/driver/core/Connection.java | 6 +- .../datastax/driver/core/JdkSSLOptions.java | 15 +- .../datastax/driver/core/NettySSLOptions.java | 6 +- .../RemoteEndpointAwareJdkSSLOptions.java | 100 +++++++++++ .../RemoteEndpointAwareNettySSLOptions.java | 53 ++++++ .../core/RemoteEndpointAwareSSLOptions.java | 53 ++++++ .../com/datastax/driver/core/SSLOptions.java | 11 ++ .../driver/core/Jdk8SSLEncryptionTest.java | 170 ++++++++++++++++++ .../driver/core/SSLEncryptionTest.java | 1 + .../com/datastax/driver/core/SSLTestBase.java | 4 +- manual/ssl/README.md | 22 +-- pom.xml | 41 +++++ upgrade_guide/README.md | 11 ++ 15 files changed, 476 insertions(+), 22 deletions(-) create mode 100644 driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.java create mode 100644 driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.java create mode 100644 driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.java create mode 100644 driver-core/src/test/java/com/datastax/driver/core/Jdk8SSLEncryptionTest.java diff --git a/changelog/README.md b/changelog/README.md index baf1eb4efa8..7be7e782ec9 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -5,6 +5,7 @@ - [new feature] JAVA-1347: Add support for duration type. - [new feature] JAVA-1248: Implement "beta" flag for native protocol v5. - [new feature] JAVA-1362: Send query options flags as [int] for Protocol V5+. +- [new feature] JAVA-1364: Enable creation of SSLHandler with remote address information. - [improvement] JAVA-1367: Make protocol negotiation more resilient. - [bug] JAVA-1397: Handle duration as native datatype in protocol v5+. - [improvement] JAVA-1308: CodecRegistry performance improvements. diff --git a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java index 54cf8667179..4fd297d62ba 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java @@ -1173,7 +1173,7 @@ public Builder withoutMetrics() { * Enables the use of SSL for the created {@code Cluster}. *

    * Calling this method will use the JDK-based implementation with the default options - * (see {@link JdkSSLOptions.Builder}). + * (see {@link RemoteEndpointAwareJdkSSLOptions.Builder}). * This is thus a shortcut for {@code withSSL(JdkSSLOptions.builder().build())}. *

    * Note that if SSL is enabled, the driver will not connect to any @@ -1184,7 +1184,7 @@ public Builder withoutMetrics() { * @return this builder. */ public Builder withSSL() { - this.sslOptions = JdkSSLOptions.builder().build(); + this.sslOptions = RemoteEndpointAwareJdkSSLOptions.builder().build(); return this; } diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index 04727f8d388..ec697670a96 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -1425,7 +1425,11 @@ protected void initChannel(SocketChannel channel) throws Exception { ChannelPipeline pipeline = channel.pipeline(); if (sslOptions != null) { - pipeline.addLast("ssl", sslOptions.newSSLHandler(channel)); + if (sslOptions instanceof RemoteEndpointAwareSSLOptions) + pipeline.addLast("ssl", ((RemoteEndpointAwareSSLOptions) sslOptions).newSSLHandler(channel, connection.address)); + else + //noinspection deprecation + pipeline.addLast("ssl", sslOptions.newSSLHandler(channel)); } // pipeline.addLast("debug", new LoggingHandler(LogLevel.INFO)); diff --git a/driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java index b27635415ff..b616d22e456 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java @@ -24,7 +24,11 @@ /** * {@link SSLOptions} implementation based on built-in JDK classes. + * + * @deprecated Use {@link RemoteEndpointAwareJdkSSLOptions} instead. */ +@SuppressWarnings("DeprecatedIsStillUsed") +@Deprecated public class JdkSSLOptions implements SSLOptions { /** @@ -36,8 +40,8 @@ public static Builder builder() { return new Builder(); } - private final SSLContext context; - private final String[] cipherSuites; + protected final SSLContext context; + protected final String[] cipherSuites; /** * Creates a new instance. @@ -66,7 +70,7 @@ public SslHandler newSSLHandler(SocketChannel channel) { * @param channel the Netty channel for that connection. * @return the engine. */ - protected SSLEngine newSSLEngine(SocketChannel channel) { + protected SSLEngine newSSLEngine(@SuppressWarnings("unused") SocketChannel channel) { SSLEngine engine = context.createSSLEngine(); engine.setUseClientMode(true); if (cipherSuites != null) @@ -86,8 +90,8 @@ private static SSLContext makeDefaultContext() throws IllegalStateException { * Helper class to build JDK-based SSL options. */ public static class Builder { - private SSLContext context; - private String[] cipherSuites; + protected SSLContext context; + protected String[] cipherSuites; /** * Set the SSL context to use. @@ -124,6 +128,7 @@ public Builder withCipherSuites(String[] cipherSuites) { * * @return the new instance. */ + @SuppressWarnings("deprecation") public JdkSSLOptions build() { return new JdkSSLOptions(context, cipherSuites); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/NettySSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/NettySSLOptions.java index 41ed86b0181..b00cf264c56 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/NettySSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/NettySSLOptions.java @@ -23,9 +23,13 @@ * {@link SSLOptions} implementation based on Netty's SSL context. *

    * Netty has the ability to use OpenSSL if available, instead of the JDK's built-in engine. This yields better performance. + * + * @deprecated Use {@link RemoteEndpointAwareNettySSLOptions} instead. */ +@SuppressWarnings("DeprecatedIsStillUsed") +@Deprecated public class NettySSLOptions implements SSLOptions { - private final SslContext context; + protected final SslContext context; /** * Create a new instance from a given context. diff --git a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.java new file mode 100644 index 00000000000..fa2916bcc0c --- /dev/null +++ b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.java @@ -0,0 +1,100 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.ssl.SslHandler; + +import javax.net.ssl.SSLContext; +import javax.net.ssl.SSLEngine; +import java.net.InetSocketAddress; + +/** + * {@link RemoteEndpointAwareSSLOptions} implementation based on built-in JDK classes. + * + * @see JAVA-1364 + * @since 3.2.0 + */ +@SuppressWarnings("deprecation") +public class RemoteEndpointAwareJdkSSLOptions extends JdkSSLOptions implements RemoteEndpointAwareSSLOptions { + + /** + * Creates a builder to create a new instance. + * + * @return the builder. + */ + public static Builder builder() { + return new Builder(); + } + + /** + * Creates a new instance. + * + * @param context the SSL context. + * @param cipherSuites the cipher suites to use. + */ + protected RemoteEndpointAwareJdkSSLOptions(SSLContext context, String[] cipherSuites) { + super(context, cipherSuites); + } + + @Override + public SslHandler newSSLHandler(SocketChannel channel) { + throw new AssertionError("This class implements RemoteEndpointAwareSSLOptions, this method should not be called"); + } + + @Override + public SslHandler newSSLHandler(SocketChannel channel, InetSocketAddress remoteEndpoint) { + SSLEngine engine = newSSLEngine(channel, remoteEndpoint); + return new SslHandler(engine); + } + + /** + * Creates an SSL engine each time a connection is established. + *

    + * You might want to override this if you need to fine-tune the engine's configuration + * (for example enabling hostname verification). + * + * @param channel the Netty channel for that connection. + * @param remoteEndpoint the remote endpoint we are connecting to. + * @return the engine. + * @since 3.2.0 + */ + protected SSLEngine newSSLEngine(@SuppressWarnings("unused") SocketChannel channel, InetSocketAddress remoteEndpoint) { + SSLEngine engine = remoteEndpoint == null + ? context.createSSLEngine() + : context.createSSLEngine(remoteEndpoint.getHostName(), remoteEndpoint.getPort()); + engine.setUseClientMode(true); + if (cipherSuites != null) + engine.setEnabledCipherSuites(cipherSuites); + return engine; + } + + /** + * Helper class to build JDK-based SSL options. + */ + public static class Builder extends JdkSSLOptions.Builder { + + /** + * Builds a new instance based on the parameters provided to this builder. + * + * @return the new instance. + */ + @Override + public RemoteEndpointAwareJdkSSLOptions build() { + return new RemoteEndpointAwareJdkSSLOptions(context, cipherSuites); + } + } +} diff --git a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.java new file mode 100644 index 00000000000..6047c658cae --- /dev/null +++ b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.ssl.SslContext; +import io.netty.handler.ssl.SslHandler; + +import java.net.InetSocketAddress; + +/** + * {@link RemoteEndpointAwareSSLOptions} implementation based on Netty's SSL context. + *

    + * Netty has the ability to use OpenSSL if available, instead of the JDK's built-in engine. This yields better performance. + * + * @see JAVA-1364 + * @since 3.2.0 + */ +@SuppressWarnings("deprecation") +public class RemoteEndpointAwareNettySSLOptions extends NettySSLOptions implements RemoteEndpointAwareSSLOptions { + + /** + * Create a new instance from a given context. + * + * @param context the Netty context. {@code SslContextBuilder.forClient()} provides a fluent API to build it. + */ + public RemoteEndpointAwareNettySSLOptions(SslContext context) { + super(context); + } + + @Override + public SslHandler newSSLHandler(SocketChannel channel) { + throw new AssertionError("This class implements RemoteEndpointAwareSSLOptions, this method should not be called"); + } + + @Override + public SslHandler newSSLHandler(SocketChannel channel, InetSocketAddress remoteEndpoint) { + return context.newHandler(channel.alloc(), remoteEndpoint.getHostName(), remoteEndpoint.getPort()); + } +} diff --git a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.java new file mode 100644 index 00000000000..9a698e4e870 --- /dev/null +++ b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.java @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import io.netty.channel.socket.SocketChannel; +import io.netty.handler.ssl.SslHandler; + +import java.net.InetSocketAddress; + +/** + * Child interface to {@link SSLOptions} with the possibility to pass remote endpoint data + * when instantiating {@link SslHandler}s. + *

    + * This is needed when e.g. hostname verification is required. + * See JAVA-1364 for details. + *

    + * The reason this is a child interface is to keep {@link SSLOptions} backwards-compatible. + * This interface may be be merged into {@link SSLOptions} in a later major release. + * + * @see JAVA-1364 + * @since 3.2.0 + */ +public interface RemoteEndpointAwareSSLOptions extends SSLOptions { + + /** + * Creates a new SSL handler for the given Netty channel and the given remote endpoint. + *

    + * This gets called each time the driver opens a new connection to a Cassandra host. The newly created handler will be added + * to the channel's pipeline to provide SSL support for the connection. + *

    + * You don't necessarily need to implement this method directly; see the provided implementations: + * {@link RemoteEndpointAwareJdkSSLOptions} and {@link RemoteEndpointAwareNettySSLOptions}. + * + * @param channel the channel. + * @param remoteEndpoint the remote endpoint address. + * @return a newly-created {@link SslHandler}. + */ + SslHandler newSSLHandler(SocketChannel channel, InetSocketAddress remoteEndpoint); + +} diff --git a/driver-core/src/main/java/com/datastax/driver/core/SSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/SSLOptions.java index 00dd0551c5e..74b1a8dae55 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SSLOptions.java @@ -18,12 +18,19 @@ import io.netty.channel.socket.SocketChannel; import io.netty.handler.ssl.SslHandler; +import java.net.InetSocketAddress; + /** * Defines how the driver configures SSL connections. + *

    + * Note: since version 3.2.0, users are encouraged to implement + * {@link RemoteEndpointAwareSSLOptions} instead. * + * @see RemoteEndpointAwareSSLOptions * @see JdkSSLOptions * @see NettySSLOptions */ +@SuppressWarnings("deprecation") public interface SSLOptions { /** @@ -37,6 +44,10 @@ public interface SSLOptions { * * @param channel the channel. * @return the handler. + * @deprecated use {@link RemoteEndpointAwareSSLOptions#newSSLHandler(SocketChannel, InetSocketAddress)} instead. + * */ + @SuppressWarnings("DeprecatedIsStillUsed") + @Deprecated SslHandler newSSLHandler(SocketChannel channel); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/Jdk8SSLEncryptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/Jdk8SSLEncryptionTest.java new file mode 100644 index 00000000000..6c8fdf39fc9 --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/Jdk8SSLEncryptionTest.java @@ -0,0 +1,170 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import io.netty.handler.ssl.SslContextBuilder; +import org.testng.annotations.Test; + +import javax.net.ssl.*; +import java.net.Socket; +import java.security.*; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; + +import static com.datastax.driver.core.CreateCCM.TestMode.PER_METHOD; +import static io.netty.handler.ssl.SslProvider.OPENSSL; + +@CreateCCM(PER_METHOD) +@CCMConfig(auth = false) +public class Jdk8SSLEncryptionTest extends SSLTestBase { + + /** + * Validates that {@link RemoteEndpointAwareSSLOptions} implementations properly pass remote endpoint information + * to the underlying {@link SSLEngine} that is created. This is done by creating a custom {@link TrustManagerFactory} + * that inspects the peer information on the {@link SSLEngine} in + * {@link X509ExtendedTrustManager#checkServerTrusted(X509Certificate[], String, SSLEngine)} and throws a + * {@link CertificateException} if the peer host or port do not match. + *

    + * This test is prefixed with 'Jdk8' so it only runs against JDK 8+ runtimes. This is required because + * X509ExtendedTrustManager was added in JDK 7. Technically this would also run against JDK 7, but for simplicity + * we only run it against 8+. + * + * @test_category connection:ssl + * @jira_ticket JAVA-1364 + * @since 3.2.0 + */ + @Test(groups = "short", dataProvider = "sslImplementation", dataProviderClass = SSLTestBase.class) + public void should_pass_peer_address_to_engine(SslImplementation sslImplementation) throws Exception { + String expectedPeerHost = TestUtils.IP_PREFIX + "1"; + int expectedPeerPort = ccm().getBinaryPort(); + + EngineInspectingTrustManagerFactory tmf = new EngineInspectingTrustManagerFactory(expectedPeerHost, expectedPeerPort); + SSLOptions options = null; + switch (sslImplementation) { + case JDK: + SSLContext sslContext = SSLContext.getInstance("TLS"); + sslContext.init(null, tmf.getTrustManagers(), new SecureRandom()); + SSLParameters parameters = sslContext.getDefaultSSLParameters(); + parameters.setEndpointIdentificationAlgorithm("HTTPS"); + options = RemoteEndpointAwareJdkSSLOptions.builder().withSSLContext(sslContext).build(); + break; + case NETTY_OPENSSL: + SslContextBuilder builder = SslContextBuilder + .forClient() + .sslProvider(OPENSSL) + .trustManager(tmf); + + options = new RemoteEndpointAwareNettySSLOptions(builder.build()); + } + + connectWithSSLOptions(options); + } + + static class EngineInspectingTrustManagerFactory extends TrustManagerFactory { + + private static final Provider provider = new Provider("", 0.0, "") { + + }; + + final EngineInspectingTrustManagerFactorySpi spi; + + EngineInspectingTrustManagerFactory(String expectedPeerHost, int expectedPeerPort) { + this(new EngineInspectingTrustManagerFactorySpi(expectedPeerHost, expectedPeerPort)); + } + + private EngineInspectingTrustManagerFactory(EngineInspectingTrustManagerFactorySpi spi) { + super(spi, provider, "EngineInspectingTrustManagerFactory"); + this.spi = spi; + } + } + + static class EngineInspectingTrustManagerFactorySpi extends TrustManagerFactorySpi { + + String expectedPeerHost; + int expectedPeerPort; + + private final TrustManager tm = new X509ExtendedTrustManager() { + + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType, SSLEngine sslEngine) throws CertificateException { + // Capture peer address information and compare it to expectation. + String peerHost = sslEngine.getPeerHost(); + int peerPort = sslEngine.getPeerPort(); + if (peerHost == null || !peerHost.equals(expectedPeerHost)) { + throw new CertificateException(String.format("Expected SSLEngine.getPeerHost() (%s) to equal (%s)", peerHost, expectedPeerHost)); + } + if (peerPort != expectedPeerPort) { + throw new CertificateException(String.format("Expected SSLEngine.getPeerPort() (%d) to equal (%d)", peerPort, expectedPeerPort)); + } + } + + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType, Socket socket) throws CertificateException { + // no op + } + + @Override + public void checkServerTrusted(X509Certificate[] certs, String authType) throws CertificateException { + // no op + } + + @Override + public void checkClientTrusted(X509Certificate[] x509Certificates, String s, SSLEngine sslEngine) throws CertificateException { + // Since we are doing server trust only, this is a no op. + throw new UnsupportedOperationException("TrustManger is for establishing server trust only."); + + } + + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType, Socket socket) throws CertificateException { + // Since we are doing server trust only, this is a no op. + throw new UnsupportedOperationException("TrustManger is for establishing server trust only."); + } + + @Override + public void checkClientTrusted(X509Certificate[] certs, String authType) throws CertificateException { + // Since we are doing server trust only, this is a no op. + throw new UnsupportedOperationException("TrustManger is for establishing server trust only."); + } + + + @Override + public X509Certificate[] getAcceptedIssuers() { + return new X509Certificate[0]; + } + }; + + EngineInspectingTrustManagerFactorySpi(String expectedPeerHost, int expectedPeerPort) { + this.expectedPeerHost = expectedPeerHost; + this.expectedPeerPort = expectedPeerPort; + } + + @Override + protected void engineInit(KeyStore keyStore) throws KeyStoreException { + // no op + } + + @Override + protected void engineInit(ManagerFactoryParameters managerFactoryParameters) throws InvalidAlgorithmParameterException { + // no op + } + + @Override + protected TrustManager[] engineGetTrustManagers() { + return new TrustManager[]{tm}; + } + } +} diff --git a/driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java index 82e4ae27c34..36707fe7410 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java @@ -129,4 +129,5 @@ public void should_use_system_properties_with_default_ssl_options() throws Excep } } } + } diff --git a/driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java b/driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java index 08fb3e3ba14..9c342dc7486 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java @@ -119,7 +119,7 @@ public SSLOptions getSSLOptions(SslImplementation sslImplementation, boolean cli SSLContext sslContext = SSLContext.getInstance("TLS"); sslContext.init(kmf != null ? kmf.getKeyManagers() : null, tmf != null ? tmf.getTrustManagers() : null, new SecureRandom()); - return JdkSSLOptions.builder().withSSLContext(sslContext).build(); + return RemoteEndpointAwareJdkSSLOptions.builder().withSSLContext(sslContext).build(); case NETTY_OPENSSL: SslContextBuilder builder = SslContextBuilder @@ -131,7 +131,7 @@ public SSLOptions getSSLOptions(SslImplementation sslImplementation, boolean cli builder.keyManager(CCMBridge.DEFAULT_CLIENT_CERT_CHAIN_FILE, CCMBridge.DEFAULT_CLIENT_PRIVATE_KEY_FILE); } - return new NettySSLOptions(builder.build()); + return new RemoteEndpointAwareNettySSLOptions(builder.build()); default: fail("Unsupported SSL implementation: " + sslImplementation); return null; diff --git a/manual/ssl/README.md b/manual/ssl/README.md index 5b39a8112d3..cd462076f0c 100644 --- a/manual/ssl/README.md +++ b/manual/ssl/README.md @@ -71,7 +71,7 @@ if you've followed the steps for inter-node encryption). ### Driver configuration -The base class to configure SSL is [SSLOptions]. It's very generic, but +The base class to configure SSL is [RemoteEndpointAwareSSLOptions]. It's very generic, but you don't necessarily need to deal with it directly: the default instance, or the provided subclasses, might be enough for your needs. @@ -101,12 +101,12 @@ for specific details, like keystore locations and passwords: #### JSSE, programmatic If you need more control than what system properties allow, you can -configure SSL programmatically with [JdkSSLOptions]: +configure SSL programmatically with [RemoteEndpointAwareJdkSSLOptions]: ```java SSLContext sslContext = ... // create and configure SSL context -JdkSSLOptions sslOptions = JdkSSLOptions.builder() +RemoteEndpointAwareJdkSSLOptions sslOptions = RemoteEndpointAwareJdkSSLOptions.builder() .withSSLContext(context) .build(); @@ -117,14 +117,13 @@ Cluster cluster = Cluster.builder() ``` Note that you can also extend the class and override -[newSSLEngine(SocketChannel)][newSSLEngine] if you need specific +[newSSLEngine(SocketChannel,InetSocketAddress)][newSSLEngine] if you need specific configuration on the `SSLEngine` (for example hostname verification). -[newSSLEngine]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/JdkSSLOptions.html#newSSLEngine-io.netty.channel.socket.SocketChannel- #### Netty -[NettySSLOptions] allows you to use Netty's `SslContext` instead of +[RemoteEndpointAwareNettySSLOptions] allows you to use Netty's `SslContext` instead of the JDK directly. The advantage is that Netty can use OpenSSL directly, which provides better performance and generates less garbage. A disadvantage of using the OpenSSL provider is that it requires platform-specific dependencies, @@ -178,7 +177,7 @@ SslContextBuilder builder = SslContextBuilder // only if you use client authentication .keyManager(new File("client.crt"), new File("client.key")); -SSLOptions sslOptions = new NettySSLOptions(builder.build()); +SSLOptions sslOptions = new RemoteEndpointAwareNettySSLOptions(builder.build()); Cluster cluster = Cluster.builder() .addContactPoint("127.0.0.1") @@ -186,7 +185,8 @@ Cluster cluster = Cluster.builder() .build(); ``` -[SSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SSLOptions.html -[JdkSSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/JdkSSLOptions.html -[NettySSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/NettySSLOptions.html -[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/NettyOptions.html +[RemoteEndpointAwareSSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.html +[RemoteEndpointAwareJdkSSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html +[newSSLEngine]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html#newSSLEngine-io.netty.channel.socket.SocketChannel-java.net.InetSocketAddress- +[RemoteEndpointAwareNettySSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.html +[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/NettyOptions.html diff --git a/pom.xml b/pom.xml index 486b7ebfc11..76929b7f648 100644 --- a/pom.xml +++ b/pom.xml @@ -187,6 +187,47 @@ + + + legacy-jdks + + [,1.8) + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + **/Jdk8*.java + + + + + + maven-surefire-plugin + 2.16 + + + **/Jdk8*.java + + + + + + + diff --git a/upgrade_guide/README.md b/upgrade_guide/README.md index 1cce9a7610d..17cfba0be5e 100644 --- a/upgrade_guide/README.md +++ b/upgrade_guide/README.md @@ -3,6 +3,17 @@ The purpose of this guide is to detail changes made by successive versions of the Java driver. +### 3.2.0 + +The `SSLOptions` interface is now deprecated in favor of +`RemoteEndpointAwareSSLOptions`. +Similarly, the two existing implementations of that interface, +`JdkSSLOptions` and `NettySSLOptions`, +are now deprecated in favor of `RemoteEndpointAwareJdkSSLOptions` +and `RemoteEndpointAwareNettySSLOptions` respectively (see +[JAVA-1364](https://datastax-oss.atlassian.net/browse/JAVA-1364)). + + ### 3.1.0 This version introduces an important change in the default retry behavior: statements that are not idempotent are not From cac95b8fcbfef0d133bfc8b16bb97905a08c20a0 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Thu, 16 Feb 2017 14:51:42 +0100 Subject: [PATCH 038/512] Deprecate DSE-specific host metadata in OSS driver --- .../main/java/com/datastax/driver/core/Host.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/driver-core/src/main/java/com/datastax/driver/core/Host.java b/driver-core/src/main/java/com/datastax/driver/core/Host.java index 4511bf6da21..02adff2d2f9 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Host.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Host.java @@ -261,7 +261,12 @@ public VersionNumber getCassandraVersion() { * possibility. * * @return the DSE version the host is running. + * @deprecated Please use the + * Java driver for DSE + * if you are connecting to a DataStax Enterprise (DSE) cluster. + * This method might not function properly with future versions of DSE. */ + @Deprecated public VersionNumber getDseVersion() { return dseVersion; } @@ -274,7 +279,12 @@ public VersionNumber getDseVersion() { * possibility. * * @return the DSE workload the host is running. + * @deprecated Please use the + * Java driver for DSE + * if you are connecting to a DataStax Enterprise (DSE) cluster. + * This method might not function properly with future versions of DSE. */ + @Deprecated public String getDseWorkload() { return dseWorkload; } @@ -283,7 +293,12 @@ public String getDseWorkload() { * Returns whether the host is running DSE Graph. * * @return whether the node is running DSE Graph. + * @deprecated Please use the + * Java driver for DSE + * if you are connecting to a DataStax Enterprise (DSE) cluster. + * This method might not function properly with future versions of DSE. */ + @Deprecated public boolean isDseGraphEnabled() { return dseGraphEnabled; } From 0dbfaab79ff0d8e0dcc94cd417e182f806238a5b Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Fri, 17 Feb 2017 17:57:46 +0100 Subject: [PATCH 039/512] JAVA-1247: Disable idempotence warnings (#810) In 3.1.0, we added a warning when the first non-idempotent statement is not retried (see JAVA-1225), as a way to ease the transition to the new behavior. By 3.2.0 users should be more familiar with this, so this commit removes the warning. --- changelog/README.md | 1 + .../datastax/driver/core/RequestHandler.java | 17 ++++------------- upgrade_guide/README.md | 4 ++++ 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 7be7e782ec9..3188890a6bd 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -13,6 +13,7 @@ - [improvement] JAVA-1287: Add CDC to TableOptionsMetadata and Schema Builder. - [improvement] JAVA-1392: Reduce lock contention in RPTokenFactory. - [improvement] JAVA-1328: Provide compatibility with Guava 20. +- [improvement] JAVA-1247: Disable idempotence warnings. Merged from 3.1.x branch: diff --git a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java index 4caa81c5f71..c68f76a0168 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java @@ -34,7 +34,10 @@ import java.util.Iterator; import java.util.List; import java.util.Set; -import java.util.concurrent.*; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import java.util.concurrent.atomic.AtomicInteger; import java.util.concurrent.atomic.AtomicReference; @@ -45,7 +48,6 @@ */ class RequestHandler { private static final Logger logger = LoggerFactory.getLogger(RequestHandler.class); - private static final AtomicBoolean WARNED_IDEMPOTENT = new AtomicBoolean(); final String id; @@ -377,7 +379,6 @@ private RetryPolicy.RetryDecision computeRetryDecisionOnRequestError(DriverExcep if (statement.isIdempotentWithDefault(manager.cluster.getConfiguration().getQueryOptions())) { decision = retryPolicy().onRequestError(statement, request().consistency(), exception, retriesByPolicy); } else { - logIdempotenceWarning(); decision = RetryPolicy.RetryDecision.rethrow(); } if (metricsEnabled()) { @@ -537,7 +538,6 @@ public void onSet(Connection connection, Message.Response response, long latency wte.getReceivedAcknowledgements(), retriesByPolicy); else { - logIdempotenceWarning(); retry = RetryPolicy.RetryDecision.rethrow(); } if (metricsEnabled()) { @@ -800,15 +800,6 @@ private void setFinalResult(Connection connection, Message.Response response) { } } - private void logIdempotenceWarning() { - if (WARNED_IDEMPOTENT.compareAndSet(false, true)) - logger.warn("Not retrying statement because it is not idempotent (this message will be logged only once). " + - "Note that this version of the driver changes the default retry behavior for non-idempotent " + - "statements: they won't be automatically retried anymore. The driver marks statements " + - "non-idempotent by default, so you should explicitly call setIdempotent(true) if your statements " + - "are safe to retry. See http://goo.gl/4HrSby for more details."); - } - /** * The state of a SpeculativeExecution. *

    diff --git a/upgrade_guide/README.md b/upgrade_guide/README.md index 17cfba0be5e..003acfdbff2 100644 --- a/upgrade_guide/README.md +++ b/upgrade_guide/README.md @@ -13,6 +13,10 @@ are now deprecated in favor of `RemoteEndpointAwareJdkSSLOptions` and `RemoteEndpointAwareNettySSLOptions` respectively (see [JAVA-1364](https://datastax-oss.atlassian.net/browse/JAVA-1364)). +In 3.1.0, the driver would log a warning the first time it would skip +a retry for a non-idempotent request; this warning has now been +removed as users should now have adjusted their applications accordingly. + ### 3.1.0 From 202770e0fa07c91a3f4a44f3652c4edc456ad396 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Mon, 13 Feb 2017 14:19:26 -0600 Subject: [PATCH 040/512] Remove ambiguity in Cassandra and DSE versions Motivation: Originally CCMBridge was developed targeting running Apache Cassandra clusters using CCM. Over time this has changed to also work with DataStax Enterprise. There are some cases where there was ambiguity with regards to whether the DSE or Cassandra version was used. This attempts to fix this. Also, there were some places where the globally configured Cassandra/DSE version was used (passed in via -Dcassandra.version) instead of a locally configured one for a particular test. This commit also fixes this. In Addition, TestUtils.getDesiredProtocolVersion was made available to determine the ProtocolVersion to use based on the globally configured Cassandra version. This functionality has been moved to CCMAccess, so one can get the ProtocolVersion tied to the version of Cassandra used scoped to the test. Finally, update default cassandra.version used in tests to 3.10. Modifications: Break out CCMAccess.getVersion() into two methods, CCMAccess.getCassandraVersion() and CCMAccess.getDSEVersion(). If DSE is not configured getDSEVersion() returns null, if it is configured getCassandraVersion() returns the mapped version of Cassandra from DSE. Move TestUtils.getDesiredProtocolVersion to CCMAccess. Rename CCMBridge.CASSANDRA_VERSION to CCMBridge.INPUT_CASSANDRA_VERSION. Add CCMBridge.CASSANDRA_VERSION_NUMBER and CCMBridge.DSE_VERSION_NUMBER. Rename CCMBridge.getCassandraVersion() and getDSEVersion() to CCMBridge.getGlobalCassandraVersion() and CCMBridge.getGlobalDSEVersion(). These methods return VersionNumber instead of String. Result: Ambiguity removed between Cassandra and DSE versions. Annotations that call out CCM remain unchanged. --- .../driver/core/AggregateMetadataTest.java | 4 +- .../driver/core/AuthenticationTest.java | 2 +- .../com/datastax/driver/core/CCMAccess.java | 29 +- .../com/datastax/driver/core/CCMBridge.java | 316 +++++++++--------- .../com/datastax/driver/core/CCMCache.java | 19 +- .../datastax/driver/core/CCMTestsSupport.java | 55 ++- .../core/DataTypeClassNameParserTest.java | 2 +- .../driver/core/DataTypeIntegrationTest.java | 38 ++- .../datastax/driver/core/DataTypeTest.java | 2 +- .../core/GettableDataIntegrationTest.java | 2 +- .../core/HostMetadataIntegrationTest.java | 43 --- .../driver/core/IndexMetadataTest.java | 10 +- .../driver/core/PreparedStatementTest.java | 15 +- .../driver/core/PrimitiveTypeSamples.java | 6 +- .../datastax/driver/core/QueryLoggerTest.java | 84 ++--- .../driver/core/RecommissionedNodeTest.java | 3 +- .../driver/core/ReconnectionTest.java | 4 +- .../core/SchemaRefreshDebouncerTest.java | 2 +- .../core/SimpleStatementIntegrationTest.java | 4 +- .../driver/core/StatementIdempotenceTest.java | 2 +- .../datastax/driver/core/TestListener.java | 7 +- .../com/datastax/driver/core/TestUtils.java | 31 +- .../com/datastax/driver/core/TupleTest.java | 23 +- .../datastax/driver/core/TypeCodecAssert.java | 2 +- .../datastax/driver/core/UserTypesTest.java | 16 +- .../datastax/driver/osgi/BundleOptions.java | 2 +- pom.xml | 2 +- 27 files changed, 357 insertions(+), 368 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java index 7129ebe6484..abf84a30ad2 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java @@ -185,7 +185,7 @@ public void should_parse_and_format_aggregate_with_udts() { @Test(groups = "short") @CassandraVersion("2.2.0") public void should_parse_and_format_aggregate_with_composite_type_literal_initcond() { - VersionNumber ver = VersionNumber.parse(CCMBridge.getCassandraVersion()); + VersionNumber ver = ccm().getCassandraVersion(); if (ver.getMajor() == 3) { if ((ver.getMinor() >= 1 && ver.getMinor() < 4) || (ver.getMinor() == 0 && ver.getPatch() < 4)) { throw new SkipException("Requires C* 2.2.X, 3.0.4+ or 3.4.X+"); @@ -206,7 +206,7 @@ public void should_parse_and_format_aggregate_with_composite_type_literal_initco @Test(groups = "short") @CassandraVersion("3.4") public void should_parse_and_format_aggregate_with_composite_type_hex_initcond() { - VersionNumber ver = VersionNumber.parse(CCMBridge.getCassandraVersion()); + VersionNumber ver = ccm().getCassandraVersion(); if ((ver.getMinor() >= 1 && ver.getMinor() < 4)) { throw new SkipException("Requires 3.0.4+ or 3.4.X+"); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java b/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java index d7dce31d41a..41a1e4e1a97 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java @@ -41,7 +41,7 @@ public class AuthenticationTest extends CCMTestsSupport { public void sleepIf12() { // For C* 1.2, sleep before attempting to connect as there is a small delay between // user being created. - if (ccm().getVersion().getMajor() < 2) { + if (ccm().getCassandraVersion().getMajor() < 2) { Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java b/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java index 81dbb950975..6aa01f196c8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java @@ -32,13 +32,21 @@ enum Workload {cassandra, solr, hadoop, spark, cfs, graph} String getClusterName(); /** - * Returns the Cassandra version of this CCM cluster. + * Returns the Cassandra version of this CCM cluster. If {@link #getDSEVersion()} is non-null it is assumed + * that this value is only used for representing the compatible Cassandra version for that DSE version. *

    - * By default the version is equal to {@link CCMBridge#getCassandraVersion()}. * * @return The version of this CCM cluster. */ - VersionNumber getVersion(); + VersionNumber getCassandraVersion(); + + /** + * Returns the DSE version of this CCM cluster if this is a DSE cluster, otherwise null. + *

    + * + * @return The version of this CCM cluster. + */ + VersionNumber getDSEVersion(); /** * @return The config directory for this CCM cluster. @@ -236,4 +244,19 @@ enum Workload {cassandra, solr, hadoop, spark, cfs, graph} */ void waitForDown(int node); + /** + * @return The target protocolVersion to use when connecting to this CCM cluster. + *

    + * This should be based on the highest protocol version that both the cluster and driver support. + *

    + * For example, C* 2.0.17 should return {@link ProtocolVersion#V2} since C* supports up to V2 and the driver + * supports that version. + */ + ProtocolVersion getProtocolVersion(); + + /** + * @param maximumAllowed The maximum protocol version to use. + * @return The target protocolVersion or maximumAllowed if {@link #getProtocolVersion} is greater. + */ + ProtocolVersion getProtocolVersion(ProtocolVersion maximumAllowed); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java index f32bf34bce1..8b800ac85f0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java @@ -40,11 +40,11 @@ public class CCMBridge implements CCMAccess { private static final Logger logger = LoggerFactory.getLogger(CCMBridge.class); - private static final String CASSANDRA_VERSION; + private static final VersionNumber GLOBAL_CASSANDRA_VERSION_NUMBER; - private static final Set CASSANDRA_INSTALL_ARGS; + private static final VersionNumber GLOBAL_DSE_VERSION_NUMBER; - private static final boolean IS_DSE; + private static final Set CASSANDRA_INSTALL_ARGS; public static final String DEFAULT_CLIENT_TRUSTSTORE_PASSWORD = "cassandra1sfun"; public static final String DEFAULT_CLIENT_TRUSTSTORE_PATH = "/client.truststore"; @@ -81,8 +81,8 @@ public class CCMBridge implements CCMAccess { private static final Map ENVIRONMENT_MAP; /** - * A mapping of full DSE versions to their C* counterpart. This is not meant to be comprehensive. Used by - * {@link #getCassandraVersion()}. If C* version cannot be derived, the method makes a 'best guess'. + * A mapping of full DSE versions to their C* counterpart. This is not meant to be comprehensive. + * If C* version cannot be derived, the method makes a 'best guess'. */ private static final Map dseToCassandraVersions = ImmutableMap.builder() .put("5.0.4", "3.0.10") @@ -144,14 +144,14 @@ public class CCMBridge implements CCMAccess { private static final String CCM_COMMAND; static { - CASSANDRA_VERSION = System.getProperty("cassandra.version"); + String inputCassandraVersion = System.getProperty("cassandra.version"); String installDirectory = System.getProperty("cassandra.directory"); String branch = System.getProperty("cassandra.branch"); String dseProperty = System.getProperty("dse"); // If -Ddse, if the value is empty interpret it as enabled, // otherwise if there is a value, parse as boolean. - IS_DSE = dseProperty != null && (dseProperty.isEmpty() || Boolean.parseBoolean(dseProperty)); + boolean isDse = dseProperty != null && (dseProperty.isEmpty() || Boolean.parseBoolean(dseProperty)); ImmutableSet.Builder installArgs = ImmutableSet.builder(); if (installDirectory != null && !installDirectory.trim().isEmpty()) { @@ -159,10 +159,10 @@ public class CCMBridge implements CCMAccess { } else if (branch != null && !branch.trim().isEmpty()) { installArgs.add("-v git:" + branch.trim().replaceAll("\"", "")); } else { - installArgs.add("-v " + CASSANDRA_VERSION); + installArgs.add("-v " + inputCassandraVersion); } - if (IS_DSE) { + if (isDse) { installArgs.add("--dse"); } @@ -193,12 +193,57 @@ public class CCMBridge implements CCMAccess { } ENVIRONMENT_MAP = ImmutableMap.copyOf(envMap); - if (CCMBridge.isDSE()) { + if (isDse) { + GLOBAL_DSE_VERSION_NUMBER = VersionNumber.parse(inputCassandraVersion); + GLOBAL_CASSANDRA_VERSION_NUMBER = CCMBridge.getCassandraVersion(GLOBAL_DSE_VERSION_NUMBER); logger.info("Tests requiring CCM will by default use DSE version {} (C* {}, install arguments: {})", - CCMBridge.getDSEVersion(), CCMBridge.getCassandraVersion(), CCMBridge.getInstallArguments()); + GLOBAL_DSE_VERSION_NUMBER, GLOBAL_CASSANDRA_VERSION_NUMBER, CASSANDRA_INSTALL_ARGS); } else { + GLOBAL_CASSANDRA_VERSION_NUMBER = VersionNumber.parse(inputCassandraVersion); + GLOBAL_DSE_VERSION_NUMBER = null; logger.info("Tests requiring CCM will by default use Cassandra version {} (install arguments: {})", - CCMBridge.getCassandraVersion(), CCMBridge.getInstallArguments()); + GLOBAL_CASSANDRA_VERSION_NUMBER, CASSANDRA_INSTALL_ARGS); + } + } + + /** + * @return {@link VersionNumber} configured for Cassandra based on system properties. + */ + public static VersionNumber getGlobalCassandraVersion() { + return GLOBAL_CASSANDRA_VERSION_NUMBER; + } + + /** + * @return {@link VersionNumber} configured for DSE based on system properties. + */ + public static VersionNumber getGlobalDSEVersion() { + return GLOBAL_DSE_VERSION_NUMBER; + } + + /** + * @return The mapped cassandra version to the given dseVersion. + * If the DSE version can't be derived the following logic is used: + *

      + *
    1. If <= 3.X, use C* 1.2
    2. + *
    3. If 4.X, use 2.1 for >= 4.7, 2.0 otherwise.
    4. + *
    5. Otherwise 3.0
    6. + *
    + */ + public static VersionNumber getCassandraVersion(VersionNumber dseVersion) { + String cassandraVersion = dseToCassandraVersions.get(dseVersion.toString()); + if (cassandraVersion != null) { + return VersionNumber.parse(cassandraVersion); + } else if (dseVersion.getMajor() <= 3) { + return VersionNumber.parse("1.2"); + } else if (dseVersion.getMajor() == 4) { + if (dseVersion.getMinor() >= 7) { + return VersionNumber.parse("2.1"); + } else { + return VersionNumber.parse("2.0"); + } + } else { + // Fallback on 3.0 by default. + return VersionNumber.parse("3.0"); } } @@ -215,7 +260,9 @@ public static boolean isWindows() { private final String clusterName; - private final VersionNumber version; + private final VersionNumber cassandraVersion; + + private final VersionNumber dseVersion; private final int storagePort; @@ -237,106 +284,20 @@ public static boolean isWindows() { private final int[] nodes; - private CCMBridge(String clusterName, boolean isDSE, VersionNumber version, int storagePort, int thriftPort, int binaryPort, String jvmArgs, int[] nodes) { + private CCMBridge(String clusterName, VersionNumber cassandraVersion, VersionNumber dseVersion, + int storagePort, int thriftPort, int binaryPort, String jvmArgs, int[] nodes) { this.clusterName = clusterName; - this.version = version; + this.cassandraVersion = cassandraVersion; + this.dseVersion = dseVersion; this.storagePort = storagePort; this.thriftPort = thriftPort; this.binaryPort = binaryPort; - this.isDSE = isDSE; + this.isDSE = dseVersion != null; this.jvmArgs = jvmArgs; this.nodes = nodes; this.ccmDir = Files.createTempDir(); } - /** - * @return The configured cassandra version. If -Ddse=true was used, this value is derived from the - * DSE version provided. If the DSE version can't be derived the following logic is used: - *
      - *
    1. If <= 3.X, use C* 1.2
    2. - *
    3. If 4.X, use 2.1 for >= 4.7, 2.0 otherwise.
    4. - *
    5. Otherwise 3.0
    6. - *
    - */ - public static String getCassandraVersion() { - if (isDSE()) { - String cassandraVersion = dseToCassandraVersions.get(CASSANDRA_VERSION); - if (cassandraVersion != null) { - return cassandraVersion; - } else if (CASSANDRA_VERSION.startsWith("3.") || CASSANDRA_VERSION.compareTo("3") <= 0) { - return "1.2"; - } else if (CASSANDRA_VERSION.startsWith("4.")) { - if (CASSANDRA_VERSION.compareTo("4.7") >= 0) { - return "2.1"; - } else { - return "2.0"; - } - } else { - // Fallback on 3.0 by default. - return "3.0"; - } - - } else { - return CASSANDRA_VERSION; - } - } - - /** - * @return {@link VersionNumber} representation of {@link CCMBridge#getCassandraVersion()} - */ - public static VersionNumber getCassandraVersionNumber() { - return VersionNumber.parse(getCassandraVersion()); - } - - /** - * @param compareVersion The given version to compare with. - * @return Whether or not the configured cassandra version is greater than or equal to the given version. - */ - public static boolean isCassandraVersionAtLeast(String compareVersion) { - return getCassandraVersionNumber().compareTo(VersionNumber.parse(compareVersion)) >= 0; - } - - /** - * @return The configured DSE version if '-Ddse=true' specified, otherwise null. - */ - public static String getDSEVersion() { - if (isDSE()) { - return CASSANDRA_VERSION; - } else { - return null; - } - } - - /** - * @return {@link VersionNumber} representation of {@link CCMBridge#getDSEVersion()} - */ - public static VersionNumber getDSEVersionNumber() { - return VersionNumber.parse(getDSEVersion()); - } - - /** - * @param compareVersion The given version to compare with. - * @return Whether or not the configured dse version is greater than or equal to the given version. - */ - public static boolean isDSEVersionAtLeast(String compareVersion) { - VersionNumber dseVersion = getDSEVersionNumber(); - return dseVersion != null && dseVersion.compareTo(VersionNumber.parse(compareVersion)) >= 0; - } - - /** - * @return Whether or not DSE was configured via '-Ddse=true'. - */ - public static boolean isDSE() { - return IS_DSE; - } - - /** - * @return The install arguments to pass to CCM when creating the cluster. - */ - public static Set getInstallArguments() { - return CASSANDRA_INSTALL_ARGS; - } - public static Builder builder() { return new Builder(); } @@ -352,8 +313,13 @@ public InetSocketAddress addressOfNode(int n) { } @Override - public VersionNumber getVersion() { - return version; + public VersionNumber getCassandraVersion() { + return cassandraVersion; + } + + @Override + public VersionNumber getDSEVersion() { + return dseVersion; } @Override @@ -435,7 +401,7 @@ public void run() { private String getStartWaitArguments() { // make a small exception for C* 1.2 as it has a bug where it starts listening on the binary // interface slightly before it joins the cluster. - if (getCassandraVersion().startsWith("1.")) { + if (this.cassandraVersion.getMajor() == 1) { return " --wait-other-notice"; } else { return " --no-wait"; @@ -450,7 +416,7 @@ public synchronized void start() { logger.debug("Starting: {} - free memory: {} MB", this, TestUtils.getFreeMemoryMB()); try { String cmd = CCM_COMMAND + " start " + jvmArgs + getStartWaitArguments(); - if (isWindows() && this.version.compareTo(VersionNumber.parse("2.2.4")) >= 0) { + if (isWindows() && this.cassandraVersion.compareTo(VersionNumber.parse("2.2.4")) >= 0) { cmd += " --quiet-windows"; } execute(cmd); @@ -524,7 +490,7 @@ public void start(int n) { logger.debug(String.format("Starting: node %s (%s%s:%s) in %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); try { String cmd = CCM_COMMAND + " node%d start " + jvmArgs + getStartWaitArguments(); - if (isWindows() && this.version.compareTo(VersionNumber.parse("2.2.4")) >= 0) { + if (isWindows() && this.cassandraVersion.compareTo(VersionNumber.parse("2.2.4")) >= 0) { cmd += " --quiet-windows"; } execute(cmd, n); @@ -582,7 +548,7 @@ public void decommission(int n) { logger.debug(String.format("Decommissioning: node %s (%s%s:%s) from %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); // Special case for C* 3.12+, DSE 5.1+, force decommission (see CASSANDRA-12510) String cmd = CCM_COMMAND + " node%d decommission"; - if ((!isDSE() && isCassandraVersionAtLeast("3.12")) || (isDSE() && isDSEVersionAtLeast("5.1"))) { + if (this.cassandraVersion.compareTo(VersionNumber.parse("3.12")) >= 0) { cmd += " --force"; } execute(cmd, n); @@ -724,6 +690,26 @@ public void waitForDown(int node) { TestUtils.waitUntilPortIsDown(addressOfNode(node)); } + @Override + public ProtocolVersion getProtocolVersion() { + VersionNumber version = getCassandraVersion(); + if (version.compareTo(VersionNumber.parse("2.0")) < 0) { + return ProtocolVersion.V1; + } else if (version.compareTo(VersionNumber.parse("2.1")) < 0) { + return ProtocolVersion.V2; + } else if (version.compareTo(VersionNumber.parse("2.2")) < 0) { + return ProtocolVersion.V3; + } else { + return ProtocolVersion.V4; + } + } + + @Override + public ProtocolVersion getProtocolVersion(ProtocolVersion maximumAllowed) { + ProtocolVersion versionToUse = getProtocolVersion(); + return versionToUse.compareTo(maximumAllowed) > 0 ? maximumAllowed : versionToUse; + } + /** *

    * Extracts a keystore from the classpath into a temporary file. @@ -782,9 +768,9 @@ public static class Builder { int[] nodes = {1}; private boolean start = true; - private Boolean isDSE = null; - private String version = getCassandraVersion(); - private Set createOptions = new LinkedHashSet(getInstallArguments()); + private boolean dse = false; + private VersionNumber version = null; + private Set createOptions = new LinkedHashSet(); private Set jvmArgs = new LinkedHashSet(); private final Map cassandraConfiguration = Maps.newLinkedHashMap(); private final Map dseConfiguration = Maps.newLinkedHashMap(); @@ -840,41 +826,24 @@ public Builder notStarted() { } /** - * Sets this cluster to be a DSE cluster (defaults to {@link #isDSE()} if this is never called). - */ - public Builder withDSE() { - this.isDSE = true; - return this; - } - - /** - * Sets this cluster to be a non-DSE cluster (defaults to {@link #isDSE()} if this is never called). + * The Cassandra or DSE version to use. If not specified the globally configured version is used instead. */ - public Builder withoutDSE() { - this.isDSE = false; + public Builder withVersion(VersionNumber version) { + this.version = version; return this; } /** - * The Cassandra or DSE version to use (defaults to {@link #getCassandraVersion()} if this is never called). + * Indicates whether or not this cluster is meant to be a DSE cluster. */ - public Builder withVersion(String version) { - Iterator it = createOptions.iterator(); - while (it.hasNext()) { - String option = it.next(); - // remove any version previously set and - // install-dir, which is incompatible - if (option.startsWith("-v ") || option.startsWith("--install-dir")) - it.remove(); - } - this.createOptions.add("-v " + version); - this.version = version; + public Builder withDSE(boolean dse) { + this.dse = dse; return this; } /** * Free-form options that will be added at the end of the {@code ccm create} command - * (defaults to {@link #getInstallArguments()} if this is never called). + * (defaults to {@link #CASSANDRA_INSTALL_ARGS} if this is never called). */ public Builder withCreateOptions(String... createOptions) { Collections.addAll(this.createOptions, createOptions); @@ -937,20 +906,36 @@ public Builder withWorkload(int node, Workload... workload) { public CCMBridge build() { // be careful NOT to alter internal state (hashCode/equals) during build! String clusterName = TestUtils.generateIdentifier("ccm_"); - boolean dse = isDSE == null ? isDSE() : isDSE; + + + VersionNumber dseVersion; + VersionNumber cassandraVersion; + boolean versionConfigured = this.version != null; + // No version was explicitly provided, fallback on global config. + if (!versionConfigured) { + dseVersion = GLOBAL_DSE_VERSION_NUMBER; + cassandraVersion = GLOBAL_CASSANDRA_VERSION_NUMBER; + } else if (dse) { + // given version is the DSE version, base cassandra version on DSE version. + dseVersion = this.version; + cassandraVersion = getCassandraVersion(dseVersion); + } else { + // given version is cassandra version. + dseVersion = null; + cassandraVersion = this.version; + } Map cassandraConfiguration = randomizePorts(this.cassandraConfiguration); - VersionNumber version = VersionNumber.parse(this.version); int storagePort = Integer.parseInt(cassandraConfiguration.get("storage_port").toString()); int thriftPort = Integer.parseInt(cassandraConfiguration.get("rpc_port").toString()); int binaryPort = Integer.parseInt(cassandraConfiguration.get("native_transport_port").toString()); - if (!isThriftSupported(dse, version)) { + if (!isThriftSupported(cassandraVersion)) { // remove thrift configuration cassandraConfiguration.remove("start_rpc"); cassandraConfiguration.remove("rpc_port"); cassandraConfiguration.remove("thrift_prepared_statements_cache_size_mb"); } - final CCMBridge ccm = new CCMBridge(clusterName, dse, version, storagePort, thriftPort, binaryPort, joinJvmArgs(), nodes); + final CCMBridge ccm = new CCMBridge(clusterName, cassandraVersion, dseVersion, storagePort, thriftPort, binaryPort, joinJvmArgs(), nodes); Runtime.getRuntime().addShutdownHook(new Thread() { @Override @@ -958,12 +943,12 @@ public void run() { ccm.close(); } }); - ccm.execute(buildCreateCommand(clusterName, dse)); + ccm.execute(buildCreateCommand(clusterName, versionConfigured, cassandraVersion, dseVersion)); updateNodeConf(ccm); ccm.updateConfig(cassandraConfiguration); - if (dse) { + if (dseVersion != null) { Map dseConfiguration = Maps.newLinkedHashMap(this.dseConfiguration); - if (dse && version.getMajor() >= 5) { + if (dseVersion.getMajor() >= 5) { // randomize DSE specific ports if dse present and greater than 5.0 dseConfiguration.put("lease_netty_server_port", RANDOM_PORT); dseConfiguration.put("internode_messaging_options.port", RANDOM_PORT); @@ -980,8 +965,8 @@ public void run() { return ccm; } - private static boolean isThriftSupported(boolean dse, VersionNumber version) { - return dse || version.compareTo(VersionNumber.parse("4.0")) < 0; + private static boolean isThriftSupported(VersionNumber cassandraVersion) { + return cassandraVersion.compareTo(VersionNumber.parse("4.0")) < 0; } public int weight() { @@ -1007,7 +992,7 @@ private String joinJvmArgs() { return allJvmArgs.toString(); } - private String buildCreateCommand(String clusterName, boolean dse) { + private String buildCreateCommand(String clusterName, boolean versionConfigured, VersionNumber cassandraVersion, VersionNumber dseVersion) { StringBuilder result = new StringBuilder(CCM_COMMAND + " create"); result.append(" ").append(clusterName); result.append(" -i ").append(TestUtils.IP_PREFIX); @@ -1022,16 +1007,18 @@ private String buildCreateCommand(String clusterName, boolean dse) { } } - // If not DSE, remove --dse if in createOptions. Set lCreateOptions = new LinkedHashSet(createOptions); - if (!dse) { - Iterator it = lCreateOptions.iterator(); - while (it.hasNext()) { - String option = it.next(); - // remove any version previously set and - // install-dir, which is incompatible - if (option.equals("--dse")) - it.remove(); + if (!versionConfigured) { + // If no version was provided, use the default install ags. + lCreateOptions.addAll(CASSANDRA_INSTALL_ARGS); + } else { + if (dseVersion != null) { + lCreateOptions.add("--dse"); + lCreateOptions.add("-v"); + lCreateOptions.add(dseVersion.toString()); + } else { + lCreateOptions.add("-v"); + lCreateOptions.add(cassandraVersion.toString()); } } result.append(" ").append(Joiner.on(" ").join(randomizePorts(lCreateOptions))); @@ -1120,14 +1107,15 @@ private String randomizePorts(CharSequence str) { @Override @SuppressWarnings("SimplifiableIfStatement") public boolean equals(Object o) { - // do not include cluster name and start, only - // properties relevant to the settings of the cluster + // do not include start as it is not relevant to the settings of the cluster. if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; + Builder builder = (Builder) o; + + if (dse != builder.dse) return false; if (!Arrays.equals(nodes, builder.nodes)) return false; - if (isDSE != null ? !isDSE.equals(builder.isDSE) : builder.isDSE != null) return false; - if (!version.equals(builder.version)) return false; + if (version != null ? !version.equals(builder.version) : builder.version != null) return false; if (!createOptions.equals(builder.createOptions)) return false; if (!jvmArgs.equals(builder.jvmArgs)) return false; if (!cassandraConfiguration.equals(builder.cassandraConfiguration)) return false; @@ -1137,19 +1125,17 @@ public boolean equals(Object o) { @Override public int hashCode() { - // do not include cluster name and start, only - // properties relevant to the settings of the cluster + // do not include start as it is not relevant to the settings of the cluster. int result = Arrays.hashCode(nodes); - result = 31 * result + (isDSE != null ? isDSE.hashCode() : 0); + result = 31 * result + (dse ? 1 : 0); + result = 31 * result + (version != null ? version.hashCode() : 0); result = 31 * result + createOptions.hashCode(); result = 31 * result + jvmArgs.hashCode(); result = 31 * result + cassandraConfiguration.hashCode(); result = 31 * result + dseConfiguration.hashCode(); result = 31 * result + workloads.hashCode(); - result = 31 * result + version.hashCode(); return result; } - } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java b/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java index 7ee7f9a41bb..4a1c6317d62 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java @@ -49,8 +49,13 @@ public String getClusterName() { } @Override - public VersionNumber getVersion() { - return ccm.getVersion(); + public VersionNumber getCassandraVersion() { + return ccm.getCassandraVersion(); + } + + @Override + public VersionNumber getDSEVersion() { + return ccm.getDSEVersion(); } @Override @@ -215,6 +220,16 @@ public void waitForDown(int node) { ccm.waitForDown(node); } + @Override + public ProtocolVersion getProtocolVersion() { + return ccm.getProtocolVersion(); + } + + @Override + public ProtocolVersion getProtocolVersion(ProtocolVersion maximumAllowed) { + return ccm.getProtocolVersion(maximumAllowed); + } + @Override public String toString() { return ccm.toString(); diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java index fa402d44e6d..f8d18c00c0f 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java @@ -78,13 +78,18 @@ public String getClusterName() { } @Override - public InetSocketAddress addressOfNode(int n) { - return delegate.addressOfNode(n); + public VersionNumber getCassandraVersion() { + return delegate.getCassandraVersion(); } @Override - public VersionNumber getVersion() { - return delegate.getVersion(); + public VersionNumber getDSEVersion() { + return delegate.getDSEVersion(); + } + + @Override + public InetSocketAddress addressOfNode(int n) { + return delegate.addressOfNode(n); } @Override @@ -237,6 +242,16 @@ public void waitForDown(int node) { throw new UnsupportedOperationException("This CCM cluster is read-only"); } + @Override + public ProtocolVersion getProtocolVersion() { + return delegate.getProtocolVersion(); + } + + @Override + public ProtocolVersion getProtocolVersion(ProtocolVersion maximumAllowed) { + return delegate.getProtocolVersion(maximumAllowed); + } + @Override public String toString() { return delegate.toString(); @@ -318,9 +333,15 @@ private Map dseConfig() { } private void addConfigOptions(String[] conf, Map config) { - String versionStr = version(); - VersionNumber version = VersionNumber.parse(versionStr != null ? - versionStr : CCMBridge.getCassandraVersion()); + VersionNumber version = VersionNumber.parse(version()); + if (version == null) { + version = CCMBridge.getGlobalCassandraVersion(); + } else { + Boolean dse = dse(); + if (dse != null && dse) { + version = CCMBridge.getCassandraVersion(version); + } + } for (String aConf : conf) { String[] tokens = aConf.split(":"); if (tokens.length != 2) @@ -331,7 +352,7 @@ private void addConfigOptions(String[] conf, Map config) { // cannot be met. if (configVersionRequirements.containsKey(key)) { VersionNumber requirement = configVersionRequirements.get(key); - if (version.compareTo(requirement) < 0) { + if (version != null && version.compareTo(requirement) < 0) { LOGGER.debug("Skipping inclusion of '{}' in cassandra.yaml since it requires >= C* {} and {} " + "was detected.", aConf, requirement, version); continue; @@ -428,16 +449,16 @@ private CCMBridge.Builder ccmBuilder(Object testInstance) throws Exception { if (ccmBuilder == null) { ccmBuilder = CCMBridge.builder().withNodes(numberOfNodes()).notStarted(); } - if (version() != null) - ccmBuilder.withVersion(version()); - Boolean dse = dse(); - if (dse != null) { - if (dse) { - ccmBuilder.withDSE(); - } else { - ccmBuilder.withoutDSE(); - } + + String versionStr = version(); + if (versionStr != null) { + VersionNumber version = VersionNumber.parse(versionStr); + ccmBuilder.withVersion(version); } + + Boolean dse = dse(); + if (dse != null) + ccmBuilder.withDSE(dse); if (ssl()) ccmBuilder.withSSL(); if (auth()) diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeClassNameParserTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeClassNameParserTest.java index d757f834f16..925524642f1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeClassNameParserTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeClassNameParserTest.java @@ -25,7 +25,7 @@ public class DataTypeClassNameParserTest { - private ProtocolVersion protocolVersion = TestUtils.getDesiredProtocolVersion(); + private ProtocolVersion protocolVersion = ProtocolVersion.NEWEST_SUPPORTED; private CodecRegistry codecRegistry = new CodecRegistry(); @Test(groups = "unit") diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java index e91a6d8e18d..502756a45e7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java @@ -39,13 +39,19 @@ public class DataTypeIntegrationTest extends CCMTestsSupport { private static final Logger logger = LoggerFactory.getLogger(DataTypeIntegrationTest.class); - List tables = allTables(); - VersionNumber cassandraVersion; + private Map samples; + + private List tables; + + private VersionNumber cassandraVersion; enum StatementType {RAW_STRING, SIMPLE_WITH_PARAM, PREPARED} @Override public void onTestContextInitialized() { + ProtocolVersion protocolVersion = ccm().getProtocolVersion(); + samples = PrimitiveTypeSamples.samples(protocolVersion); + tables = allTables(); Host host = cluster().getMetadata().getAllHosts().iterator().next(); cassandraVersion = host.getCassandraVersion().nextStable(); List statements = Lists.newArrayList(); @@ -188,7 +194,7 @@ static class TestTable { } } - private static List allTables() { + private List allTables() { List tables = Lists.newArrayList(); tables.addAll(tablesWithPrimitives()); @@ -201,18 +207,18 @@ private static List allTables() { return ImmutableList.copyOf(tables); } - private static List tablesWithPrimitives() { + private List tablesWithPrimitives() { List tables = Lists.newArrayList(); - for (Map.Entry entry : PrimitiveTypeSamples.ALL.entrySet()) + for (Map.Entry entry : samples.entrySet()) tables.add(new TestTable(entry.getKey(), entry.getValue(), "1.2.0")); return tables; } - private static List tablesWithPrimitivesNull() { + private List tablesWithPrimitivesNull() { List tables = Lists.newArrayList(); // Create a test table for each primitive type testing with null values. If the // type maps to a java primitive type it's value will by the default value instead of null. - for (DataType dataType : DataType.allPrimitiveTypes(TestUtils.getDesiredProtocolVersion())) { + for (DataType dataType : DataType.allPrimitiveTypes(ccm().getProtocolVersion())) { Object expectedPrimitiveValue = null; switch (dataType.getName()) { case BIGINT: @@ -247,9 +253,9 @@ private static List tablesWithPrimitivesNull() { } - private static List tablesWithCollectionsOfPrimitives() { + private List tablesWithCollectionsOfPrimitives() { List tables = Lists.newArrayList(); - for (Map.Entry entry : PrimitiveTypeSamples.ALL.entrySet()) { + for (Map.Entry entry : samples.entrySet()) { DataType elementType = entry.getKey(); Object elementSample = entry.getValue(); @@ -260,12 +266,12 @@ private static List tablesWithCollectionsOfPrimitives() { return tables; } - private static List tablesWithMapsOfPrimitives() { + private List tablesWithMapsOfPrimitives() { List tables = Lists.newArrayList(); - for (Map.Entry keyEntry : PrimitiveTypeSamples.ALL.entrySet()) { + for (Map.Entry keyEntry : samples.entrySet()) { DataType keyType = keyEntry.getKey(); Object keySample = keyEntry.getValue(); - for (Map.Entry valueEntry : PrimitiveTypeSamples.ALL.entrySet()) { + for (Map.Entry valueEntry : samples.entrySet()) { DataType valueType = valueEntry.getKey(); Object valueSample = valueEntry.getValue(); @@ -277,7 +283,7 @@ private static List tablesWithMapsOfPrimitives() { return tables; } - private static Collection tablesWithNestedCollections() { + private Collection tablesWithNestedCollections() { List tables = Lists.newArrayList(); // To avoid combinatorial explosion, only use int as the primitive type, and two levels of nesting. @@ -308,7 +314,7 @@ private static Collection tablesWithNestedCollections() { return tables; } - private static Collection tablesWithRandomlyGeneratedNestedCollections() { + private Collection tablesWithRandomlyGeneratedNestedCollections() { List tables = Lists.newArrayList(); DataType nestedListType = buildNestedType(DataType.Name.LIST, 5); @@ -324,7 +330,7 @@ private static Collection tablesWithRandomlyGeneratedNested /** * Populate a nested collection based on the given type and it's arguments. */ - public static Object nestedObject(DataType type) { + public Object nestedObject(DataType type) { int typeIdx = type.getTypeArguments().size() > 1 ? 1 : 0; DataType argument = type.getTypeArguments().get(typeIdx); @@ -374,7 +380,7 @@ public static Object nestedObject(DataType type) { * @return a DataType that is a nested collection with the given baseType with the * given depth. */ - public static DataType buildNestedType(DataType.Name baseType, int depth) { + public DataType buildNestedType(DataType.Name baseType, int depth) { Random r = new Random(); DataType t = null; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java index 629030507fe..645e5cad24e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java @@ -37,7 +37,7 @@ public class DataTypeTest { CodecRegistry codecRegistry = new CodecRegistry(); - ProtocolVersion protocolVersion = TestUtils.getDesiredProtocolVersion(); + ProtocolVersion protocolVersion = ProtocolVersion.NEWEST_SUPPORTED; static boolean exclude(DataType t) { return t.getName() == DataType.Name.COUNTER; diff --git a/driver-core/src/test/java/com/datastax/driver/core/GettableDataIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/GettableDataIntegrationTest.java index fef74971518..520e0aca336 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/GettableDataIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/GettableDataIntegrationTest.java @@ -45,7 +45,7 @@ public class GettableDataIntegrationTest extends CCMTestsSupport { @Override public void onTestContextInitialized() { - is21 = ccm().getVersion().compareTo(VersionNumber.parse("2.1.3")) > 0; + is21 = ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.1.3")) > 0; // only add tuples / nested collections at > 2.1.3. execute("CREATE TABLE codec_mapping (k int PRIMARY KEY, " + "v int, l list, m map" + diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java index 451bc5e0c95..b0ca978f648 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java @@ -15,7 +15,6 @@ */ package com.datastax.driver.core; -import com.datastax.driver.core.utils.DseVersion; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.testng.annotations.Test; @@ -23,52 +22,10 @@ import java.net.InetAddress; import static com.datastax.driver.core.Assertions.assertThat; -import static com.datastax.driver.core.CCMAccess.Workload.solr; -import static com.datastax.driver.core.CCMAccess.Workload.spark; import static com.datastax.driver.core.TestUtils.nonQuietClusterCloseOptions; public class HostMetadataIntegrationTest { - /** - * Validates that when given a DSE cluster that the workload and dse versions are properly - * parsed and set on the respective {@link Host} instances. - *

    - * This test is disabled as running DSE with workloads is intensive and has unreliable results - * when running CCM with multiple workloads. - *

    - * - * @test_category host:metadata - * @jira_ticket JAVA-1042 - * @see HostMetadataIntegrationTest#should_parse_dse_workload_and_version_if_available() - */ - @Test(groups = "long") - @DseVersion("5.0.0") - public void test_mixed_dse_workload() { - CCMBridge.Builder builder = CCMBridge.builder() - .withNodes(3) - .withDSE() - .withWorkload(2, solr) - .withWorkload(3, spark); - CCMAccess ccm = CCMCache.get(builder); - - VersionNumber version = VersionNumber.parse(CCMBridge.getDSEVersion()); - - Cluster cluster = Cluster.builder() - .addContactPoints(ccm.addressOfNode(1).getAddress()) - .withPort(ccm.getBinaryPort()) - .build(); - try { - cluster.connect(); - - assertThat(cluster).host(1).hasWorkload("Cassandra").hasDseVersion(version); - assertThat(cluster).host(2).hasWorkload("Search").hasDseVersion(version); - assertThat(cluster).host(3).hasWorkload("Analytics").hasDseVersion(version); - } finally { - cluster.close(); - ccm.close(); - } - } - /** * Validates that {@link Host#getDseVersion()} and {@link Host#getDseWorkload()} return values defined in * the dse_version and workload columns if they are present in system.local diff --git a/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataTest.java index 0c700a630a5..4c5ff1fa873 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataTest.java @@ -75,7 +75,7 @@ public void onTestContextInitialized() { + "\"MixedCaseColumn\" list," + // Frozen collections was introduced only in C* 2.1.3 - (ccm().getVersion().compareTo(VersionNumber.parse("2.1.3")) >= 0 + (ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.1.3")) >= 0 ? ", map_full frozen>," + "set_full frozen>," @@ -106,7 +106,7 @@ public void should_create_metadata_for_simple_index() { @CassandraVersion(value = "2.1", description = "index names with quoted identifiers and collection indexes not supported until 2.1") public void should_create_metadata_for_values_index_on_mixed_case_column() { // 3.0 assumes the 'values' keyword if index on a collection - String createValuesIndex = ccm().getVersion().getMajor() > 2 ? + String createValuesIndex = ccm().getCassandraVersion().getMajor() > 2 ? String.format("CREATE INDEX \"MixedCaseIndex\" ON %s.indexing (values(\"MixedCaseColumn\"));", keyspace) : String.format("CREATE INDEX \"MixedCaseIndex\" ON %s.indexing (\"MixedCaseColumn\");", keyspace); session().execute(createValuesIndex); @@ -116,7 +116,7 @@ public void should_create_metadata_for_values_index_on_mixed_case_column() { .hasName("MixedCaseIndex") .hasParent((TableMetadata) column.getParent()) .isNotCustomIndex() - .hasTarget(ccm().getVersion().getMajor() > 2 ? "values(\"MixedCaseColumn\")" : "\"MixedCaseColumn\"") + .hasTarget(ccm().getCassandraVersion().getMajor() > 2 ? "values(\"MixedCaseColumn\")" : "\"MixedCaseColumn\"") .hasKind(COMPOSITES) .asCqlQuery(createValuesIndex); assertThat((TableMetadata) column.getParent()).hasIndex(index); @@ -126,7 +126,7 @@ public void should_create_metadata_for_values_index_on_mixed_case_column() { @CassandraVersion("2.1.0") public void should_create_metadata_for_index_on_map_values() { // 3.0 assumes the 'values' keyword if index on a collection - String createValuesIndex = ccm().getVersion().getMajor() > 2 ? + String createValuesIndex = ccm().getCassandraVersion().getMajor() > 2 ? String.format("CREATE INDEX map_values_index ON %s.indexing (values(map_values));", keyspace) : String.format("CREATE INDEX map_values_index ON %s.indexing (map_values);", keyspace); session().execute(createValuesIndex); @@ -136,7 +136,7 @@ public void should_create_metadata_for_index_on_map_values() { .hasName("map_values_index") .hasParent((TableMetadata) column.getParent()) .isNotCustomIndex() - .hasTarget(ccm().getVersion().getMajor() > 2 ? "values(map_values)" : "map_values") + .hasTarget(ccm().getCassandraVersion().getMajor() > 2 ? "values(map_values)" : "map_values") .hasKind(COMPOSITES) .asCqlQuery(createValuesIndex); assertThat((TableMetadata) column.getParent()).hasIndex(index); diff --git a/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementTest.java b/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementTest.java index d4d047f399d..c89d3ef57e1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementTest.java @@ -48,7 +48,8 @@ public class PreparedStatementTest extends CCMTestsSupport { private static final String SIMPLE_TABLE = "test"; private static final String SIMPLE_TABLE2 = "test2"; - private final Collection primitiveTypes = DataType.allPrimitiveTypes(TestUtils.getDesiredProtocolVersion()); + private ProtocolVersion protocolVersion; + private Collection primitiveTypes; private boolean exclude(DataType t) { return t.getName() == DataType.Name.COUNTER; @@ -56,6 +57,8 @@ private boolean exclude(DataType t) { @Override public void onTestContextInitialized() { + protocolVersion = ccm().getProtocolVersion(); + primitiveTypes = DataType.allPrimitiveTypes(protocolVersion); execute(createTestFixtures()); } @@ -340,7 +343,7 @@ public void prepareStatementInheritPropertiesTest() { toPrepare.setConsistencyLevel(ConsistencyLevel.QUORUM); toPrepare.setSerialConsistencyLevel(ConsistencyLevel.LOCAL_SERIAL); toPrepare.setRetryPolicy(FallthroughRetryPolicy.INSTANCE); - if (TestUtils.getDesiredProtocolVersion().compareTo(V4) >= 0) + if (protocolVersion.compareTo(V4) >= 0) toPrepare.setOutgoingPayload(ImmutableMap.of("foo", Bytes.fromHexString("0xcafebabe"))); toPrepare.setIdempotent(true); toPrepare.enableTracing(); @@ -349,7 +352,7 @@ public void prepareStatementInheritPropertiesTest() { assertThat(prepared.getConsistencyLevel()).isEqualTo(ConsistencyLevel.QUORUM); assertThat(prepared.getSerialConsistencyLevel()).isEqualTo(ConsistencyLevel.LOCAL_SERIAL); assertThat(prepared.getRetryPolicy()).isEqualTo(FallthroughRetryPolicy.INSTANCE); - if (TestUtils.getDesiredProtocolVersion().compareTo(V4) >= 0) + if (protocolVersion.compareTo(V4) >= 0) assertThat(prepared.getOutgoingPayload()).isEqualTo(ImmutableMap.of("foo", Bytes.fromHexString("0xcafebabe"))); assertThat(prepared.isIdempotent()).isTrue(); assertThat(prepared.isTracing()).isTrue(); @@ -358,7 +361,7 @@ public void prepareStatementInheritPropertiesTest() { assertThat(bs.getConsistencyLevel()).isEqualTo(ConsistencyLevel.QUORUM); assertThat(bs.getSerialConsistencyLevel()).isEqualTo(ConsistencyLevel.LOCAL_SERIAL); assertThat(bs.getRetryPolicy()).isEqualTo(FallthroughRetryPolicy.INSTANCE); - if (TestUtils.getDesiredProtocolVersion().compareTo(V4) >= 0) + if (protocolVersion.compareTo(V4) >= 0) assertThat(bs.getOutgoingPayload()).isEqualTo(ImmutableMap.of("foo", Bytes.fromHexString("0xcafebabe"))); assertThat(bs.isIdempotent()).isTrue(); assertThat(bs.isTracing()).isTrue(); @@ -460,7 +463,7 @@ public void should_not_allow_unbound_value_on_bound_statement_when_protocol_less Cluster cluster = register(Cluster.builder() .addContactPoints(getContactPoints()) .withPort(ccm().getBinaryPort()) - .withProtocolVersion(TestUtils.getDesiredProtocolVersion(ProtocolVersion.V3)) + .withProtocolVersion(ccm().getProtocolVersion(ProtocolVersion.V3)) .build()); Session session = cluster.connect(); try { @@ -490,7 +493,7 @@ public void should_not_allow_unbound_value_on_batch_statement_when_protocol_less Cluster cluster = register(Cluster.builder() .addContactPoints(getContactPoints()) .withPort(ccm().getBinaryPort()) - .withProtocolVersion(TestUtils.getDesiredProtocolVersion(ProtocolVersion.V3)) + .withProtocolVersion(ccm().getProtocolVersion(ProtocolVersion.V3)) .build()); Session session = cluster.connect(); try { diff --git a/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java b/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java index 016e6acbff6..3e1a9d6efcd 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java @@ -36,11 +36,9 @@ */ public class PrimitiveTypeSamples { - public static final Map ALL = generateAll(); - - private static Map generateAll() { + static Map samples(ProtocolVersion protocolVersion) { try { - final Collection primitiveTypes = DataType.allPrimitiveTypes(TestUtils.getDesiredProtocolVersion()); + final Collection primitiveTypes = DataType.allPrimitiveTypes(protocolVersion); ImmutableMap data = ImmutableMap.builder() .put(DataType.ascii(), "ascii") .put(DataType.bigint(), Long.MAX_VALUE) diff --git a/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerTest.java b/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerTest.java index c31c6c42ebb..f88b2db576b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerTest.java @@ -49,41 +49,9 @@ */ public class QueryLoggerTest extends CCMTestsSupport { - private static final List dataTypes = new ArrayList( - Sets.filter(DataType.allPrimitiveTypes(TestUtils.getDesiredProtocolVersion()), new Predicate() { - @Override - public boolean apply(DataType type) { - return type != DataType.counter(); - } - })); - - private static final List values = Lists.transform(dataTypes, new Function() { - @Override - public Object apply(DataType type) { - return getFixedValue(type); - } - } - ); - - private static final String definitions = Joiner.on(", ").join( - Lists.transform(dataTypes, new Function() { - @Override - public String apply(DataType type) { - return "c_" + type + " " + type; - } - } - ) - ); - - private static final String assignments = Joiner.on(", ").join( - Lists.transform(dataTypes, new Function() { - @Override - public String apply(DataType type) { - return "c_" + type + " = ?"; - } - } - ) - ); + private List dataTypes; + private List values; + private String assignments; private Logger normal = Logger.getLogger(NORMAL_LOGGER.getName()); private Logger slow = Logger.getLogger(SLOW_LOGGER.getName()); @@ -98,6 +66,47 @@ public String apply(DataType type) { private Level originalSlow; private Level originalError; + @Override + public void onTestContextInitialized() { + dataTypes = new ArrayList( + Sets.filter(DataType.allPrimitiveTypes(ccm().getProtocolVersion()), new Predicate() { + @Override + public boolean apply(DataType type) { + return type != DataType.counter(); + } + })); + + values = Lists.transform(dataTypes, new Function() { + @Override + public Object apply(DataType type) { + return getFixedValue(type); + } + } + ); + + String definitions = Joiner.on(", ").join( + Lists.transform(dataTypes, new Function() { + @Override + public String apply(DataType type) { + return "c_" + type + " " + type; + } + } + ) + ); + + assignments = Joiner.on(", ").join( + Lists.transform(dataTypes, new Function() { + @Override + public String apply(DataType type) { + return "c_" + type + " = ?"; + } + } + ) + ); + + execute("CREATE TABLE test (pk int PRIMARY KEY, " + definitions + ")"); + } + @BeforeMethod(groups = {"short", "unit"}) public void startCapturingLogs() { originalNormal = normal.getLevel(); @@ -1064,9 +1073,4 @@ public void should_log_wrapped_bound_statement() throws Exception { .contains("param1:'foo'"); } - @Override - public void onTestContextInitialized() { - execute("CREATE TABLE test (pk int PRIMARY KEY, " + definitions + ")"); - } - } diff --git a/driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java b/driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java index 2fb3d5dcef6..cc52c764186 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java @@ -157,8 +157,7 @@ public void should_ignore_node_that_does_not_support_protocol_version_on_session .withStoragePort(mainCcm.getStoragePort()) .withThriftPort(mainCcm.getThriftPort()) .withBinaryPort(mainCcm.getBinaryPort()) - .withoutDSE() - .withVersion("1.2.19"); + .withVersion(VersionNumber.parse("1.2.19")); otherCcm = CCMCache.get(otherCcmBuilder); otherCcm.waitForUp(1); diff --git a/driver-core/src/test/java/com/datastax/driver/core/ReconnectionTest.java b/driver-core/src/test/java/com/datastax/driver/core/ReconnectionTest.java index b79698aa6cb..6fed4ab4bc4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ReconnectionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ReconnectionTest.java @@ -83,7 +83,7 @@ public void should_reconnect_after_full_connectivity_loss() throws InterruptedEx public void should_keep_reconnecting_on_authentication_error() throws InterruptedException { // For C* 1.2, sleep before attempting to connect as there is a small delay between // user being created. - if (ccm().getVersion().getMajor() < 2) { + if (ccm().getCassandraVersion().getMajor() < 2) { Uninterruptibles.sleepUninterruptibly(1, TimeUnit.SECONDS); } CountingReconnectionPolicy reconnectionPolicy = new CountingReconnectionPolicy(new ConstantReconnectionPolicy(reconnectionDelayMillis)); @@ -223,7 +223,7 @@ public void should_use_connection_from_reconnection_in_pool() { .withReconnectionPolicy(new ConstantReconnectionPolicy(5000)) .withLoadBalancingPolicy(loadBalancingPolicy) .withSocketOptions(socketOptions) - .withProtocolVersion(TestUtils.getDesiredProtocolVersion()) + .withProtocolVersion(ccm().getProtocolVersion()) .build()); // Create two sessions to have multiple pools cluster.connect(); diff --git a/driver-core/src/test/java/com/datastax/driver/core/SchemaRefreshDebouncerTest.java b/driver-core/src/test/java/com/datastax/driver/core/SchemaRefreshDebouncerTest.java index 780bb2f370b..a5e82b276f4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SchemaRefreshDebouncerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SchemaRefreshDebouncerTest.java @@ -189,7 +189,7 @@ public void should_debounce_and_coalesce_tables_in_same_keyspace_into_refresh_ke */ @Test(groups = "short") public void should_debounce_and_coalesce_multiple_alter_events_on_same_table_into_refresh_table() throws Exception { - if (ccm().getVersion().getMajor() > 2 || ccm().getVersion().getMajor() == 2 && ccm().getVersion().getMinor() > 1) + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.2")) >= 0) throw new SkipException("Disabled in Cassandra 2.2+ because of CASSANDRA-9996"); String keyspace = TestUtils.generateIdentifier("ks_"); diff --git a/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementIntegrationTest.java index 112d1d5c53b..9f2e2f0a910 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementIntegrationTest.java @@ -100,7 +100,7 @@ public void useNamedValuesWithProtocol(ProtocolVersion version) { @Test(groups = "short", expectedExceptions = UnsupportedFeatureException.class) @CassandraVersion("2.0.0") public void should_fail_if_query_with_named_values_if_protocol_is_V2() { - if (ccm().getVersion().getMajor() >= 3) { + if (ccm().getCassandraVersion().getMajor() >= 3) { throw new SkipException("Skipping since Cassandra 3.0+ does not support protocol v2"); } useNamedValuesWithProtocol(ProtocolVersion.V2); @@ -109,7 +109,7 @@ public void should_fail_if_query_with_named_values_if_protocol_is_V2() { @Test(groups = "short", expectedExceptions = UnsupportedFeatureException.class) @CassandraVersion("2.0.0") public void should_fail_if_query_with_named_values_if_protocol_is_V1() { - if (ccm().getVersion().getMajor() >= 3) { + if (ccm().getCassandraVersion().getMajor() >= 3) { throw new SkipException("Skipping since Cassandra 3.0+ does not support protocol v1"); } useNamedValuesWithProtocol(ProtocolVersion.V1); diff --git a/driver-core/src/test/java/com/datastax/driver/core/StatementIdempotenceTest.java b/driver-core/src/test/java/com/datastax/driver/core/StatementIdempotenceTest.java index dafdee9cc1e..90da1690abb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/StatementIdempotenceTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/StatementIdempotenceTest.java @@ -41,7 +41,7 @@ public void setUpQueryBuilder() throws Exception { when(cluster.getConfiguration()).thenReturn(configuration); when(configuration.getCodecRegistry()).thenReturn(codecRegistry); when(configuration.getProtocolOptions()).thenReturn(protocolOptions); - when(protocolOptions.getProtocolVersion()).thenReturn(TestUtils.getDesiredProtocolVersion()); + when(protocolOptions.getProtocolVersion()).thenReturn(ProtocolVersion.NEWEST_SUPPORTED); } @Test(groups = "unit") diff --git a/driver-core/src/test/java/com/datastax/driver/core/TestListener.java b/driver-core/src/test/java/com/datastax/driver/core/TestListener.java index c4006f863aa..60d3a12960c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TestListener.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TestListener.java @@ -119,12 +119,13 @@ public void afterInvocation(IInvokedMethod testMethod, ITestResult testResult) { } private static void cassandraVersionCheck(CassandraVersion version) { - versionCheck(CCMBridge.getCassandraVersionNumber(), VersionNumber.parse(version.value()), version.description()); + versionCheck(CCMBridge.getGlobalCassandraVersion(), VersionNumber.parse(version.value()), version.description()); } private static void dseVersionCheck(DseVersion version) { - if (CCMBridge.isDSE()) { - versionCheck(CCMBridge.getDSEVersionNumber(), VersionNumber.parse(version.value()), version.description()); + VersionNumber dseVersion = CCMBridge.getGlobalDSEVersion(); + if (dseVersion != null) { + versionCheck(CCMBridge.getGlobalDSEVersion(), VersionNumber.parse(version.value()), version.description()); } else { throw new SkipException("Skipping test because not configured for DataStax Enterprise cluster."); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java index aa4a686ecc6..0fefebeac41 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java @@ -735,33 +735,6 @@ public static boolean pingPort(InetAddress address, int port) { return connectionSuccessful; } - /** - * @return The desired target protocol version based on the 'cassandra.version' System property. - */ - public static ProtocolVersion getDesiredProtocolVersion() { - String version = CCMBridge.getCassandraVersion(); - String[] versionArray = version.split("\\.|-"); - double major = Double.parseDouble(versionArray[0] + "." + versionArray[1]); - if (major < 2.0) { - return ProtocolVersion.V1; - } else if (major < 2.1) { - return ProtocolVersion.V2; - } else if (major < 2.2) { - return ProtocolVersion.V3; - } else { - return ProtocolVersion.V4; - } - } - - /** - * @param maximumAllowed The maximum protocol version to use. - * @return The desired protocolVersion or maximumAllowed if {@link #getDesiredProtocolVersion} is greater. - */ - public static ProtocolVersion getDesiredProtocolVersion(ProtocolVersion maximumAllowed) { - ProtocolVersion versionToUse = getDesiredProtocolVersion(); - return versionToUse.compareTo(maximumAllowed) > 0 ? maximumAllowed : versionToUse; - } - /** * @return a {@link Cluster} instance that connects only to the control host of the given cluster. */ @@ -838,7 +811,7 @@ public static long getFreeMemoryMB() { /** * Helper for generating a DynamicCompositeType {@link ByteBuffer} from the given parameters. - * + *

    * Any of params given as an Integer will be considered with a field name of 'i', any as String will * be considered with a field name of 's'. * @@ -881,7 +854,7 @@ public static ByteBuffer serializeForDynamicCompositeType(Object... params) { /** * Helper for generating a Composite {@link ByteBuffer} from the given parameters. - * + *

    * Expects Integer and String types for parameters. * * @param params params to serialize. diff --git a/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java b/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java index f945fdffe09..1b5e17cc8af 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java @@ -30,10 +30,13 @@ @CassandraVersion("2.1.0") public class TupleTest extends CCMTestsSupport { - ProtocolVersion protocolVersion = TestUtils.getDesiredProtocolVersion(); + private ProtocolVersion protocolVersion; + private Map samples; @Override public void onTestContextInitialized() { + protocolVersion = ccm().getProtocolVersion(); + samples = PrimitiveTypeSamples.samples(protocolVersion); execute("CREATE TABLE t (k int PRIMARY KEY, v frozen>)"); } @@ -202,8 +205,7 @@ public void tupleTestTypeVaryingLengths() throws Exception { */ @Test(groups = "short") public void tupleSubtypesTest() throws Exception { - - List DATA_TYPE_PRIMITIVES = Lists.newArrayList(PrimitiveTypeSamples.ALL.keySet()); + List DATA_TYPE_PRIMITIVES = Lists.newArrayList(samples.keySet()); session().execute("CREATE KEYSPACE test_tuple_subtypes " + "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); session().execute("USE test_tuple_subtypes"); @@ -226,8 +228,8 @@ public void tupleSubtypesTest() throws Exception { for (int j = 0; j < i; ++j) { dataTypes.add(DATA_TYPE_PRIMITIVES.get(j)); completeDataTypes.add(DATA_TYPE_PRIMITIVES.get(j)); - createdValues.add(PrimitiveTypeSamples.ALL.get(DATA_TYPE_PRIMITIVES.get(j))); - completeValues.add(PrimitiveTypeSamples.ALL.get(DATA_TYPE_PRIMITIVES.get(j))); + createdValues.add(samples.get(DATA_TYPE_PRIMITIVES.get(j))); + completeValues.add(samples.get(DATA_TYPE_PRIMITIVES.get(j))); } // complete portion of the arrays needed for trailing nulls @@ -261,8 +263,7 @@ public void tupleSubtypesTest() throws Exception { */ @Test(groups = "short") public void tupleNonPrimitiveSubTypesTest() throws Exception { - - List DATA_TYPE_PRIMITIVES = Lists.newArrayList(PrimitiveTypeSamples.ALL.keySet()); + List DATA_TYPE_PRIMITIVES = Lists.newArrayList(samples.keySet()); session().execute("CREATE KEYSPACE test_tuple_non_primitive_subtypes " + "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); session().execute("USE test_tuple_non_primitive_subtypes"); @@ -296,7 +297,7 @@ public void tupleNonPrimitiveSubTypesTest() throws Exception { ArrayList createdValues = new ArrayList(); dataTypes.add(DataType.list(datatype)); - createdValues.add(Collections.singletonList(PrimitiveTypeSamples.ALL.get(datatype))); + createdValues.add(Collections.singletonList(samples.get(datatype))); TupleType t = new TupleType(dataTypes, protocolVersion, cluster().getConfiguration().getCodecRegistry()); TupleValue createdTuple = t.newValue(createdValues.toArray()); @@ -319,7 +320,7 @@ public void tupleNonPrimitiveSubTypesTest() throws Exception { ArrayList createdValues = new ArrayList(); dataTypes.add(DataType.set(datatype)); - createdValues.add(new HashSet(Collections.singletonList(PrimitiveTypeSamples.ALL.get(datatype)))); + createdValues.add(new HashSet(Collections.singletonList(samples.get(datatype)))); TupleType t = new TupleType(dataTypes, protocolVersion, cluster().getConfiguration().getCodecRegistry()); TupleValue createdTuple = t.newValue(createdValues.toArray()); @@ -342,7 +343,7 @@ public void tupleNonPrimitiveSubTypesTest() throws Exception { ArrayList createdValues = new ArrayList(); HashMap hm = new HashMap(); - hm.put(PrimitiveTypeSamples.ALL.get(datatype), PrimitiveTypeSamples.ALL.get(datatype)); + hm.put(samples.get(datatype), samples.get(datatype)); dataTypes.add(DataType.map(datatype, datatype)); createdValues.add(hm); @@ -370,7 +371,7 @@ public void tupleNonPrimitiveSubTypesTest() throws Exception { */ @Test(groups = "short") public void detachedTupleTypeTest() { - TupleType detachedType = TupleType.of(TestUtils.getDesiredProtocolVersion(), CodecRegistry.DEFAULT_INSTANCE, + TupleType detachedType = TupleType.of(protocolVersion, CodecRegistry.DEFAULT_INSTANCE, DataType.cint(), DataType.text(), DataType.cfloat()); TupleValue detachedValue = detachedType.newValue(1, "hello", 2.0f); diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecAssert.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecAssert.java index 27a679ac955..2afd1bf3669 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecAssert.java @@ -24,7 +24,7 @@ @SuppressWarnings("unused") public class TypeCodecAssert extends AbstractAssert, TypeCodec> { - private ProtocolVersion version = TestUtils.getDesiredProtocolVersion(); + private ProtocolVersion version = ProtocolVersion.NEWEST_SUPPORTED; protected TypeCodecAssert(TypeCodec actual) { super(actual, TypeCodecAssert.class); diff --git a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java index f90c31c0ad3..dd74dbd1b14 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java @@ -39,11 +39,8 @@ @CassandraVersion("2.1.0") public class UserTypesTest extends CCMTestsSupport { - private final static List DATA_TYPE_PRIMITIVES = new ArrayList(DataType.allPrimitiveTypes(TestUtils.getDesiredProtocolVersion())); - - static { - DATA_TYPE_PRIMITIVES.remove(DataType.counter()); - } + private List DATA_TYPE_PRIMITIVES; + private Map samples; private final static List DATA_TYPE_NON_PRIMITIVE_NAMES = new ArrayList(EnumSet.of(DataType.Name.LIST, DataType.Name.SET, DataType.Name.MAP, DataType.Name.TUPLE)); @@ -57,6 +54,10 @@ public Boolean call() throws Exception { @Override public void onTestContextInitialized() { + ProtocolVersion protocolVersion = ccm().getProtocolVersion(); + DATA_TYPE_PRIMITIVES = new ArrayList(DataType.allPrimitiveTypes(protocolVersion)); + DATA_TYPE_PRIMITIVES.remove(DataType.counter()); + samples = PrimitiveTypeSamples.samples(protocolVersion); String type1 = "CREATE TYPE phone (alias text, number text)"; String type2 = "CREATE TYPE \"\"\"User Address\"\"\" (street text, \"ZIP\"\"\" int, phones set>)"; String table = "CREATE TABLE user (id int PRIMARY KEY, addr frozen<\"\"\"User Address\"\"\">)"; @@ -229,10 +230,11 @@ public void testPrimitiveDatatypes() throws Exception { UserType alldatatypesDef = cluster().getMetadata().getKeyspace("testPrimitiveDatatypes").getUserType("alldatatypes"); UDTValue alldatatypes = alldatatypesDef.newValue(); + for (int i = 0; i < DATA_TYPE_PRIMITIVES.size(); i++) { DataType dataType = DATA_TYPE_PRIMITIVES.get(i); String index = Character.toString((char) (startIndex + i)); - Object sampleData = PrimitiveTypeSamples.ALL.get(dataType); + Object sampleData = samples.get(dataType); switch (dataType.getName()) { case ASCII: @@ -360,7 +362,7 @@ public void testNonPrimitiveDatatypes() throws Exception { DataType dataType = DATA_TYPE_PRIMITIVES.get(j); String index = Character.toString((char) (startIndex + i)) + "_" + Character.toString((char) (startIndex + j)); - Object sampleElement = PrimitiveTypeSamples.ALL.get(dataType); + Object sampleElement = samples.get(dataType); switch (name) { case LIST: alldatatypes.setList(index, Lists.newArrayList(sampleElement)); diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java index c0fd22ea65c..092227d1e78 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java @@ -93,7 +93,7 @@ public Option[] getOptions() { // Delegate javax.security.cert to the parent classloader. javax.security.cert.X509Certificate is used in // io.netty.util.internal.EmptyArrays, but not directly by the driver. bootDelegationPackage("javax.security.cert"), - systemProperty("cassandra.version").value(CCMBridge.getCassandraVersion()), + systemProperty("cassandra.version").value(CCMBridge.getGlobalCassandraVersion().toString()), systemProperty("cassandra.contactpoints").value(TestUtils.IP_PREFIX + 1), systemProperty("logback.configurationFile").value("file:" + PathUtils.getBaseDir() + "/src/test/resources/logback.xml"), mavenBundle("org.slf4j", "slf4j-api", "1.7.5"), diff --git a/pom.xml b/pom.xml index 3c84524b791..64554a996d8 100644 --- a/pom.xml +++ b/pom.xml @@ -46,7 +46,7 @@ UTF-8 - 3.8 + 3.10 1.6 1.2.17 1.7.6 From 9d97a3c7811173dceb14806a731dc26eb997538b Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 17 Feb 2017 13:34:47 -0600 Subject: [PATCH 041/512] JAVA-1286: Support setting and retrieving udt fields in QueryBuilder (#744) CASSANDRA-7423 in Apache Cassandra 3.6 adds the ability to update individual UDT fields. --- changelog/README.md | 1 + .../driver/core/querybuilder/Assignment.java | 26 +++---- .../driver/core/querybuilder/Clause.java | 4 +- .../driver/core/querybuilder/Insert.java | 4 +- .../core/querybuilder/QueryBuilder.java | 76 ++++++++++++++++++- .../driver/core/querybuilder/Select.java | 33 +++++++- .../driver/core/querybuilder/Utils.java | 58 +++++++++----- .../core/querybuilder/QueryBuilderTest.java | 30 ++++++++ .../QueryBuilderUDTExecutionTest.java | 46 +++++++++++ 9 files changed, 237 insertions(+), 41 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 3188890a6bd..56a8c448ac4 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -14,6 +14,7 @@ - [improvement] JAVA-1392: Reduce lock contention in RPTokenFactory. - [improvement] JAVA-1328: Provide compatibility with Guava 20. - [improvement] JAVA-1247: Disable idempotence warnings. +- [improvement] JAVA-1286: Support setting and retrieving udt fields in QueryBuilder. Merged from 3.1.x branch: diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Assignment.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Assignment.java index 7a0b9f2d6aa..d8156f35ecd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Assignment.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Assignment.java @@ -24,9 +24,9 @@ public abstract class Assignment extends Utils.Appendeable { - final String name; + final Object name; - private Assignment(String name) { + private Assignment(Object name) { this.name = name; } @@ -36,7 +36,7 @@ private Assignment(String name) { * @return the name of the column this assignment applies to. */ public String getColumnName() { - return name; + return name.toString(); } abstract boolean isIdempotent(); @@ -45,14 +45,14 @@ static class SetAssignment extends Assignment { private final Object value; - SetAssignment(String name, Object value) { + SetAssignment(Object name, Object value) { super(name); this.value = value; } @Override void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegistry) { - appendName(name, sb); + appendName(name, codecRegistry, sb); sb.append('='); appendValue(value, codecRegistry, sb, variables); } @@ -86,8 +86,8 @@ static class CounterAssignment extends Assignment { @Override void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegistry) { - appendName(name, sb).append('='); - appendName(name, sb).append(isIncr ? "+" : "-"); + appendName(name, codecRegistry, sb).append('='); + appendName(name, codecRegistry, sb).append(isIncr ? "+" : "-"); appendValue(value, codecRegistry, sb, variables); } @@ -113,10 +113,10 @@ static class ListPrependAssignment extends Assignment { @Override void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegistry) { - appendName(name, sb).append('='); + appendName(name, codecRegistry, sb).append('='); appendValue(value, codecRegistry, sb, variables); sb.append('+'); - appendName(name, sb); + appendName(name, codecRegistry, sb); } @Override @@ -143,7 +143,7 @@ static class ListSetIdxAssignment extends Assignment { @Override void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegistry) { - appendName(name, sb).append('[').append(idx).append("]="); + appendName(name, codecRegistry, sb).append('[').append(idx).append("]="); appendValue(value, codecRegistry, sb, variables); } @@ -177,8 +177,8 @@ static class CollectionAssignment extends Assignment { @Override void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegistry) { - appendName(name, sb).append('='); - appendName(name, sb).append(isAdd ? "+" : "-"); + appendName(name, codecRegistry, sb).append('='); + appendName(name, codecRegistry, sb).append(isAdd ? "+" : "-"); appendValue(collection, codecRegistry, sb, variables); } @@ -206,7 +206,7 @@ static class MapPutAssignment extends Assignment { @Override void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegistry) { - appendName(name, sb).append('['); + appendName(name, codecRegistry, sb).append('['); appendValue(key, codecRegistry, sb, variables); sb.append("]="); appendValue(value, codecRegistry, sb, variables); diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java index 44ca9f0dd65..e90559e6ac4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java @@ -96,7 +96,7 @@ void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegis } Utils.appendName(name, sb).append(" IN ("); - Utils.joinAndAppendValues(sb, codecRegistry, ",", values, variables).append(')'); + Utils.joinAndAppendValues(sb, codecRegistry, values, variables).append(')'); } @Override @@ -291,7 +291,7 @@ void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegis sb.append(tuple.get(0)); } else { sb.append("("); - Utils.joinAndAppendValues(sb, codecRegistry, ",", (List) tuple, variables).append(')'); + Utils.joinAndAppendValues(sb, codecRegistry, (List) tuple, variables).append(')'); } } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java index 896741cec1e..4070aac70f5 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java @@ -72,9 +72,9 @@ StringBuilder buildQueryString(List variables, CodecRegistry codecRegist Utils.appendValue(json, codecRegistry, builder, variables); } else { builder.append("("); - Utils.joinAndAppendNames(builder, codecRegistry, ",", names); + Utils.joinAndAppendNames(builder, codecRegistry, names); builder.append(") VALUES ("); - Utils.joinAndAppendValues(builder, codecRegistry, ",", values, variables); + Utils.joinAndAppendValues(builder, codecRegistry, values, variables); builder.append(')'); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java index 18af1b80fdc..2ad12540dc0 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java @@ -260,7 +260,7 @@ public static String token(String columnName) { public static String token(String... columnNames) { StringBuilder sb = new StringBuilder(); sb.append("token("); - Utils.joinAndAppendNames(sb, null, ",", Arrays.asList((Object[]) columnNames)); + Utils.joinAndAppendNames(sb, null, Arrays.asList((Object[]) columnNames)); sb.append(')'); return sb.toString(); } @@ -349,7 +349,7 @@ public static Clause in(String name, List values) { * @param values the values * @return the corresponding where clause. * @throws IllegalArgumentException if the size of any tuple in {@code values} is not equal to {@code names.size()}, - * or if {@code values} contains elements that are neither {@link List lists} nor {@link #bindMarker() bind markers}. + * or if {@code values} contains elements that are neither {@link List lists} nor {@link #bindMarker() bind markers}. */ public static Clause in(List names, List values) { return new Clause.CompoundInClause(names, values); @@ -578,7 +578,24 @@ public static Using ttl(BindMarker marker) { /** * Simple "set" assignment of a value to a column. *

    - * This will generate: {@code name = value}. + * This will generate: + *

    +     * name = value
    +     * 
    + * The column name will only be quoted if it contains special characters, as in: + *
    +     * "a name that contains spaces" = value
    +     * 
    + * Otherwise, if you want to force case sensitivity, use + * {@link #quote(String)}: + *
    +     * set(quote("aCaseSensitiveName"), value)
    +     * 
    + * This method won't work to set UDT fields; use {@link #set(Object, Object)} with a + * {@link #path(String...) path} instead: + *
    +     * set(path("udt", "field"), value)
    +     * 
    * * @param name the column name * @param value the value to assign @@ -588,6 +605,35 @@ public static Assignment set(String name, Object value) { return new Assignment.SetAssignment(name, value); } + /** + * Advanced "set" assignment of a value to a column or a + * {@link com.datastax.driver.core.UserType UDT} field. + *

    + * This method is seldom preferable to {@link #set(String, Object)}; it is only useful: + *

      + *
    • when assigning values to individual fields of a UDT (see {@link #path(String...)}): + *
      +     * set(path("udt", "field"), value)
      +     * 
      + *
    • + *
    • if you wish to pass a "raw" string that will get appended as-is to the query (see {@link #raw(String)}). + * There is no practical usage for this the time of writing, but it will serve as a workaround if new features are + * added to Cassandra and you're using a older driver version that is not yet aware of them: + *
      +     * set(raw("some custom string"), value)
      +     * 
      + *
    • + *
    + * If the runtime type of {@code name} is {@code String}, this method is equivalent to {@link #set(String, Object)}. + * + * @param name the column or UDT field name + * @param value the value to assign + * @return the correspond assignment (to use in an update query) + */ + public static Assignment set(Object name, Object value) { + return new Assignment.SetAssignment(name, value); + } + /** * Incrementation of a counter column. *

    @@ -1054,6 +1100,30 @@ public static Object column(String name) { return new Utils.CName(name); } + /** + * Creates a path composed of the given path {@code segments}. + *

    + * All provided path segments will be concatenated together with dots. + * If any segment contains an identifier that needs quoting, + * caller code is expected to call {@link #quote(String)} prior to + * invoking this method. + *

    + * This method is currently only useful when accessing individual fields of a + * {@link com.datastax.driver.core.UserType user-defined type} (UDT), + * which is only possible since CASSANDRA-7423. + *

    + * Note that currently nested UDT fields are not supported and + * will be rejected by the server as a + * {@link com.datastax.driver.core.exceptions.SyntaxError syntax error}. + * + * @param segments the segments of the path to create. + * @return the segments concatenated as a single path. + * @see CASSANDRA-7423 + */ + public static Object path(String... segments) { + return new Utils.Path(segments); + } + /** * Creates a {@code fromJson()} function call. *

    diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java index 30a33a624e7..cc64e336e96 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java @@ -86,7 +86,7 @@ StringBuilder buildQueryString(List variables, CodecRegistry codecRegist if (columnNames == null) { builder.append('*'); } else { - Utils.joinAndAppendNames(builder, codecRegistry, ",", columnNames); + Utils.joinAndAppendNames(builder, codecRegistry, columnNames); } builder.append(" FROM "); if (keyspace != null) @@ -552,6 +552,32 @@ public SelectionOrAlias raw(String rawString) { throw new UnsupportedOperationException("Not implemented. This should only happen if you've written your own implementation of Selection"); } + /** + * Selects the provided path. + *

    + * All given path {@code segments} will be concatenated together with dots. + * If any segment contains an identifier that needs quoting, + * caller code is expected to call {@link QueryBuilder#quote(String)} prior to + * invoking this method. + *

    + * This method is currently only useful when accessing individual fields of a + * {@link com.datastax.driver.core.UserType user-defined type} (UDT), + * which is only possible since CASSANDRA-7423. + *

    + * Note that currently nested UDT fields are not supported and + * will be rejected by the server as a + * {@link com.datastax.driver.core.exceptions.SyntaxError syntax error}. + * + * @param segments the segments of the path to create. + * @return this in-build SELECT statement + * @see CASSANDRA-7423 + */ + public SelectionOrAlias path(String... segments) { + // This method should be abstract like others here. But adding an abstract method is not binary-compatible, + // so we add this dummy implementation to make Clirr happy. + throw new UnsupportedOperationException("Not implemented. This should only happen if you've written your own implementation of Selection"); + } + /** * Creates a {@code toJson()} function call. * This is a shortcut for {@code fcall("toJson", QueryBuilder.column(name))}. @@ -665,6 +691,11 @@ public SelectionOrAlias raw(String rawString) { return queueName(QueryBuilder.raw(rawString)); } + @Override + public SelectionOrAlias path(String... segments) { + return queueName(QueryBuilder.path(segments)); + } + @Override public SelectionOrAlias toJson(String name) { return queueName(new Utils.FCall("toJson", new Utils.CName(name))); diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java index f4f2a75b903..d003a874414 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java @@ -75,19 +75,19 @@ static StringBuilder joinAndAppend(StringBuilder sb, CodecRegistry codecRegistry return sb; } - static StringBuilder joinAndAppendNames(StringBuilder sb, CodecRegistry codecRegistry, String separator, List values) { + static StringBuilder joinAndAppendNames(StringBuilder sb, CodecRegistry codecRegistry, List values) { for (int i = 0; i < values.size(); i++) { if (i > 0) - sb.append(separator); + sb.append(","); appendName(values.get(i), codecRegistry, sb); } return sb; } - static StringBuilder joinAndAppendValues(StringBuilder sb, CodecRegistry codecRegistry, String separator, List values, List variables) { + static StringBuilder joinAndAppendValues(StringBuilder sb, CodecRegistry codecRegistry, List values, List variables) { for (int i = 0; i < values.size(); i++) { if (i > 0) - sb.append(separator); + sb.append(","); appendValue(values.get(i), codecRegistry, sb, variables); } return sb; @@ -118,13 +118,13 @@ static StringBuilder appendValue(Object value, CodecRegistry codecRegistry, Stri sb.append(value.toString()); } else if (value instanceof List && !isSerializable(value)) { // bind variables are not supported inside collection literals - appendList((List) value, codecRegistry, sb, null); + appendList((List) value, codecRegistry, sb); } else if (value instanceof Set && !isSerializable(value)) { // bind variables are not supported inside collection literals - appendSet((Set) value, codecRegistry, sb, null); + appendSet((Set) value, codecRegistry, sb); } else if (value instanceof Map && !isSerializable(value)) { // bind variables are not supported inside collection literals - appendMap((Map) value, codecRegistry, sb, null); + appendMap((Map) value, codecRegistry, sb); } else if (variables == null || !isSerializable(value)) { // we are not collecting statement values (variables == null) // or the value is meant to be forcefully appended to the query string: @@ -142,30 +142,30 @@ static StringBuilder appendValue(Object value, CodecRegistry codecRegistry, Stri return sb; } - private static StringBuilder appendList(List l, CodecRegistry codecRegistry, StringBuilder sb, List variables) { + private static StringBuilder appendList(List l, CodecRegistry codecRegistry, StringBuilder sb) { sb.append('['); for (int i = 0; i < l.size(); i++) { if (i > 0) sb.append(','); - appendValue(l.get(i), codecRegistry, sb, variables); + appendValue(l.get(i), codecRegistry, sb, null); } sb.append(']'); return sb; } - private static StringBuilder appendSet(Set s, CodecRegistry codecRegistry, StringBuilder sb, List variables) { + private static StringBuilder appendSet(Set s, CodecRegistry codecRegistry, StringBuilder sb) { sb.append('{'); boolean first = true; for (Object elt : s) { if (first) first = false; else sb.append(','); - appendValue(elt, codecRegistry, sb, variables); + appendValue(elt, codecRegistry, sb, null); } sb.append('}'); return sb; } - private static StringBuilder appendMap(Map m, CodecRegistry codecRegistry, StringBuilder sb, List variables) { + private static StringBuilder appendMap(Map m, CodecRegistry codecRegistry, StringBuilder sb) { sb.append('{'); boolean first = true; for (Map.Entry entry : m.entrySet()) { @@ -173,9 +173,9 @@ private static StringBuilder appendMap(Map m, CodecRegistry codecRegistry, first = false; else sb.append(','); - appendValue(entry.getKey(), codecRegistry, sb, variables); + appendValue(entry.getKey(), codecRegistry, sb, null); sb.append(':'); - appendValue(entry.getValue(), codecRegistry, sb, variables); + appendValue(entry.getValue(), codecRegistry, sb, null); } sb.append('}'); return sb; @@ -189,7 +189,7 @@ static boolean containsBindMarker(Object value) { if (containsBindMarker(param)) return true; if (value instanceof Collection) - for (Object elt : (Collection) value) + for (Object elt : (Collection) value) if (containsBindMarker(elt)) return true; if (value instanceof Map) @@ -203,7 +203,7 @@ static boolean containsSpecialValue(Object value) { if (value instanceof BindMarker || value instanceof FCall || value instanceof CName || value instanceof RawString) return true; if (value instanceof Collection) - for (Object elt : (Collection) value) + for (Object elt : (Collection) value) if (containsSpecialValue(elt)) return true; if (value instanceof Map) @@ -232,7 +232,7 @@ static boolean isSerializable(Object value) { if (value instanceof Number && !(value instanceof BigInteger || value instanceof BigDecimal)) return false; if (value instanceof Collection) - for (Object elt : (Collection) value) + for (Object elt : (Collection) value) if (!isSerializable(elt)) return false; if (value instanceof Map) @@ -253,7 +253,7 @@ static boolean isIdempotent(Object value) { } else if (value instanceof RawString) { return false; } else if (value instanceof Collection) { - for (Object elt : ((Collection) value)) { + for (Object elt : ((Collection) value)) { if (!isIdempotent(elt)) return false; } @@ -273,7 +273,7 @@ static boolean isIdempotent(Object value) { static StringBuilder appendName(String name, StringBuilder sb) { name = name.trim(); // FIXME: checking for token( specifically is uber ugly, we'll need some better solution. - if (cnamePattern.matcher(name).matches() || name.startsWith("\"") || name.startsWith("token(")) + if (name.startsWith("\"") || name.startsWith("token(") || cnamePattern.matcher(name).matches()) sb.append(name); else sb.append('"').append(name).append('"'); @@ -284,7 +284,14 @@ static StringBuilder appendName(Object name, CodecRegistry codecRegistry, String if (name instanceof String) { appendName((String) name, sb); } else if (name instanceof CName) { - appendName(((CName) name).name, codecRegistry, sb); + appendName(((CName) name).name, sb); + } else if (name instanceof Path) { + String[] segments = ((Path) name).segments; + for (int i = 0; i < segments.length; i++) { + if (i > 0) + sb.append('.'); + appendName(segments[i], sb); + } } else if (name instanceof FCall) { FCall fcall = (FCall) name; sb.append(fcall.name).append('('); @@ -480,4 +487,15 @@ public String toString() { return String.format("CAST(%s AS %s)", column, targetType); } } + + static class Path { + + private final String[] segments; + + Path(String... segments) { + this.segments = segments; + } + + } + } diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java index 56ec12630fe..1c8b6810e1b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java @@ -1209,4 +1209,34 @@ public void should_not_append_last_column_twice() throws Exception { .isEqualTo("SELECT a,b FROM users;"); } + /** + * @test_category queries:builder + * @jira_ticket JAVA-1286 + * @jira_ticket CASSANDRA-7423 + */ + @Test(groups = "unit") + public void should_handle_setting_udt_fields() throws Exception { + assertThat( + update("tbl") + .with(set(path("a", quote("B")), "foo")) + .and(set(raw("c.\"D\""), "bar")) + .where(eq("k", 0)).getQueryString()) + .isEqualTo("UPDATE tbl SET a.\"B\"=?,c.\"D\"=? WHERE k=0;"); + } + + /** + * @test_category queries:builder + * @jira_ticket JAVA-1286 + * @jira_ticket CASSANDRA-7423 + */ + @Test(groups = "unit") + public void should_handle_retrieving_udt_fields() throws Exception { + assertThat( + select() + .path("a", Metadata.quote("B")) + .raw("c.\"D\"") + .from("tbl").getQueryString()) + .isEqualTo("SELECT a.\"B\",c.\"D\" FROM tbl;"); + } + } diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderUDTExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderUDTExecutionTest.java index 1bb7ef6f86b..b648ccb817e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderUDTExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderUDTExecutionTest.java @@ -26,6 +26,7 @@ import java.util.Map; import static com.datastax.driver.core.querybuilder.QueryBuilder.*; +import static com.datastax.driver.core.schemabuilder.SchemaBuilder.*; import static org.assertj.core.api.Assertions.assertThat; import static org.testng.Assert.assertEquals; @@ -87,4 +88,49 @@ public void should_handle_collections_of_UDT() throws Exception { r1 = rows.get(0); assertThat(r1.getMap("m", Integer.class, UDTValue.class)).isEqualTo(map); } + + /** + * Ensures that UDT fields can be set and retrieved on their own using {@link QueryBuilder#set} and + * {@link QueryBuilder#select} respectively. + * + * @test_category queries:builder + * @jira_ticket JAVA-1286 + * @jira_ticket CASSANDRA-7423 + */ + @CassandraVersion(value = "3.6", description = "Requires CASSANDRA-7423 introduced in Cassandra 3.6") + @Test(groups = "short") + public void should_support_setting_and_retrieving_udt_fields() { + //given + String table = "unfrozen_udt_table"; + String udt = "person"; + session().execute(createType(udt).addColumn("first", DataType.text()).addColumn("last", DataType.text())); + UserType userType = cluster().getMetadata().getKeyspace(keyspace).getUserType(udt); + assertThat(userType).isNotNull(); + + session().execute(createTable(table).addPartitionKey("k", DataType.text()) + .addUDTColumn("u", udtLiteral(udt)) + ); + + UDTValue value = userType.newValue(); + value.setString("first", "Bob"); + value.setString("last", "Smith"); + session().execute(insertInto(table).value("k", "key").value("u", value)); + + //when - updating udt field + session().execute(update(table).with( + set(path("u", "first"), "Rick")) + .and(set(raw("u.last"), "Jones")) + .where(eq("k", "key"))); + + //then - field should be updated and retrievable by field name. + Row r = session().execute(select() + .path("u", "first") + .raw("u.last") + .from(table) + .where(eq("k", "key"))).one(); + + assertThat(r.getString("u.first")).isEqualTo("Rick"); + assertThat(r.getString("u.last")).isEqualTo("Jones"); + } + } From 6055f075dd47a9fcd43bfd337930595533dc3261 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 17 Feb 2017 13:30:54 -0600 Subject: [PATCH 042/512] Various test fixes for 3.1 --- .../core/querybuilder/QueryBuilderExecutionTest.java | 2 +- .../driver/extras/codecs/json/Jsr353JsonCodecTest.java | 8 ++++---- .../datastax/driver/mapping/MapperAsyncResultTest.java | 2 +- .../driver/mapping/MapperCaseSensitivityTest.java | 2 +- .../com/datastax/driver/mapping/MapperNestedUDTTest.java | 2 +- .../datastax/driver/mapping/MapperPolymorphismTest.java | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java index d17a44f4b5d..0519c047756 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java @@ -320,7 +320,7 @@ public String extract(Row input) { * @jira_ticket JAVA-1153 * @since 3.1.0 */ - @CassandraVersion(major = 3.6, description = "Support for PER PARTITION LIMIT was added to C* 3.6 (CASSANDRA-7017)") + @CassandraVersion(value = "3.6", description = "Support for PER PARTITION LIMIT was added to C* 3.6 (CASSANDRA-7017)") @Test(groups = "short") public void should_support_per_partition_limit() throws Exception { assertThat(session().execute(select().all().from("test_ppl").perPartitionLimit(2))) diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodecTest.java index e2614cde6f7..a60fb5130bd 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodecTest.java @@ -59,7 +59,7 @@ public void onTestContextInitialized() { insertInto(TABLE1).value("k", "key0").value(quote("miXeD"), "d").value("i", 4).value("f", 5.0).toString() ); - if (TestUtils.getDesiredProtocolVersion().compareTo(ProtocolVersion.V3) >= 0) { + if (ccm().getProtocolVersion().compareTo(ProtocolVersion.V3) >= 0) { execute( "CREATE TYPE address (street text, zipcode int, phones list)", String.format("CREATE TABLE %s (k text PRIMARY KEY, v frozen
    )", TABLE2) @@ -184,7 +184,7 @@ private void assertRow(Row row, JsonStructure object) throws IOException { * @since 3.1.0 */ @Test(groups = "short") - @CassandraVersion(major = 2.2) + @CassandraVersion("2.2") public void should_support_select_json_output() throws Exception { // when ResultSet r = session().execute(select().json().from(TABLE1).where(eq("k", "key0"))); @@ -234,7 +234,7 @@ public void should_support_select_json_output() throws Exception { * @since 3.1.0 */ @Test(groups = "short") - @CassandraVersion(major = 2.2) + @CassandraVersion("2.2") public void should_support_insert_json() throws Exception { // when String key = "should_support_insert_json_with_codec_format"; @@ -262,7 +262,7 @@ public void should_support_insert_json() throws Exception { * @since 3.1.0 */ @Test(groups = "short") - @CassandraVersion(major = 2.2) + @CassandraVersion("2.2") public void should_support_fromJson_and_toJson() throws Exception { String key = "should_support_fromJson_and_toJson"; JsonObject inputAddr = Json.createObjectBuilder() diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java index feb197764a0..8cac08bcba4 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java @@ -38,7 +38,7 @@ * @jira_ticket JAVA-1157 */ @SuppressWarnings("unused") -@CassandraVersion(major = 2.0, description = "uses paging") +@CassandraVersion(value = "2.0", description = "uses paging") public class MapperAsyncResultTest extends CCMTestsSupport { @Override diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java index 36d16839aaa..6732fcf7295 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java @@ -27,7 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat; @CCMConfig(createKeyspace = false) -@CassandraVersion(major = 2.1) +@CassandraVersion("2.1") public class MapperCaseSensitivityTest extends CCMTestsSupport { static final String KS = "ks_MapperCaseSensitivityTest"; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedUDTTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedUDTTest.java index 73228ec7b29..fab26bfc69a 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedUDTTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedUDTTest.java @@ -29,7 +29,7 @@ import static org.assertj.core.api.Assertions.assertThat; @SuppressWarnings({"unused"}) -@CassandraVersion(major = 2.1) +@CassandraVersion("2.1") public class MapperNestedUDTTest extends CCMTestsSupport { @Override diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPolymorphismTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPolymorphismTest.java index 65e3f0fc4cf..48b33e36ebb 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPolymorphismTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPolymorphismTest.java @@ -34,7 +34,7 @@ * JAVA-636 Allow @Column annotations on getters/setters as well as fields */ @SuppressWarnings({"unused", "WeakerAccess"}) -@CassandraVersion(major = 2.1) +@CassandraVersion("2.1") public class MapperPolymorphismTest extends CCMTestsSupport { Circle circle = new Circle(new Point2D(11, 22), 12.34); From 6abba76a474b902c4204943079e8465ccb2548eb Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 17 Feb 2017 17:03:38 -0600 Subject: [PATCH 043/512] Update ProtocolVersionRenegotiationTest to use global config Since we run a test matrix in CI we can get full coverage of how the driver behaves when connecting to different C* versions collectively. This is quicker / more reliable than creating a different version cluster each time. --- .../driver/core/ProtocolBetaVersionTest.java | 3 +- .../ProtocolVersionRenegotiationTest.java | 46 +++++++++++++------ 2 files changed, 33 insertions(+), 16 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/ProtocolBetaVersionTest.java b/driver-core/src/test/java/com/datastax/driver/core/ProtocolBetaVersionTest.java index 3de2d668f69..ebb5ac5e2a0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ProtocolBetaVersionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ProtocolBetaVersionTest.java @@ -15,6 +15,7 @@ */ package com.datastax.driver.core; +import com.datastax.driver.core.utils.CassandraVersion; import org.testng.annotations.Test; import static com.datastax.driver.core.ProtocolVersion.V4; @@ -26,7 +27,7 @@ * Tests for the new USE_BETA flag introduced in protocol v5 * and Cassandra 3.10. */ -@CCMConfig(version = "3.10") +@CassandraVersion("3.10") public class ProtocolBetaVersionTest extends CCMTestsSupport { /** diff --git a/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java b/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java index 44817c559dd..f19ba7fc6b4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java @@ -16,42 +16,53 @@ package com.datastax.driver.core; import com.datastax.driver.core.exceptions.UnsupportedProtocolVersionException; +import com.datastax.driver.core.utils.CassandraVersion; +import org.testng.SkipException; +import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; import static com.datastax.driver.core.ProtocolVersion.*; import static org.assertj.core.api.Assertions.assertThat; -@CreateCCM(CreateCCM.TestMode.PER_METHOD) public class ProtocolVersionRenegotiationTest extends CCMTestsSupport { + private ProtocolVersion protocolVersion; + + @BeforeMethod(groups = "short") + public void setUp() { + protocolVersion = ccm().getProtocolVersion(); + } + /** * @jira_ticket JAVA-1367 */ @Test(groups = "short") - @CCMConfig(version = "2.1.16", createCluster = false) public void should_succeed_when_version_provided_and_matches() throws Exception { - Cluster cluster = connectWithVersion(V3); - assertThat(actualProtocolVersion(cluster)).isEqualTo(V3); + Cluster cluster = connectWithVersion(protocolVersion); + assertThat(actualProtocolVersion(cluster)).isEqualTo(protocolVersion); } /** * @jira_ticket JAVA-1367 */ @Test(groups = "short") - @CCMConfig(version = "3.6", createCluster = false) - public void should_fail_when_version_provided_and_too_low_3_6() throws Exception { + @CassandraVersion("3.0") + public void should_fail_when_version_provided_and_too_low_less_than_3_8() throws Exception { + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("3.8")) >= 0) { + throw new SkipException("CASSANDRA-11464 (3.8+) uses the attempted protocol version"); + } UnsupportedProtocolVersionException e = connectWithUnsupportedVersion(V1); assertThat(e.getUnsupportedVersion()).isEqualTo(V1); // pre-CASSANDRA-11464: server replies with its own version - assertThat(e.getServerVersion()).isEqualTo(V4); + assertThat(e.getServerVersion()).isEqualTo(protocolVersion); } /** * @jira_ticket JAVA-1367 */ @Test(groups = "short") - @CCMConfig(version = "3.10", createCluster = false) - public void should_fail_when_version_provided_and_too_low_3_10() throws Exception { + @CassandraVersion("3.8") + public void should_fail_when_version_provided_and_too_low_3_8_plus() throws Exception { UnsupportedProtocolVersionException e = connectWithUnsupportedVersion(V1); assertThat(e.getUnsupportedVersion()).isEqualTo(V1); // post-CASSANDRA-11464: server replies with client's version @@ -62,24 +73,26 @@ public void should_fail_when_version_provided_and_too_low_3_10() throws Exceptio * @jira_ticket JAVA-1367 */ @Test(groups = "short") - @CCMConfig(version = "1.2.19", createCluster = false) public void should_fail_when_version_provided_and_too_high() throws Exception { + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.2")) >= 0) { + throw new SkipException("Server supports protocol V4"); + } UnsupportedProtocolVersionException e = connectWithUnsupportedVersion(V4); assertThat(e.getUnsupportedVersion()).isEqualTo(V4); // pre-CASSANDRA-11464: server replies with its own version - assertThat(e.getServerVersion()).isEqualTo(V1); + assertThat(e.getServerVersion()).isEqualTo(protocolVersion); } /** * @jira_ticket JAVA-1367 */ @Test(groups = "short") - @CCMConfig(version = "2.1.16", createCluster = false) public void should_fail_when_beta_allowed_and_too_high() throws Exception { + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("3.10")) >= 0) { + throw new SkipException("Server supports protocol protocol V5 beta"); + } UnsupportedProtocolVersionException e = connectWithUnsupportedBetaVersion(); assertThat(e.getUnsupportedVersion()).isEqualTo(V5); - // pre-CASSANDRA-11464: server replies with its own version - assertThat(e.getServerVersion()).isEqualTo(V3); } /** @@ -88,8 +101,11 @@ public void should_fail_when_beta_allowed_and_too_high() throws Exception { @Test(groups = "short") @CCMConfig(version = "2.1.16", createCluster = false) public void should_negotiate_when_no_version_provided() throws Exception { + if (protocolVersion.compareTo(ProtocolVersion.NEWEST_SUPPORTED) >= 0) { + throw new SkipException("Server supports newest protocol version driver supports"); + } Cluster cluster = connectWithoutVersion(); - assertThat(actualProtocolVersion(cluster)).isEqualTo(V3); + assertThat(actualProtocolVersion(cluster)).isEqualTo(protocolVersion); } private UnsupportedProtocolVersionException connectWithUnsupportedVersion(ProtocolVersion version) { From 697d90310ce164b6e953bc6d99607c9b6b286497 Mon Sep 17 00:00:00 2001 From: Olivier Michallat Date: Thu, 23 Feb 2017 10:30:04 -0800 Subject: [PATCH 044/512] JAVA-1404: Fix min token handling in TokenRange.contains (#813) --- changelog/README.md | 5 +++ .../com/datastax/driver/core/TokenRange.java | 30 ++++++++++---- .../driver/core/TokenRangeAssert.java | 10 +++++ .../datastax/driver/core/TokenRangeTest.java | 39 +++++++++++++++++++ 4 files changed, 76 insertions(+), 8 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index a7ab4f345e9..dbec61d9fd6 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,5 +1,10 @@ ## Changelog +### 3.0.8 (in progress) + +- [bug] JAVA-1404: Fix min token handling in TokenRange.contains. + + ### 3.0.7 - [bug] JAVA-1371: Reintroduce connection pool timeout. diff --git a/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java b/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java index 3b91c638075..4bde4774d16 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java @@ -215,7 +215,7 @@ public List intersectWith(TokenRange that) { * Checks whether this range contains a given token. * * @param token the token to check for. - * @return whether this range contains the token, i.e. {@code range.start < token <= range.end}. + * @return whether this range contains the token, i.e. {@code range.start < token <= range.end}. */ public boolean contains(Token token) { return contains(token, false); @@ -224,13 +224,27 @@ public boolean contains(Token token) { // isStart handles the case where the token is the start of another range, for example: // * ]1,2] contains 2, but it does not contain the start of ]2,3] // * ]1,2] does not contain 1, but it contains the start of ]1,3] - private boolean contains(Token token, boolean isStart) { - boolean isAfterStart = isStart ? token.compareTo(start) >= 0 : token.compareTo(start) > 0; - boolean isBeforeEnd = end.equals(factory.minToken()) || - (isStart ? token.compareTo(end) < 0 : token.compareTo(end) <= 0); - return isWrappedAround() - ? isAfterStart || isBeforeEnd - : isAfterStart && isBeforeEnd; + @VisibleForTesting + boolean contains(Token token, boolean isStart) { + if (isEmpty()) { + return false; + } + Token minToken = factory.minToken(); + if (end.equals(minToken)) { + if (start.equals(minToken)) { // ]min, min] = full ring, contains everything + return true; + } else if (token.equals(minToken)) { + return !isStart; + } else { + return isStart ? token.compareTo(start) >= 0 : token.compareTo(start) > 0; + } + } else { + boolean isAfterStart = isStart ? token.compareTo(start) >= 0 : token.compareTo(start) > 0; + boolean isBeforeEnd = isStart ? token.compareTo(end) < 0 : token.compareTo(end) <= 0; + return isWrappedAround() + ? isAfterStart || isBeforeEnd // ####]----]#### + : isAfterStart && isBeforeEnd; // ----]####]---- + } } /** diff --git a/driver-core/src/test/java/com/datastax/driver/core/TokenRangeAssert.java b/driver-core/src/test/java/com/datastax/driver/core/TokenRangeAssert.java index d1d53ae9c97..b41e4628687 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TokenRangeAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TokenRangeAssert.java @@ -99,4 +99,14 @@ public TokenRangeAssert doesNotIntersect(TokenRange... that) { } return this; } + + public TokenRangeAssert contains(Token token, boolean isStart) { + assertThat(actual.contains(token, isStart)).isTrue(); + return this; + } + + public TokenRangeAssert doesNotContain(Token token, boolean isStart) { + assertThat(actual.contains(token, isStart)).isFalse(); + return this; + } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/TokenRangeTest.java b/driver-core/src/test/java/com/datastax/driver/core/TokenRangeTest.java index 12e1f190dac..d0185b4b31f 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TokenRangeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TokenRangeTest.java @@ -235,6 +235,45 @@ public void should_create_empty_token_ranges_if_too_many_splits() { } } + @Test(groups = "unit") + public void should_check_if_range_contains_token() { + // ]1,2] contains 2, but it does not contain the start of ]2,3] + assertThat(tokenRange(1, 2)) + .contains(newM3PToken(2), false) + .doesNotContain(newM3PToken(2), true); + // ]1,2] does not contain 1, but it contains the start of ]1,3] + assertThat(tokenRange(1, 2)) + .doesNotContain(newM3PToken(1), false) + .contains(newM3PToken(1), true); + + // ]2,1] contains the start of ]min,5] + assertThat(tokenRange(2, 1)) + .contains(minToken, true); + + // ]min, 1] does not contain min, but it contains the start of ]min, 2] + assertThat(tokenRange(minToken, 1)) + .doesNotContain(minToken, false) + .contains(minToken, true); + // ]1, min] contains min, but not the start of ]min, 2] + assertThat(tokenRange(1, minToken)) + .contains(minToken, false) + .doesNotContain(minToken, true); + + // An empty range contains nothing + assertThat(tokenRange(1, 1)) + .doesNotContain(newM3PToken(1), true) + .doesNotContain(newM3PToken(1), false) + .doesNotContain(minToken, true) + .doesNotContain(minToken, false); + + // The whole ring contains everything + assertThat(tokenRange(minToken, minToken)) + .contains(minToken, true) + .contains(minToken, false) + .contains(newM3PToken(1), true) + .contains(newM3PToken(1), false); + } + private TokenRange tokenRange(long start, long end) { return new TokenRange(newM3PToken(start), newM3PToken(end), factory); } From c027f7d064c62635ad518e091522996c2228b08a Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 23 Feb 2017 13:44:49 -0600 Subject: [PATCH 045/512] Remove should_fail_when_version_provided_and_too_low_less_than_3_8 This test is driven by the behavior of C* 3.0 which changes in 3.0.9. should_fail_when_version_provided_and_too_low_3_8_plus should be adequate in that it verifies driver isn't able to connect when version provided is too low. --- .../core/ProtocolVersionRenegotiationTest.java | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java b/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java index f19ba7fc6b4..a1ffbacd821 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java @@ -42,21 +42,6 @@ public void should_succeed_when_version_provided_and_matches() throws Exception assertThat(actualProtocolVersion(cluster)).isEqualTo(protocolVersion); } - /** - * @jira_ticket JAVA-1367 - */ - @Test(groups = "short") - @CassandraVersion("3.0") - public void should_fail_when_version_provided_and_too_low_less_than_3_8() throws Exception { - if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("3.8")) >= 0) { - throw new SkipException("CASSANDRA-11464 (3.8+) uses the attempted protocol version"); - } - UnsupportedProtocolVersionException e = connectWithUnsupportedVersion(V1); - assertThat(e.getUnsupportedVersion()).isEqualTo(V1); - // pre-CASSANDRA-11464: server replies with its own version - assertThat(e.getServerVersion()).isEqualTo(protocolVersion); - } - /** * @jira_ticket JAVA-1367 */ From 760e57e1c936180fd24a5ccb852d5ce0b7ed8efe Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 24 Feb 2017 11:11:34 -0600 Subject: [PATCH 046/512] Remove use of MathJax from javadocs, update guava javadoc link Motivation: In Java 8 update 121 javadoc is now more strict about including script tags in comments, headers, etc. A new option --allow-script-in-comments was added to allow this, but it does not support older versions of JDK 8. Limitations in maven make it difficult to selectively inject options based on JDK update versions. Since we only use script tags for MathJax in one method (LatencyAwarePolicy.Builder.withScale) we opted to remove our use of MathJax and use {@code} instead. Modifications: Remove MathJax from javadoc header. Remove javascript that changed link target based on URL. Update LatencyAwarePolicy.Builder.withScale to use {@code} instead of LateX. Update guava javadoc link. Result: Build now works with Java 8 Update 121+. --- .../core/policies/LatencyAwarePolicy.java | 20 +++++++++---------- pom.xml | 16 +-------------- 2 files changed, 10 insertions(+), 26 deletions(-) diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java index 10f681c35e1..b375957b22c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java @@ -589,18 +589,16 @@ public Builder withExclusionThreshold(double exclusionThreshold) { * Sets the scale to use for the resulting latency aware policy. *

    * The {@code scale} provides control on how the weight given to older latencies - * decreases over time. For a given host, if a new latency \(l\) is received at - * time \(t\), and the previously calculated average is \(prev\) calculated at - * time \(t'\), then the newly calculated average \(avg\) for that host is calculated + * decreases over time. For a given host, if a new latency {@code l} is received at + * time {@code t}, and the previously calculated average is {@code prev} calculated at + * time {@code t'}, then the newly calculated average {@code avg} for that host is calculated * thusly: - * \[ - * d = \frac{t - t'}{scale} \\ - * \alpha = 1 - \left(\frac{\ln(d+1)}{d}\right) \\ - * avg = \alpha * l + (1-\alpha) * prev - * \] + *

    {@code d = (t - t') / scale
    +         * alpha = 1 - (ln(d+1) / d)
    +         * avg = alpha * l + (1 - alpha * prev)}
    * Typically, with a {@code scale} of 100 milliseconds (the default), if a new - * latency is measured and the previous measure is 10 millisecond old (so \(d=0.1\)), - * then \(\alpha\) will be around \(0.05\). In other words, the new latency will + * latency is measured and the previous measure is 10 millisecond old (so {@code d=0.1}), + * then {@code alpha} will be around {@code 0.05}. In other words, the new latency will * weight 5% of the updated average. A bigger scale will get less weight to new * measurements (compared to previous ones), a smaller one will give them more weight. *

    @@ -612,7 +610,7 @@ public Builder withExclusionThreshold(double exclusionThreshold) { * @param scale the scale to use. * @param unit the unit of {@code scale}. * @return this builder. - * @throws IllegalArgumentException if {@code scale <e; 0}. + * @throws IllegalArgumentException if {@code scale <= 0}. */ public Builder withScale(long scale, TimeUnit unit) { if (scale <= 0) diff --git a/pom.xml b/pom.xml index 64554a996d8..2f54d9f9aa1 100644 --- a/pom.xml +++ b/pom.xml @@ -228,23 +228,9 @@ false ${javadoc.opts} - -

    - <script type="text/javascript" - src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script> -
    - - - <script type="text/javascript"> - for(var i in document.links) { - var link = document.links[i]; - if (link.href.indexOf('is-external=true') != -1) link.target = '_blank'; - } - </script> - https://docs.oracle.com/javase/8/docs/api/ - http://docs.guava-libraries.googlecode.com/git-history/v16.0.1/javadoc/ + http://google.github.io/guava/releases/16.0.1/api/docs/ http://netty.io/4.0/api/ http://www.joda.org/joda-time/apidocs/ From 6cf63e2ef9f4b4ac3399feb8e5c1d79d3f57029a Mon Sep 17 00:00:00 2001 From: GregBestland Date: Tue, 21 Feb 2017 16:33:37 -0600 Subject: [PATCH 047/512] Updating ConsistencyTest to use scassandra. --- .../datastax/driver/core/ConsistencyTest.java | 910 +++++------------- pom.xml | 2 +- 2 files changed, 268 insertions(+), 644 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java index a3c0175ebc2..d036f4263bd 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java @@ -15,716 +15,340 @@ */ package com.datastax.driver.core; -import com.datastax.driver.core.exceptions.InvalidQueryException; -import com.datastax.driver.core.exceptions.ReadTimeoutException; -import com.datastax.driver.core.exceptions.UnavailableException; -import com.datastax.driver.core.exceptions.WriteTimeoutException; -import com.datastax.driver.core.policies.DCAwareRoundRobinPolicy; -import com.datastax.driver.core.policies.DowngradingConsistencyRetryPolicy; -import com.datastax.driver.core.policies.RoundRobinPolicy; -import com.datastax.driver.core.policies.TokenAwarePolicy; -import com.google.common.util.concurrent.Uninterruptibles; + +import org.scassandra.Scassandra; +import org.scassandra.http.client.BatchExecution; +import org.scassandra.http.client.PreparedStatementExecution; +import org.scassandra.http.client.Query; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; -import java.util.Arrays; -import java.util.EnumSet; import java.util.List; -import java.util.Set; -import java.util.concurrent.TimeUnit; - -import static com.datastax.driver.core.CreateCCM.TestMode.PER_METHOD; -import static com.datastax.driver.core.TestUtils.IP_PREFIX; -import static com.datastax.driver.core.TestUtils.ipOfNode; -import static java.util.Collections.emptyList; -import static java.util.Collections.singletonList; -import static org.testng.Assert.assertTrue; -import static org.testng.Assert.fail; - -@SuppressWarnings("unused") -@CreateCCM(PER_METHOD) -@CCMConfig( - dirtiesContext = true, - createKeyspace = false, - config = { - // tests fail often with write or read timeouts - "phi_convict_threshold:5", - "read_request_timeout_in_ms:200000", - "write_request_timeout_in_ms:200000" - } -) -public class ConsistencyTest extends AbstractPoliciesTest { + +import static com.datastax.driver.core.TestUtils.nonQuietClusterCloseOptions; +import static org.testng.Assert.*; + +public class ConsistencyTest { + private static final Logger logger = LoggerFactory.getLogger(ConsistencyTest.class); + private ScassandraCluster sCluster; - private Cluster.Builder tokenAwareRoundRobin() { - return Cluster.builder() - .withSocketOptions(new SocketOptions().setReadTimeoutMillis(300000)) - .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())); - } + @BeforeClass + public void setUp() { + sCluster = ScassandraCluster.builder().withNodes(1).build(); + sCluster.init(); - private Cluster.Builder tokenAwareRoundRobinNoShuffle() { - return Cluster.builder() - .withSocketOptions(new SocketOptions().setReadTimeoutMillis(300000)) - .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)); } - private Cluster.Builder tokenAwareRoundRobinDowngrading() { - return Cluster.builder() - .withSocketOptions(new SocketOptions().setReadTimeoutMillis(300000)) - .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())) - .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); + @AfterMethod + public void tearDown() { + clearActivityLog(); } - private Cluster.Builder tokenAwareRoundRobinNoShuffleDowngrading() { - return Cluster.builder() - .withSocketOptions(new SocketOptions().setReadTimeoutMillis(300000)) - .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)) - .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); - } - private Cluster.Builder roundRobinDowngrading() { - return Cluster.builder() - .withSocketOptions(new SocketOptions().setReadTimeoutMillis(300000)) - .withLoadBalancingPolicy(new RoundRobinPolicy()) - .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); + public void clearActivityLog() { + for (Scassandra node : sCluster.nodes()) { + node.activityClient().clearAllRecordedActivity(); + } } - private Cluster.Builder tokenAwareDCAwareRoundRobinNoShuffleDowngrading() { + public Cluster.Builder builder() { + //Note: nonQuietClusterCloseOptions is used to speed up tests return Cluster.builder() - .withSocketOptions(new SocketOptions().setReadTimeoutMillis(300000)) - .withLoadBalancingPolicy(new TokenAwarePolicy(DCAwareRoundRobinPolicy.builder().withLocalDc("dc2").build(), false)) - .withRetryPolicy(DowngradingConsistencyRetryPolicy.INSTANCE); + .addContactPoints(sCluster.address(1).getAddress()) + .withPort(sCluster.getBinaryPort()).withNettyOptions(nonQuietClusterCloseOptions); } - @Test(groups = "long") - @CCMConfig( - numberOfNodes = 3, - clusterProvider = "tokenAwareRoundRobin") - public void testRFOneTokenAware() throws Throwable { - - createSchema(1); - init(12, ConsistencyLevel.ONE); - query(12, ConsistencyLevel.ONE); - - assertQueried(IP_PREFIX + '1', 0); - assertQueried(IP_PREFIX + '2', 12); - assertQueried(IP_PREFIX + '3', 0); - - resetCoordinators(); - stopAndWait(2); - - List acceptedList = singletonList(ConsistencyLevel.ANY); - - List failList = Arrays.asList( - ConsistencyLevel.ONE, - ConsistencyLevel.TWO, - ConsistencyLevel.THREE, - ConsistencyLevel.QUORUM, - ConsistencyLevel.ALL, - ConsistencyLevel.LOCAL_QUORUM, - ConsistencyLevel.EACH_QUORUM); - - // Test successful writes - for (ConsistencyLevel cl : acceptedList) { - try { - init(12, cl); - } catch (Exception e) { - fail(String.format("Test failed at CL.%s with message: %s", cl, e.getMessage())); - } - } - - // Test successful reads - for (ConsistencyLevel cl : acceptedList) { - try { - query(12, cl); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = singletonList( - "ANY ConsistencyLevel is only supported for writes"); - assertTrue(acceptableErrorMessages.contains(e.getMessage())); - } + public void checkSerialCLMatch(ConsistencyLevel expected, String received) { + /** + * This method checks the expected/sent serial consistency level against that which is received. + * ConsistencyLevel.SERIAL is the default serial consistency level, so even when sent it will return + * as null. + */ + if (expected.equals(ConsistencyLevel.SERIAL)) { + assertNull(received); + + } else { + assertTrue(received.equals(expected.toString())); } + } - // Test writes which should fail - for (ConsistencyLevel cl : failList) { - try { - init(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "consistency level LOCAL_QUORUM not compatible with replication strategy (org.apache.cassandra.locator.SimpleStrategy)", - "consistency level EACH_QUORUM not compatible with replication strategy (org.apache.cassandra.locator.SimpleStrategy)"); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), String.format("Received: %s", e.getMessage())); - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } catch (WriteTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } + public PreparedStatementExecution executePrepared(Session session, String statement, ConsistencyLevel level, ConsistencyLevel serialLevel) { + PreparedStatement ps = session.prepare(statement); + BoundStatement bound = ps.bind(); + if (level != null) { + bound.setConsistencyLevel(level); } - - // Test reads which should fail - for (ConsistencyLevel cl : failList) { - try { - query(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "consistency level LOCAL_QUORUM not compatible with replication strategy (org.apache.cassandra.locator.SimpleStrategy)", - "EACH_QUORUM ConsistencyLevel is only supported for writes"); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), String.format("Received: %s", e.getMessage())); - } catch (ReadTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } + if (serialLevel != null) { + bound.setSerialConsistencyLevel(serialLevel); } + session.execute(bound); + List pses = sCluster.node(1).activityClient().retrievePreparedStatementExecutions(); + PreparedStatementExecution pse = pses.get(0); + assertTrue(pse.getPreparedStatementText().equals(statement)); + return pse; } - @Test(groups = "long") - @CCMConfig(numberOfNodes = 3, - clusterProvider = "tokenAwareRoundRobinNoShuffle") - public void testRFTwoTokenAware() throws Throwable { - createSchema(2); - init(12, ConsistencyLevel.TWO); - query(12, ConsistencyLevel.TWO); - - assertQueried(IP_PREFIX + '1', 0); - assertQueried(IP_PREFIX + '2', 12); - assertQueried(IP_PREFIX + '3', 0); - - resetCoordinators(); - stopAndWait(2); - - List acceptedList = Arrays.asList( - ConsistencyLevel.ANY, - ConsistencyLevel.ONE - ); - - List failList = Arrays.asList( - ConsistencyLevel.TWO, - ConsistencyLevel.QUORUM, - ConsistencyLevel.THREE, - ConsistencyLevel.ALL, - ConsistencyLevel.LOCAL_QUORUM, - ConsistencyLevel.EACH_QUORUM); - - // Test successful writes - for (ConsistencyLevel cl : acceptedList) { - try { - init(12, cl); - } catch (Exception e) { - fail(String.format("Test failed at CL.%s with message: %s", cl, e.getMessage())); - } - } + public BatchExecution executeBatch(Session session, String statement, ConsistencyLevel level, ConsistencyLevel serialLevel) { + BatchStatement batch = new BatchStatement(); + batch.add(new SimpleStatement(statement)); - // Test successful reads - for (ConsistencyLevel cl : acceptedList) { - try { - query(12, cl); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = singletonList( - "ANY ConsistencyLevel is only supported for writes"); - assertTrue(acceptableErrorMessages.contains(e.getMessage())); - } + if (level != null) { + batch.setConsistencyLevel(level); } - - // Test writes which should fail - for (ConsistencyLevel cl : failList) { - try { - init(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "consistency level LOCAL_QUORUM not compatible with replication strategy (org.apache.cassandra.locator.SimpleStrategy)", - "consistency level EACH_QUORUM not compatible with replication strategy (org.apache.cassandra.locator.SimpleStrategy)"); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), String.format("Received: %s", e.getMessage())); - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } catch (WriteTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } + if (serialLevel != null) { + batch.setSerialConsistencyLevel(serialLevel); } + session.execute(batch); + List batches = sCluster.node(1).activityClient().retrieveBatches(); + assertEquals(batches.size(), 1); + return batches.get(0); + } - // Test reads which should fail - for (ConsistencyLevel cl : failList) { - try { - query(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "consistency level LOCAL_QUORUM not compatible with replication strategy (org.apache.cassandra.locator.SimpleStrategy)", - "EACH_QUORUM ConsistencyLevel is only supported for writes"); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), String.format("Received: %s", e.getMessage())); - } catch (ReadTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } + public Query executeSimple(Session session, String statement, ConsistencyLevel level, ConsistencyLevel serialLevel) { + SimpleStatement simpleStatement = new SimpleStatement(statement); + if (level != null) { + simpleStatement.setConsistencyLevel(level); + } + if (serialLevel != null) { + simpleStatement.setSerialConsistencyLevel(serialLevel); } + session.execute(simpleStatement); + //Find the unique query in the activity log. + List queries = sCluster.node(1).activityClient().retrieveQueries(); + for (Query query : queries) { + if (query.getQuery().equals(statement)) + return query; + } + return null; } - @Test(groups = "long") - @CCMConfig(numberOfNodes = 3, - clusterProvider = "tokenAwareRoundRobinNoShuffle") - public void testRFThreeTokenAware() throws Throwable { - createSchema(3); - init(12, ConsistencyLevel.TWO); - query(12, ConsistencyLevel.TWO); - - assertQueried(IP_PREFIX + '1', 0); - assertQueried(IP_PREFIX + '2', 12); - assertQueried(IP_PREFIX + '3', 0); - - resetCoordinators(); - stopAndWait(2); - - Set cls = EnumSet.allOf(ConsistencyLevel.class); - // Remove serial consistencies as they require conditional read/writes - cls.remove(ConsistencyLevel.SERIAL); - cls.remove(ConsistencyLevel.LOCAL_SERIAL); - - List acceptedList = Arrays.asList( - ConsistencyLevel.ANY, - ConsistencyLevel.ONE, - ConsistencyLevel.TWO, - ConsistencyLevel.QUORUM, - ConsistencyLevel.LOCAL_QUORUM, - ConsistencyLevel.EACH_QUORUM - ); - - List failList = Arrays.asList( - ConsistencyLevel.THREE, - ConsistencyLevel.ALL - ); - - - // Test successful writes - for (ConsistencyLevel cl : acceptedList) { - try { - init(12, cl); - } catch (Exception e) { - fail(String.format("Test failed at CL.%s with message: %s", cl, e.getMessage())); - } - } + /** + * When no consistency level is defined the default of LOCAL_ONE should be used. + * + * @test_category consistency + */ + @Test(groups = "short") + public void should_use_global_default_cl_when_none_specified() throws Throwable { - // Test successful reads - for (ConsistencyLevel cl : acceptedList) { - try { - query(12, cl); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "ANY ConsistencyLevel is only supported for writes", - "EACH_QUORUM ConsistencyLevel is only supported for writes" - ); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), "Got unexpected message " + e.getMessage()); - } - } + //Build a cluster with no CL level set in the query options. + Cluster cluster = builder().build(); + try { + Session session = cluster.connect(); - // Test writes which should fail - for (ConsistencyLevel cl : failList) { - try { - init(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } catch (WriteTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } - } + //Construct unique simple statement query, with no CL defined. + //Check to ensure + String queryString = "default_cl"; + Query clQuery = executeSimple(session, queryString, null, null); + assertTrue(clQuery.getConsistency().equals(ConsistencyLevel.LOCAL_ONE.toString())); - // Test reads which should fail - for (ConsistencyLevel cl : failList) { - try { - query(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (ReadTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } - } - } + //Check prepared statement default CL + String prepareString = "prepared_default_cl"; + PreparedStatementExecution pse = executePrepared(session, prepareString, null, null); + assertTrue(pse.getConsistency().equals(ConsistencyLevel.LOCAL_ONE.toString())); + //Check batch statement default CL + String batchStateString = "batch_default_cl"; + BatchExecution batch = executeBatch(session, batchStateString, null, null); + assertTrue(batch.getConsistency().equals(ConsistencyLevel.LOCAL_ONE.toString())); - @Test(groups = "long") - @CCMConfig(numberOfNodes = 3, - clusterProvider = "tokenAwareRoundRobinDowngrading") - public void testRFOneDowngradingCL() throws Throwable { - createSchema(1); - init(12, ConsistencyLevel.ONE); - query(12, ConsistencyLevel.ONE); - - assertQueried(IP_PREFIX + '1', 0); - assertQueried(IP_PREFIX + '2', 12); - assertQueried(IP_PREFIX + '3', 0); - - resetCoordinators(); - stopAndWait(2); - - List acceptedList = singletonList( - ConsistencyLevel.ANY - ); - - List failList = Arrays.asList( - ConsistencyLevel.ONE, - ConsistencyLevel.TWO, - ConsistencyLevel.THREE, - ConsistencyLevel.QUORUM, - ConsistencyLevel.ALL, - ConsistencyLevel.LOCAL_QUORUM, - ConsistencyLevel.EACH_QUORUM); - - // Test successful writes - for (ConsistencyLevel cl : acceptedList) { - try { - init(12, cl); - } catch (Exception e) { - fail(String.format("Test failed at CL.%s with message: %s", cl, e.getMessage())); - } - } - // Test successful reads - for (ConsistencyLevel cl : acceptedList) { - try { - query(12, cl); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = singletonList( - "ANY ConsistencyLevel is only supported for writes"); - assertTrue(acceptableErrorMessages.contains(e.getMessage())); - } + } finally { + cluster.close(); } + } - // Test writes which should fail - for (ConsistencyLevel cl : failList) { - try { - init(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } catch (WriteTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } + /** + * Exhaustively tests all consistency levels when they are set via QueryOptions. + * + * @test_category consistency + */ + @Test(groups = "short", dataProvider = "consistencyLevels", dataProviderClass = DataProviders.class) + public void should_use_query_option_cl(ConsistencyLevel cl) throws Throwable { + //Build a cluster with a CL level set in the query options. + Cluster cluster = builder().withQueryOptions(new QueryOptions().setConsistencyLevel(cl)).build(); + try { + Session session = cluster.connect(); + //Construct unique query, with no CL defined. + String queryString = "query_cl"; + Query clQuery = executeSimple(session, queryString, null, null); + assertTrue(clQuery.getConsistency().equals(cl.toString())); + + //Check prepared statement CL + String prepareString = "preapred_query_cl"; + PreparedStatementExecution pse = executePrepared(session, prepareString, null, null); + assertTrue(pse.getConsistency().equals(cl.toString())); + + //Check batch statement CL + String batchStateString = "batch_query_cl"; + BatchExecution batch = executeBatch(session, batchStateString, null, null); + assertTrue(batch.getConsistency().equals(cl.toString())); + + } finally { + cluster.close(); } - // Test reads which should fail - for (ConsistencyLevel cl : failList) { - try { - query(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = singletonList( - "EACH_QUORUM ConsistencyLevel is only supported for writes" - ); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), "Got unexpected message " + e.getMessage()); - } catch (ReadTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } - } } - @Test(groups = "long") - @CCMConfig(numberOfNodes = 3, - clusterProvider = "tokenAwareRoundRobinNoShuffleDowngrading") - public void testRFTwoDowngradingCL() throws Throwable { - createSchema(2); - init(12, ConsistencyLevel.TWO); - query(12, ConsistencyLevel.TWO); - - assertQueried(IP_PREFIX + '1', 0); - assertQueried(IP_PREFIX + '2', 12); - assertQueried(IP_PREFIX + '3', 0); - - resetCoordinators(); - stopAndWait(2); - - Set acceptedList = EnumSet.allOf(ConsistencyLevel.class); - // Remove serial consistencies as they require conditional read/writes - acceptedList.remove(ConsistencyLevel.SERIAL); - acceptedList.remove(ConsistencyLevel.LOCAL_SERIAL); - - // Test successful writes - for (ConsistencyLevel cl : acceptedList) { - try { - init(12, cl); - } catch (Exception e) { - fail(String.format("Test failed at CL.%s with message: %s", cl, e.getMessage())); - } + /** + * Exhaustively tests all consistency levels when they are set at the statement level. + * + * @test_category consistency + */ + @Test(groups = "short", dataProvider = "consistencyLevels", dataProviderClass = DataProviders.class) + public void should_use_statement_cl(ConsistencyLevel cl) throws Throwable { + //Build a cluster with no CL set in the query options. + //Note: nonQuietClusterCloseOptions is used to speed up tests + Cluster cluster = builder().build(); + try { + Session session = cluster.connect(); + //Construct unique query statement with a CL defined. + String queryString = "statement_cl"; + Query clQuery = executeSimple(session, queryString, cl, null); + assertTrue(clQuery.getConsistency().equals(cl.toString())); + + //Check prepared statement CL + String prepareString = "preapred_statement_cl"; + PreparedStatementExecution pse = executePrepared(session, prepareString, cl, null); + assertTrue(pse.getConsistency().equals(cl.toString())); + + //Check batch statement CL + String batchStateString = "batch_statement_cl"; + BatchExecution batch = executeBatch(session, batchStateString, cl, null); + assertTrue(batch.getConsistency().equals(cl.toString())); + } finally { + cluster.close(); } - // Test successful reads - for (ConsistencyLevel cl : acceptedList) { - try { - query(12, cl); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "ANY ConsistencyLevel is only supported for writes", - "EACH_QUORUM ConsistencyLevel is only supported for writes" - ); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), "Got unexpected message " + e.getMessage()); - } - } } - @Test(groups = "long") - @CCMConfig(numberOfNodes = 3, - clusterProvider = "roundRobinDowngrading") - public void testRFThreeRoundRobinDowngradingCL() throws Throwable { - testRFThreeDowngradingCL(); - } + /** + * Tests that order of precedence is followed when defining CLs. + * Statement level CL should be honored above QueryOptions. + * QueryOptions should be honored above default CL. + * + * @test_category consistency + */ + @Test(groups = "short") + public void should_use_appropriate_cl_when_multiple_defined() throws Throwable { + ConsistencyLevel cl_one = ConsistencyLevel.ONE; + //Build a cluster with no CL set in the query options. + Cluster cluster = builder().withQueryOptions(new QueryOptions().setConsistencyLevel(cl_one)).build(); + try { - @Test(groups = "long") - @CCMConfig(numberOfNodes = 3, - clusterProvider = "tokenAwareRoundRobinNoShuffleDowngrading") - public void testRFThreeTokenAwareDowngradingCL() throws Throwable { - testRFThreeDowngradingCL(); - } - private void testRFThreeDowngradingCL() throws Throwable { + Session session = cluster.connect(); - createSchema(3); - init(12, ConsistencyLevel.ALL); - query(12, ConsistencyLevel.ALL); + //Check order of precedence for simple statements + //Construct unique query statement with no CL defined. + String queryString = "opts_cl"; + Query clQuery = executeSimple(session, queryString, null, null); + assertTrue(clQuery.getConsistency().equals(cl_one.toString())); - try { - // This test catches TokenAwarePolicy - // However, full tests in LoadBalancingPolicyTest.java - assertQueried(IP_PREFIX + '1', 0); - assertQueried(IP_PREFIX + '2', 12); - assertQueried(IP_PREFIX + '3', 0); - } catch (AssertionError e) { - // This test catches RoundRobinPolicy - assertQueried(IP_PREFIX + '1', 4); - assertQueried(IP_PREFIX + '2', 4); - assertQueried(IP_PREFIX + '3', 4); - } + //Construct unique query statement with a CL defined. + ConsistencyLevel cl_all = ConsistencyLevel.ALL; + queryString = "stm_cl"; + clQuery = executeSimple(session, queryString, cl_all, null); + assertTrue(clQuery.getConsistency().equals(cl_all.toString())); - resetCoordinators(); - stopAndWait(2); - - Set acceptedList = EnumSet.allOf(ConsistencyLevel.class); - // Remove serial consistencies as they require conditional read/writes - acceptedList.remove(ConsistencyLevel.SERIAL); - acceptedList.remove(ConsistencyLevel.LOCAL_SERIAL); - - // Test successful writes - for (ConsistencyLevel cl : acceptedList) { - try { - init(12, cl); - } catch (Exception e) { - fail(String.format("Test failed at CL.%s with message: %s", cl, e.getMessage())); - } - } + //Check order of precedence for prepared statements + //Construct unique prepared statement with no CL defined. + String prepareString = "prep_opts_cl"; + PreparedStatementExecution pse = executePrepared(session, prepareString, null, null); + assertTrue(pse.getConsistency().equals(cl_one.toString())); + clearActivityLog(); - // Test successful reads - for (ConsistencyLevel cl : acceptedList) { - try { - query(12, cl); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "ANY ConsistencyLevel is only supported for writes", - "EACH_QUORUM ConsistencyLevel is only supported for writes" - ); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), "Got unexpected message " + e.getMessage()); - } - } - } + //Construct unique prepared statement with a CL defined. + prepareString = "prep_stm_cl"; + pse = executePrepared(session, prepareString, cl_all, null); + assertTrue(pse.getConsistency().equals(cl_all.toString())); - @Test(groups = "long") - @CCMConfig( - numberOfNodes = {3, 3}, - clusterProvider = "tokenAwareRoundRobinNoShuffleDowngrading" - ) - public void testRFThreeDowngradingCLTwoDCs() throws Throwable { - createMultiDCSchema(3, 3); - init(12, ConsistencyLevel.TWO); - query(12, ConsistencyLevel.TWO); - - assertQueried(IP_PREFIX + '1', 0); - assertQueried(IP_PREFIX + '2', 12); - assertQueried(IP_PREFIX + '3', 0); - assertQueried(IP_PREFIX + '4', 0); - assertQueried(IP_PREFIX + '5', 0); - assertQueried(IP_PREFIX + '6', 0); - - resetCoordinators(); - stopAndWait(3); - - List acceptedList = Arrays.asList( - ConsistencyLevel.ANY, - ConsistencyLevel.ONE, - ConsistencyLevel.TWO, - ConsistencyLevel.QUORUM, - ConsistencyLevel.THREE, - ConsistencyLevel.ALL, - ConsistencyLevel.LOCAL_QUORUM, - ConsistencyLevel.EACH_QUORUM - ); - - List failList = emptyList(); - - // Test successful writes - for (ConsistencyLevel cl : acceptedList) { - logger.debug("Test successful init(): " + cl); - try { - init(12, cl); - } catch (Exception e) { - fail(String.format("Test failed at CL.%s with message: %s", cl, e.getMessage())); - } - } - // Test successful reads - for (ConsistencyLevel cl : acceptedList) { - logger.debug("Test successful query(): " + cl); - try { - query(12, cl); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "EACH_QUORUM ConsistencyLevel is only supported for writes", - "ANY ConsistencyLevel is only supported for writes"); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), String.format("Received: %s", e.getMessage())); - } - } + //Check order of precedence for batch statements + //Construct unique batch statement with no CL defined. + String batchString = "batch_opts_cl"; + BatchExecution batch = executeBatch(session, batchString, null, null); + assertTrue(batch.getConsistency().equals(cl_one.toString())); + clearActivityLog(); - // Test writes which should fail - for (ConsistencyLevel cl : failList) { - logger.debug("Test failure init(): " + cl); - try { - init(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } catch (WriteTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } - } + //Construct unique prepared statement with a CL defined. + batchString = "prep_stm_cl"; + batch = executeBatch(session, batchString, cl_all, null); + assertTrue(batch.getConsistency().equals(cl_all.toString())); - // Test reads which should fail - for (ConsistencyLevel cl : failList) { - logger.debug("Test failure query(): " + cl); - try { - query(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (ReadTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } + } finally { + cluster.close(); } + } - @Test(groups = "long") - @CCMConfig( - numberOfNodes = {3, 3}, - clusterProvider = "tokenAwareDCAwareRoundRobinNoShuffleDowngrading" - ) - public void testRFThreeDowngradingCLTwoDCsDCAware() throws Throwable { - createMultiDCSchema(3, 3); - init(12, ConsistencyLevel.TWO); - query(12, ConsistencyLevel.TWO); - - assertQueried(IP_PREFIX + '1', 0); - assertQueried(IP_PREFIX + '2', 0); - assertQueried(IP_PREFIX + '3', 0); - assertQueried(IP_PREFIX + '4', 0); - assertQueried(IP_PREFIX + '5', 12); - assertQueried(IP_PREFIX + '6', 0); - - resetCoordinators(); - stopAndWait(2); - - List acceptedList = Arrays.asList( - ConsistencyLevel.ANY, - ConsistencyLevel.ONE, - ConsistencyLevel.TWO, - ConsistencyLevel.QUORUM, - ConsistencyLevel.THREE, - ConsistencyLevel.ALL, - ConsistencyLevel.LOCAL_QUORUM, - ConsistencyLevel.EACH_QUORUM - ); - - List failList = emptyList(); - - // Test successful writes - for (ConsistencyLevel cl : acceptedList) { - try { - init(12, cl); - } catch (Exception e) { - fail(String.format("Test failed at CL.%s with message: %s", cl, e.getMessage())); - } - } + /** + * Exhaustively tests all serial consistency levels when they are set via QueryOptions. + * + * @test_category consistency + */ + @Test(groups = "short", dataProvider = "serialConsistencyLevels", dataProviderClass = DataProviders.class) + public void should_use_query_option_serial_cl(ConsistencyLevel cl) throws Throwable { + //Build a cluster with a CL level set in the query options. + Cluster cluster = builder().withQueryOptions(new QueryOptions().setSerialConsistencyLevel(cl)).build(); + try { + Session session = cluster.connect(); + //Construct unique query, with no CL defined. + String queryString = "serial_query_cl"; + Query clQuery = executeSimple(session, queryString, null, cl); + checkSerialCLMatch(cl, clQuery.getSerialConsistency()); - // Test successful reads - for (ConsistencyLevel cl : acceptedList) { - try { - query(12, cl); - } catch (InvalidQueryException e) { - List acceptableErrorMessages = Arrays.asList( - "EACH_QUORUM ConsistencyLevel is only supported for writes", - "ANY ConsistencyLevel is only supported for writes"); - assertTrue(acceptableErrorMessages.contains(e.getMessage()), String.format("Received: %s", e.getMessage())); - } - } - // Test writes which should fail - for (ConsistencyLevel cl : failList) { - try { - init(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } catch (WriteTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } - } + //Check prepared statement CL + String prepareString = "preapred_statement_serial_cl"; + PreparedStatementExecution pse = executePrepared(session, prepareString, null, null); + checkSerialCLMatch(cl, pse.getSerialConsistency()); + + //Check batch statement CL + String batchStateString = "batch_statement_serial_cl"; + BatchExecution batch = executeBatch(session, batchStateString, null, null); + checkSerialCLMatch(cl, batch.getSerialConsistency()); - // Test reads which should fail - for (ConsistencyLevel cl : failList) { - try { - query(12, cl); - fail(String.format("Test passed at CL.%s.", cl)); - } catch (ReadTimeoutException e) { - // expected to fail when the client hasn't marked the - // node as DOWN yet - } catch (UnavailableException e) { - // expected to fail when the client has already marked the - // node as DOWN - } + } finally { + cluster.close(); } + } - private void stopAndWait(int node) { - logger.debug("Stopping node " + node); - ccm().stop(node); - ccm().waitForDown(node);// this uses port ping - TestUtils.waitForDown(ipOfNode(node), cluster()); // this uses UP/DOWN events - logger.debug("Node " + node + " stopped, sleeping one extra minute to allow nodes to gossip"); - Uninterruptibles.sleepUninterruptibly(1, TimeUnit.MINUTES); + /** + * Exhaustively tests all serial consistency levels when they are set at the statement level. + * + * @test_category consistency + */ + @Test(groups = "short", dataProvider = "serialConsistencyLevels", dataProviderClass = DataProviders.class) + public void should_use_statement_serial_cl(ConsistencyLevel cl) throws Throwable { + //Build a cluster with no CL set in the query options. + Cluster cluster = builder().build(); + try { + Session session = cluster.connect(); + //Construct unique query statement with a CL defined. + String queryString = "statement_serial_cl"; + Query clQuery = executeSimple(session, queryString, null, cl); + checkSerialCLMatch(cl, clQuery.getSerialConsistency()); + + //Check prepared statement CL + String prepareString = "preapred_statement_serial_cl"; + PreparedStatementExecution pse = executePrepared(session, prepareString, null, cl); + checkSerialCLMatch(cl, pse.getSerialConsistency()); + + //Check batch statement CL + String batchStateString = "batch_statement_serial_cl"; + BatchExecution batch = executeBatch(session, batchStateString, null, cl); + checkSerialCLMatch(cl, batch.getSerialConsistency()); + + } finally { + cluster.close(); + } + } } diff --git a/pom.xml b/pom.xml index 2f54d9f9aa1..1d97aa0c4fd 100644 --- a/pom.xml +++ b/pom.xml @@ -66,7 +66,7 @@ 1.7.0 1.10.8 1.3 - 1.1.1 + 1.1.2 ${project.basedir} 127.0.1. unit From b0371beea4e5a711a8c9d35144ec2f6882e6c331 Mon Sep 17 00:00:00 2001 From: GregBestland Date: Mon, 27 Feb 2017 09:53:48 -0600 Subject: [PATCH 048/512] Updateing annotations to work with surefie, changes from review feedback --- .../datastax/driver/core/ConsistencyTest.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java index d036f4263bd..68fd49d480f 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java @@ -22,6 +22,7 @@ import org.scassandra.http.client.Query; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; import org.testng.annotations.AfterMethod; import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; @@ -37,14 +38,19 @@ public class ConsistencyTest { private static final Logger logger = LoggerFactory.getLogger(ConsistencyTest.class); private ScassandraCluster sCluster; - @BeforeClass + @BeforeClass(groups = "short") public void setUp() { sCluster = ScassandraCluster.builder().withNodes(1).build(); sCluster.init(); } - @AfterMethod + @AfterClass(groups = "short") + public void tearDownClass() { + sCluster.stop(); + } + + @AfterMethod(groups = "short") public void tearDown() { clearActivityLog(); } @@ -63,12 +69,13 @@ public Cluster.Builder builder() { .withPort(sCluster.getBinaryPort()).withNettyOptions(nonQuietClusterCloseOptions); } + /** + * This method checks the expected/sent serial consistency level against that which is received. + * ConsistencyLevel.SERIAL is the default serial consistency level, so even when sent it will return + * as null. + */ public void checkSerialCLMatch(ConsistencyLevel expected, String received) { - /** - * This method checks the expected/sent serial consistency level against that which is received. - * ConsistencyLevel.SERIAL is the default serial consistency level, so even when sent it will return - * as null. - */ + if (expected.equals(ConsistencyLevel.SERIAL)) { assertNull(received); From 73154b0caa21e9d5c8534bb531e438ac97582552 Mon Sep 17 00:00:00 2001 From: GregBestland Date: Mon, 27 Feb 2017 10:14:46 -0600 Subject: [PATCH 049/512] further updates for formatting issues --- .../datastax/driver/core/ConsistencyTest.java | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java index 68fd49d480f..02bac8ac54c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java @@ -15,7 +15,6 @@ */ package com.datastax.driver.core; - import org.scassandra.Scassandra; import org.scassandra.http.client.BatchExecution; import org.scassandra.http.client.PreparedStatementExecution; @@ -34,7 +33,6 @@ public class ConsistencyTest { - private static final Logger logger = LoggerFactory.getLogger(ConsistencyTest.class); private ScassandraCluster sCluster; @@ -42,7 +40,6 @@ public class ConsistencyTest { public void setUp() { sCluster = ScassandraCluster.builder().withNodes(1).build(); sCluster.init(); - } @AfterClass(groups = "short") @@ -55,7 +52,6 @@ public void tearDown() { clearActivityLog(); } - public void clearActivityLog() { for (Scassandra node : sCluster.nodes()) { node.activityClient().clearAllRecordedActivity(); @@ -75,10 +71,8 @@ public Cluster.Builder builder() { * as null. */ public void checkSerialCLMatch(ConsistencyLevel expected, String received) { - if (expected.equals(ConsistencyLevel.SERIAL)) { assertNull(received); - } else { assertTrue(received.equals(expected.toString())); } @@ -162,8 +156,6 @@ public void should_use_global_default_cl_when_none_specified() throws Throwable String batchStateString = "batch_default_cl"; BatchExecution batch = executeBatch(session, batchStateString, null, null); assertTrue(batch.getConsistency().equals(ConsistencyLevel.LOCAL_ONE.toString())); - - } finally { cluster.close(); } @@ -194,11 +186,9 @@ public void should_use_query_option_cl(ConsistencyLevel cl) throws Throwable { String batchStateString = "batch_query_cl"; BatchExecution batch = executeBatch(session, batchStateString, null, null); assertTrue(batch.getConsistency().equals(cl.toString())); - } finally { cluster.close(); } - } /** @@ -230,7 +220,6 @@ public void should_use_statement_cl(ConsistencyLevel cl) throws Throwable { } finally { cluster.close(); } - } /** @@ -247,7 +236,6 @@ public void should_use_appropriate_cl_when_multiple_defined() throws Throwable { Cluster cluster = builder().withQueryOptions(new QueryOptions().setConsistencyLevel(cl_one)).build(); try { - Session session = cluster.connect(); //Check order of precedence for simple statements @@ -274,7 +262,6 @@ public void should_use_appropriate_cl_when_multiple_defined() throws Throwable { pse = executePrepared(session, prepareString, cl_all, null); assertTrue(pse.getConsistency().equals(cl_all.toString())); - //Check order of precedence for batch statements //Construct unique batch statement with no CL defined. String batchString = "batch_opts_cl"; @@ -286,11 +273,9 @@ public void should_use_appropriate_cl_when_multiple_defined() throws Throwable { batchString = "prep_stm_cl"; batch = executeBatch(session, batchString, cl_all, null); assertTrue(batch.getConsistency().equals(cl_all.toString())); - } finally { cluster.close(); } - } /** @@ -309,7 +294,6 @@ public void should_use_query_option_serial_cl(ConsistencyLevel cl) throws Throwa Query clQuery = executeSimple(session, queryString, null, cl); checkSerialCLMatch(cl, clQuery.getSerialConsistency()); - //Check prepared statement CL String prepareString = "preapred_statement_serial_cl"; PreparedStatementExecution pse = executePrepared(session, prepareString, null, null); @@ -319,11 +303,9 @@ public void should_use_query_option_serial_cl(ConsistencyLevel cl) throws Throwa String batchStateString = "batch_statement_serial_cl"; BatchExecution batch = executeBatch(session, batchStateString, null, null); checkSerialCLMatch(cl, batch.getSerialConsistency()); - } finally { cluster.close(); } - } /** @@ -351,11 +333,8 @@ public void should_use_statement_serial_cl(ConsistencyLevel cl) throws Throwable String batchStateString = "batch_statement_serial_cl"; BatchExecution batch = executeBatch(session, batchStateString, null, cl); checkSerialCLMatch(cl, batch.getSerialConsistency()); - } finally { cluster.close(); } - } - } From ce0d3936682aea599ab41a5bc3c9c685ec569298 Mon Sep 17 00:00:00 2001 From: GregBestland Date: Mon, 27 Feb 2017 10:18:42 -0600 Subject: [PATCH 050/512] Whitespace removal --- .../src/test/java/com/datastax/driver/core/ConsistencyTest.java | 1 - 1 file changed, 1 deletion(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java index 02bac8ac54c..3174e054749 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java @@ -135,7 +135,6 @@ public Query executeSimple(Session session, String statement, ConsistencyLevel l */ @Test(groups = "short") public void should_use_global_default_cl_when_none_specified() throws Throwable { - //Build a cluster with no CL level set in the query options. Cluster cluster = builder().build(); try { From 92b7915fffdcd31629c4fa23750aa6665243b515 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Mon, 27 Feb 2017 12:43:18 +0100 Subject: [PATCH 051/512] Use GuavaCompatibility instead of Guava deprecated methods --- .../com/datastax/driver/mapping/MapperAsyncResultTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java index 8cac08bcba4..87bc75a50cb 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java @@ -16,6 +16,7 @@ package com.datastax.driver.mapping; import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.core.GuavaCompatibility; import com.datastax.driver.core.SimpleStatement; import com.datastax.driver.core.Statement; import com.datastax.driver.core.utils.CassandraVersion; @@ -94,7 +95,7 @@ private void should_iterate_result_set_asynchronously(int totalCount, int fetchS Mapper mapper = new MappingManager(session()).mapper(User.class); ResultsAccumulator accumulator = new ResultsAccumulator(); ListenableFuture> results = mapper.mapAsync(session().executeAsync(statement)); - ListenableFuture> future = Futures.transform( + ListenableFuture> future = GuavaCompatibility.INSTANCE.transformAsync( results, accumulator); Futures.getUnchecked(future); @@ -120,7 +121,7 @@ public ListenableFuture> apply(Result users) throws Exception if (wasLastPage) return Futures.immediateFuture(users); else - return Futures.transform(users.fetchMoreResults(), this); + return GuavaCompatibility.INSTANCE.transformAsync(users.fetchMoreResults(), this); } } } From aa6755d8311e7d44334d835e537a6860c9eb9780 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Mon, 27 Feb 2017 17:58:04 +0100 Subject: [PATCH 052/512] Fix OSGi tests and simplify bundle version management --- driver-tests/osgi/pom.xml | 29 +++++---- .../datastax/driver/osgi/BundleOptions.java | 58 ++++++++++++++---- .../datastax/driver/osgi/VersionProvider.java | 59 ------------------- 3 files changed, 60 insertions(+), 86 deletions(-) delete mode 100644 driver-tests/osgi/src/test/java/com/datastax/driver/osgi/VersionProvider.java diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 61c32321d7f..921c9b6bf90 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -24,7 +24,7 @@ cassandra-driver-tests-osgi - bundle + jar DataStax Java Driver for Apache Cassandra Tests - OSGi A test for the DataStax Java Driver in an OSGi container. https://github.com/datastax/java-driver @@ -36,6 +36,7 @@ 3.6.0 2.4.0 1.1.3 + 1.7.5 none + ${guava.version} + ${lz4.version} + ${snappy.version} + ${hdr.version} + ${netty.version} + ${slf4j.version} + ${logback.version} + ${metrics.version} + ${testng.version} ${ipprefix} @@ -229,13 +233,8 @@ com.datastax.driver.osgi.api,!com.datastax.driver.osgi.impl com.datastax.driver.osgi.impl.Activator <_include>-osgi.bnd - + - - jar - bundle - pom - diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java index 092227d1e78..cef7b4bbccb 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java @@ -16,6 +16,7 @@ package com.datastax.driver.osgi; import com.datastax.driver.core.CCMBridge; +import com.datastax.driver.core.Cluster; import com.datastax.driver.core.ProtocolOptions; import com.datastax.driver.core.TestUtils; import org.ops4j.pax.exam.Option; @@ -24,7 +25,6 @@ import org.ops4j.pax.exam.options.UrlProvisionOption; import org.ops4j.pax.exam.util.PathUtils; -import static com.datastax.driver.osgi.VersionProvider.projectVersion; import static org.ops4j.pax.exam.CoreOptions.*; public class BundleOptions { @@ -35,19 +35,19 @@ public static UrlProvisionOption driverBundle() { public static UrlProvisionOption driverBundle(boolean useShaded) { String classifier = useShaded ? "-shaded" : ""; - return bundle("reference:file:" + PathUtils.getBaseDir() + "/../../driver-core/target/cassandra-driver-core-" + projectVersion() + classifier + ".jar"); + return bundle("reference:file:" + PathUtils.getBaseDir() + "/../../driver-core/target/cassandra-driver-core-" + Cluster.getDriverVersion() + classifier + ".jar"); } public static UrlProvisionOption mappingBundle() { - return bundle("reference:file:" + PathUtils.getBaseDir() + "/../../driver-mapping/target/cassandra-driver-mapping-" + projectVersion() + ".jar"); + return bundle("reference:file:" + PathUtils.getBaseDir() + "/../../driver-mapping/target/cassandra-driver-mapping-" + Cluster.getDriverVersion() + ".jar"); } public static UrlProvisionOption extrasBundle() { - return bundle("reference:file:" + PathUtils.getBaseDir() + "/../../driver-extras/target/cassandra-driver-extras-" + projectVersion() + ".jar"); + return bundle("reference:file:" + PathUtils.getBaseDir() + "/../../driver-extras/target/cassandra-driver-extras-" + Cluster.getDriverVersion() + ".jar"); } public static MavenArtifactProvisionOption guavaBundle() { - return mavenBundle("com.google.guava", "guava", "16.0.1"); + return mavenBundle("com.google.guava", "guava", getVersion("guava.version")); } public static CompositeOption lz4Bundle() { @@ -57,14 +57,40 @@ public static CompositeOption lz4Bundle() { public Option[] getOptions() { return options( systemProperty("cassandra.compression").value(ProtocolOptions.Compression.LZ4.name()), - mavenBundle("net.jpountz.lz4", "lz4", "1.3.0") + mavenBundle("net.jpountz.lz4", "lz4", getVersion("lz4.version")) + ); + } + }; + } + + public static CompositeOption snappyBundle() { + return new CompositeOption() { + + @Override + public Option[] getOptions() { + return options( + systemProperty("cassandra.compression").value(ProtocolOptions.Compression.SNAPPY.name()), + mavenBundle("org.xerial.snappy", "snappy-java", getVersion("snappy.version")) + ); + } + }; + } + + public static CompositeOption hdrHistogramBundle() { + return new CompositeOption() { + + @Override + public Option[] getOptions() { + return options( + systemProperty("cassandra.usePercentileSpeculativeExecutionPolicy").value("true"), + mavenBundle("org.hdrhistogram", "HdrHistogram", getVersion("hdr.version")) ); } }; } public static CompositeOption nettyBundles() { - final String nettyVersion = "4.0.33.Final"; + final String nettyVersion = getVersion("netty.version"); return new CompositeOption() { @Override @@ -96,15 +122,23 @@ public Option[] getOptions() { systemProperty("cassandra.version").value(CCMBridge.getGlobalCassandraVersion().toString()), systemProperty("cassandra.contactpoints").value(TestUtils.IP_PREFIX + 1), systemProperty("logback.configurationFile").value("file:" + PathUtils.getBaseDir() + "/src/test/resources/logback.xml"), - mavenBundle("org.slf4j", "slf4j-api", "1.7.5"), - mavenBundle("ch.qos.logback", "logback-classic", "1.1.3"), - mavenBundle("ch.qos.logback", "logback-core", "1.1.3"), - mavenBundle("io.dropwizard.metrics", "metrics-core", "3.1.2"), - mavenBundle("org.testng", "testng", "6.8.8"), + mavenBundle("org.slf4j", "slf4j-api", getVersion("slf4j.version")), + mavenBundle("ch.qos.logback", "logback-classic", getVersion("logback.version")), + mavenBundle("ch.qos.logback", "logback-core", getVersion("logback.version")), + mavenBundle("io.dropwizard.metrics", "metrics-core", getVersion("metrics.version")), + mavenBundle("org.testng", "testng", getVersion("testng.version")), systemPackages("org.testng", "org.junit", "org.junit.runner", "org.junit.runner.manipulation", "org.junit.runner.notification", "com.jcabi.manifests") ); } }; } + + private static String getVersion(String propertyName) { + String value = System.getProperty(propertyName); + if (value == null) { + throw new IllegalArgumentException(propertyName + " system property is not set."); + } + return value; + } } diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/VersionProvider.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/VersionProvider.java deleted file mode 100644 index 8c702f23603..00000000000 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/VersionProvider.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright (C) 2012-2015 DataStax Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.datastax.driver.osgi; - -import com.jcabi.manifests.Manifests; - -import java.util.regex.Matcher; -import java.util.regex.Pattern; - -/** - * Attempts to resolve the project version from the Bundle manifest. If not present, will throw RuntimeException - * on initialization. If this happens, try building with 'mvn compile' to generate the Bundle manifest. - *

    - * In IntelliJ you can have compile run after make by right clicking on 'compile' in the 'Maven Projects' tool window. - */ -public class VersionProvider { - - private static final Pattern versionPattern = Pattern.compile(("(\\d+.\\d+\\.\\d+)(.*)")); - - private static final String PROJECT_VERSION; - - static { - String bundleName = Manifests.read("Bundle-SymbolicName"); - if (bundleName.equals("com.datastax.driver.osgi")) { - String bundleVersion = Manifests.read("Bundle-Version"); - Matcher matcher = versionPattern.matcher(bundleVersion); - if (matcher.matches()) { - String majorVersion = matcher.group(1); - // Replace all instances of '.' after the main version with '-' to properly - // resolve the correct version. - String rest = matcher.group(2).replaceAll("\\.", "-"); - PROJECT_VERSION = majorVersion + rest; - } else { - // This should never happen, but if we are using a non X.Y.Z version number - // we'll just back off to the bundle version. - PROJECT_VERSION = bundleVersion; - } - } else { - throw new RuntimeException("Couldn't resolve bundle manifest (try building with mvn compile)"); - } - } - - public static String projectVersion() { - return PROJECT_VERSION; - } -} From 30a43f7a4eb0046b080ca3cb62a0210902f507dc Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Mon, 27 Feb 2017 12:57:36 +0100 Subject: [PATCH 053/512] Minor fixes to the driver-dist module 1) Skip generation of empty jar 2) Bump assembly plugin version 3) Improve tarball generation --- driver-dist/pom.xml | 13 ++- driver-dist/src/assembly/binary-tarball.xml | 90 +++++++++++++++++++-- 2 files changed, 97 insertions(+), 6 deletions(-) diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 6700bef228c..760f97cc6cf 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -114,7 +114,7 @@ maven-assembly-plugin - 2.6 + 3.0.0 assemble-binary-tarball @@ -132,6 +132,17 @@ posix + + maven-jar-plugin + 3.0.2 + + + + default-jar + none + + + org.apache.maven.plugins maven-install-plugin diff --git a/driver-dist/src/assembly/binary-tarball.xml b/driver-dist/src/assembly/binary-tarball.xml index b6ae3579944..69ce0b3d35a 100644 --- a/driver-dist/src/assembly/binary-tarball.xml +++ b/driver-dist/src/assembly/binary-tarball.xml @@ -23,13 +23,14 @@ tar.gz true + + + true com.datastax.cassandra:cassandra-driver-core - com.datastax.cassandra:cassandra-driver-mapping - com.datastax.cassandra:cassandra-driver-extras false @@ -37,19 +38,75 @@ lib - com.datastax.cassandra:* + + com.datastax.cassandra:cassandra-driver-core + com.datastax.cassandra:cassandra-driver-mapping + com.datastax.cassandra:cassandra-driver-extras + io.netty:netty-transport-native-epoll:* + true + + + + + + + + true + + com.datastax.cassandra:cassandra-driver-mapping + + + false + + + lib/mapping + + + com.datastax.cassandra:cassandra-driver-core + com.datastax.cassandra:cassandra-driver-mapping + com.datastax.cassandra:cassandra-driver-extras + + true + + + + true + + com.datastax.cassandra:cassandra-driver-extras + + + false + + + lib/extras + + + com.datastax.cassandra:cassandra-driver-core + com.datastax.cassandra:cassandra-driver-mapping + com.datastax.cassandra:cassandra-driver-extras + + com.google.guava:guava + + true + + + + + + true com.datastax.cassandra:cassandra-driver-core com.datastax.cassandra:cassandra-driver-mapping com.datastax.cassandra:cassandra-driver-extras + com.datastax.cassandra:cassandra-driver-examples false @@ -61,18 +118,41 @@ + + + target/apidocs apidocs + .. + . - changelog/README.md - upgrade_guide/README.md + README* + LICENSE* + + + ../changelog + + + + ../faq + + + + ../manual + + + + ../upgrade_guide + + + From ce5b82c88054bcfaf7b30d2e03392a2af2b6ed80 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Mon, 27 Feb 2017 12:38:07 +0100 Subject: [PATCH 054/512] Fix various javac and javadoc warnings --- .../com/datastax/driver/core/Connection.java | 3 +- .../com/datastax/driver/core/DataType.java | 2 +- .../com/datastax/driver/core/TypeCodec.java | 6 ++- .../core/policies/FallthroughRetryPolicy.java | 2 +- .../com/datastax/driver/core/utils/UUIDs.java | 2 - .../datastax/driver/core/ClusterInitTest.java | 4 +- .../driver/core/ConnectionReleaseTest.java | 9 ++-- .../com/datastax/driver/core/HostAssert.java | 7 +++ .../driver/core/RequestHandlerTest.java | 8 +++- .../driver/core/ScassandraCluster.java | 5 ++- .../driver/core/SpeculativeExecutionTest.java | 24 +++++----- .../com/datastax/driver/core/TestUtils.java | 6 +-- .../exceptions/ExceptionsScassandraTest.java | 3 +- .../AbstractRetryPolicyIntegrationTest.java | 12 ++--- .../core/policies/LatencyAwarePolicyTest.java | 5 ++- driver-dist/pom.xml | 38 ---------------- driver-examples/pom.xml | 9 ++++ .../driver/mapping/AnnotationChecks.java | 6 +-- driver-tests/pom.xml | 15 +++++++ pom.xml | 44 +++++++++++++++++++ 20 files changed, 127 insertions(+), 83 deletions(-) diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index 119149da24f..9edb0113c3d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -1211,6 +1211,7 @@ public ConnectionCloseFuture force() { ChannelFuture future = channel.close(); future.addListener(new ChannelFutureListener() { + @Override public void operationComplete(ChannelFuture future) { factory.allChannels.remove(channel); if (future.cause() != null) { @@ -1421,7 +1422,7 @@ protected void initChannel(SocketChannel channel) throws Exception { pipeline.addLast("ssl", sslOptions.newSSLHandler(channel)); } - // pipeline.addLast("debug", new LoggingHandler(LogLevel.INFO)); + // pipeline.addLast("debug", new LoggingHandler(LogLevel.INFO)); pipeline.addLast("frameDecoder", new Frame.Decoder()); pipeline.addLast("frameEncoder", frameEncoder); diff --git a/driver-core/src/main/java/com/datastax/driver/core/DataType.java b/driver-core/src/main/java/com/datastax/driver/core/DataType.java index 27dbeb6e29e..23c0ac09dea 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DataType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DataType.java @@ -709,7 +709,7 @@ public String asFunctionParameterString() { * The driver provides a minimal support for such types through * instances of this class. *

    - * A codec for custom types can be obtained via {@link TypeCodec#custom(CustomType)}. + * A codec for custom types can be obtained via {@link TypeCodec#custom(DataType.CustomType)}. */ public static class CustomType extends DataType { diff --git a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java index 5da6f194ce5..7716b7405c9 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java @@ -90,8 +90,10 @@ * the wrapper Java class instead, and implement the appropriate interface * (e.g. {@link com.datastax.driver.core.TypeCodec.PrimitiveBooleanCodec} for primitive {@code boolean} types; * there is one such interface for each Java primitive type). - *

  3. TypeCodec implementations should not consume {@link ByteBuffer} instances by performing read operations - * that modify their current position; if necessary, codecs should {@link ByteBuffer#duplicate()} duplicate} them.
  4. + *
  5. When deserializing, TypeCodec implementations should not consume {@link ByteBuffer} instances + * by performing relative read operations that modify their current position; + * codecs should instead prefer absolute read methods, or, if necessary, they should + * {@link ByteBuffer#duplicate() duplicate} their byte buffers prior to reading them.
  6. * * * @param The codec's Java type diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/FallthroughRetryPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/FallthroughRetryPolicy.java index dd494ee9bda..d78e950a205 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/FallthroughRetryPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/FallthroughRetryPolicy.java @@ -24,7 +24,7 @@ /** * A retry policy that never retries (nor ignores). *

    - * All of the methods of this retry policy unconditionally return {@link RetryDecision#rethrow()}. + * All of the methods of this retry policy unconditionally return {@link RetryPolicy.RetryDecision#rethrow()}. * If this policy is used, retry logic will have to be implemented in business code. */ public class FallthroughRetryPolicy implements RetryPolicy { diff --git a/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java b/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java index 1a648356fe8..b53cb6bb0b0 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java +++ b/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java @@ -35,8 +35,6 @@ public final class UUIDs { private UUIDs() { } - ; - // http://www.ietf.org/rfc/rfc4122.txt private static final long START_EPOCH = makeEpoch(); private static final long CLOCK_SEQ_AND_NODE = makeClockSeqAndNode(); diff --git a/driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java b/driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java index c09ca26de5c..ea122092b94 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java @@ -44,6 +44,7 @@ import static com.datastax.driver.core.TestUtils.ipOfNode; import static com.datastax.driver.core.TestUtils.nonQuietClusterCloseOptions; import static org.mockito.Mockito.*; +import static org.scassandra.http.client.PrimingRequest.then; public class ClusterInitTest { private static final Logger logger = LoggerFactory.getLogger(ClusterInitTest.class); @@ -278,8 +279,7 @@ private void primePeerRows(Scassandra scassandra, List otherHosts) thr primingClient.prime( PrimingRequest.queryBuilder() .withQuery("SELECT * FROM system.peers") - .withColumnTypes(ScassandraCluster.SELECT_PEERS) - .withRows(rows) + .withThen(then().withRows(rows).withColumnTypes(ScassandraCluster.SELECT_PEERS)) .build()); } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java index 9b27359f084..d4c0e5c57f7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java @@ -28,6 +28,7 @@ import java.util.concurrent.TimeoutException; import static org.assertj.core.api.Assertions.assertThat; +import static org.scassandra.http.client.PrimingRequest.then; import static org.testng.Assert.fail; public class ConnectionReleaseTest extends ScassandraTestBase { @@ -66,20 +67,20 @@ public void should_release_connection_before_completing_future() throws Exceptio primingClient.prime( PrimingRequest.queryBuilder() .withQuery("mock query") - .withRows(ImmutableMap.of("key", 1)) - .withFixedDelay(10000) + .withThen(then().withRows(ImmutableMap.of("key", 1)) + .withFixedDelay(10000L)) .build() ); primingClient.prime( PrimingRequest.queryBuilder() .withQuery("select c from test1 where k=1") - .withRows(ImmutableMap.of("c", "hello")) + .withThen(then().withRows(ImmutableMap.of("c", "hello"))) .build() ); primingClient.prime( PrimingRequest.queryBuilder() .withQuery("select n from test2 where c='hello'") - .withRows(ImmutableMap.of("n", "world")) + .withThen(then().withRows(ImmutableMap.of("n", "world"))) .build() ); diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java b/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java index 9cb70638e5a..1308f7cde2d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java @@ -123,6 +123,7 @@ public void onAdd(Host host) { public HostAssert goesDownWithin(long duration, TimeUnit unit) { final CountDownLatch downSignal = new CountDownLatch(1); StateListener upListener = new StateListenerBase() { + @Override public void onDown(Host host) { downSignal.countDown(); } @@ -141,31 +142,37 @@ public void onDown(Host host) { return this; } + @SuppressWarnings("deprecation") public HostAssert hasWorkload(String workload) { assertThat(actual.getDseWorkload()).isNotNull().isEqualTo(workload); return this; } + @SuppressWarnings("deprecation") public HostAssert hasNoWorkload() { assertThat(actual.getDseWorkload()).isNull(); return this; } + @SuppressWarnings("deprecation") public HostAssert hasDseVersion(VersionNumber versionNumber) { assertThat(actual.getDseVersion()).isNotNull().isEqualTo(versionNumber); return this; } + @SuppressWarnings("deprecation") public HostAssert hasNoDseVersion() { assertThat(actual.getDseVersion()).isNull(); return this; } + @SuppressWarnings("deprecation") public HostAssert hasDseGraph() { assertThat(actual.isDseGraphEnabled()).isTrue(); return this; } + @SuppressWarnings("deprecation") public HostAssert hasNoDseGraph() { assertThat(actual.isDseGraphEnabled()).isFalse(); return this; diff --git a/driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java b/driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java index 2e20a7fd1bf..1b903e8d3b0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java @@ -20,10 +20,14 @@ import org.scassandra.http.client.PrimingRequest; import org.testng.annotations.Test; +import java.util.Collections; +import java.util.List; +import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import static org.assertj.core.api.Assertions.assertThat; +import static org.scassandra.http.client.PrimingRequest.then; public class RequestHandlerTest { @@ -35,11 +39,11 @@ public void should_handle_race_between_response_and_cancellation() { try { // Use a mock server that takes a constant time to reply scassandra.start(); + List> rows = Collections.>singletonList(ImmutableMap.of("key", 1)); scassandra.primingClient().prime( PrimingRequest.queryBuilder() .withQuery("mock query") - .withRows(ImmutableMap.of("key", 1)) - .withFixedDelay(10) + .withThen(then().withRows(rows).withFixedDelay(10L)) .build() ); diff --git a/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java b/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java index 02a8b5c2198..5abf2f8ae90 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java @@ -27,6 +27,7 @@ import java.net.InetAddress; import java.net.InetSocketAddress; +import java.util.Collections; import java.util.List; import java.util.Map; import java.util.TreeSet; @@ -364,7 +365,7 @@ private void primeMetadata(Scassandra node) { .withQuery(query) .withThen(then() .withColumnTypes(metadata) - .withRows(row) + .withRows(Collections.>singletonList(row)) .build()) .build()); } @@ -386,7 +387,7 @@ private void primeMetadata(Scassandra node) { .withQuery("select cluster_name from system.local") .withThen(then() .withColumnTypes(SELECT_CLUSTER_NAME) - .withRows(clusterNameRow) + .withRows(Collections.>singletonList(clusterNameRow)) .build()) .build()); diff --git a/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java index 9acc180a1bb..3def90dcb54 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java @@ -35,6 +35,7 @@ import static com.datastax.driver.core.Assertions.assertThat; import static com.datastax.driver.core.TestUtils.nonQuietClusterCloseOptions; import static org.mockito.Mockito.*; +import static org.scassandra.http.client.PrimingRequest.then; public class SpeculativeExecutionTest { ScassandraCluster scassandras; @@ -84,7 +85,7 @@ public void afterMethod() { public void should_not_start_speculative_execution_if_first_execution_completes_successfully() { scassandras.node(1).primingClient().prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withRows(row("result", "result1")) + .withThen(then().withRows(row("result", "result1"))) .build() ); @@ -104,14 +105,14 @@ public void should_not_start_speculative_execution_if_first_execution_retries_bu scassandras.node(1).primingClient().prime(PrimingRequest.queryBuilder() .withQuery("mock query") .withConsistency(Consistency.TWO) - .withResult(Result.read_request_timeout) + .withThen(then().withResult(Result.read_request_timeout)) .build() ); scassandras.node(1).primingClient().prime(PrimingRequest.queryBuilder() .withQuery("mock query") .withConsistency(Consistency.ONE) - .withRows(row("result", "result1")) + .withThen(then().withRows(row("result", "result1"))) .build() ); @@ -134,14 +135,13 @@ public void should_not_start_speculative_execution_if_first_execution_retries_bu public void should_start_speculative_execution_if_first_execution_takes_too_long() { scassandras.node(1).primingClient().prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withFixedDelay(400) - .withRows(row("result", "result1")) + .withThen(then().withRows(row("result", "result1")).withFixedDelay(400L)) .build() ); scassandras.node(2).primingClient().prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withRows(row("result", "result2")) + .withThen(then().withRows(row("result", "result2"))) .build() ); long execStartCount = errors.getSpeculativeExecutions().getCount(); @@ -163,15 +163,13 @@ public void should_wait_until_all_executions_have_finished() { // execution1 starts with host1, which will time out at t=1000 .prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withFixedDelay(2000) - .withRows(row("result", "result1")) + .withThen(then().withRows(row("result", "result1")).withFixedDelay(2000L)) .build()); // at t=1000, execution1 moves to host3, which eventually succeeds at t=1500 scassandras.node(3).primingClient() .prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withFixedDelay(500) - .withRows(row("result", "result3")) + .withThen(then().withRows(row("result", "result3")).withFixedDelay(500L)) .build()); // meanwhile, execution2 starts at t=200, using host2 which times out at t=1200 // at that time, the query plan is empty so execution2 fails @@ -179,8 +177,7 @@ public void should_wait_until_all_executions_have_finished() { scassandras.node(2).primingClient() .prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withFixedDelay(2000) - .withRows(row("result", "result2")) + .withThen(then().withRows(row("result", "result2")).withFixedDelay(2000L)) .build()); long execStartCount = errors.getSpeculativeExecutions().getCount(); @@ -247,8 +244,7 @@ public void should_use_same_default_timestamp_for_all_executions() { // execution1 starts with host1, which will time out at t=1000 .prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withFixedDelay(2000) - .withRows(row("result", "result1")) + .withThen(then().withRows(row("result", "result1")).withFixedDelay(2000L)) .build()); Session session = cluster.connect(); diff --git a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java index 0fefebeac41..dcbc155b322 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java @@ -129,13 +129,13 @@ public static void setValue(SettableByIndexData data, int i, DataType type, O data.setUUID(i, (UUID) value); break; case LIST: - data.setList(i, (List) value); + data.setList(i, (List) value); break; case SET: - data.setSet(i, (Set) value); + data.setSet(i, (Set) value); break; case MAP: - data.setMap(i, (Map) value); + data.setMap(i, (Map) value); break; default: throw new RuntimeException("Missing handling of " + type); diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java index f939c889d1e..fc905c43c0b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java @@ -30,6 +30,7 @@ import static com.datastax.driver.core.ConsistencyLevel.LOCAL_ONE; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; +import static org.scassandra.http.client.PrimingRequest.then; import static org.scassandra.http.client.Result.*; public class ExceptionsScassandraTest { @@ -115,7 +116,7 @@ public void should_throw_proper_write_timeout_exception() { protected void simulateError(int hostNumber, Result result) { scassandras.node(hostNumber).primingClient().prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withResult(result) + .withThen(then().withResult(result)) .build()); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java index be755833ac0..2901b0b1e9f 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java @@ -39,6 +39,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.mockito.Matchers.*; import static org.mockito.Mockito.times; +import static org.scassandra.http.client.PrimingRequest.then; import static org.scassandra.http.client.Result.overloaded; import static org.scassandra.http.client.Result.server_error; @@ -109,12 +110,13 @@ protected void simulateError(int hostNumber, Result result) { } protected void simulateError(int hostNumber, Result result, Config config) { - PrimingRequestBuilder builder = PrimingRequest.queryBuilder() - .withQuery("mock query") - .withResult(result); + PrimingRequest.Then.ThenBuilder then = then().withResult(result); + PrimingRequestBuilder builder = PrimingRequest.queryBuilder().withQuery("mock query"); if (config != null) - builder = builder.withConfig(config); + then = then.withConfig(config); + + builder = builder.withThen(then); scassandras.node(hostNumber).primingClient().prime(builder.build()); } @@ -122,7 +124,7 @@ protected void simulateError(int hostNumber, Result result, Config config) { protected void simulateNormalResponse(int hostNumber) { scassandras.node(hostNumber).primingClient().prime(PrimingRequest.queryBuilder() .withQuery("mock query") - .withRows(row("result", "result1")) + .withThen(then().withRows(row("result", "result1"))) .build()); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/LatencyAwarePolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/LatencyAwarePolicyTest.java index 511df4232fb..ce2ddd5dd00 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/LatencyAwarePolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/LatencyAwarePolicyTest.java @@ -27,6 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; import static org.scassandra.http.client.PrimingRequest.queryBuilder; +import static org.scassandra.http.client.PrimingRequest.then; import static org.scassandra.http.client.Result.read_request_timeout; import static org.scassandra.http.client.Result.unavailable; @@ -106,7 +107,7 @@ public void should_discard_latency_when_unavailable() throws Exception { primingClient.prime( queryBuilder() .withQuery(query) - .withResult(unavailable) + .withThen(then().withResult(unavailable)) .build() ); LatencyAwarePolicy latencyAwarePolicy = LatencyAwarePolicy.builder(new RoundRobinPolicy()) @@ -150,7 +151,7 @@ public void should_consider_latency_when_read_timeout() throws Exception { primingClient.prime( queryBuilder() .withQuery(query) - .withResult(read_request_timeout) + .withThen(then().withResult(read_request_timeout)) .build() ); diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 760f97cc6cf..6f93b8a5dcd 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -70,44 +70,6 @@ true - - - - org.xerial.snappy - snappy-java - ${snappy.version} - - - net.jpountz.lz4 - lz4 - ${lz4.version} - - - org.hdrhistogram - HdrHistogram - ${hdr.version} - - - com.fasterxml.jackson.core - jackson-core - ${jackson.version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson.version} - - - joda-time - joda-time - ${joda.version} - - - javax.json - javax.json-api - ${jsr353-api.version} - - diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index be3d49ca89b..dc655112f52 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -53,6 +53,15 @@ + + org.codehaus.mojo + clirr-maven-plugin + 2.7 + + true + + + org.apache.maven.plugins maven-install-plugin diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java index d33678004d7..92bc7ed022f 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java @@ -57,7 +57,7 @@ private static void validateAnnotations(Class clazz, Class... allowed) { + static void validateAnnotations(Field field, String classDescription, Class... allowed) { Class invalid = validateAnnotations(field.getAnnotations(), allowed); if (invalid != null) throw new IllegalArgumentException(String.format("Annotation @%s is not allowed on field %s of %s %s", @@ -69,7 +69,7 @@ static void validateAnnotations(Field field, String classDescription, Class validateAnnotations(Annotation[] annotations, Class... allowed) { + private static Class validateAnnotations(Annotation[] annotations, Class... allowed) { for (Annotation annotation : annotations) { Class actual = annotation.annotationType(); if (actual.getPackage().equals(MAPPING_PACKAGE) && !contains(allowed, actual)) @@ -85,7 +85,7 @@ private static boolean contains(Object[] array, Object target) { return false; } - static void checkValidComputed(Field field) { + private static void checkValidComputed(Field field) { Computed computed = field.getAnnotation(Computed.class); if (computed != null && computed.value().isEmpty()) { throw new IllegalArgumentException(String.format("Field %s: attribute 'value' of annotation @Computed is mandatory for computed fields", field.getName())); diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index cf9524de64e..b9352469053 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -61,7 +61,18 @@ + + + + org.codehaus.mojo + clirr-maven-plugin + 2.7 + + true + + + org.apache.maven.plugins maven-install-plugin @@ -70,6 +81,7 @@ true + org.apache.maven.plugins maven-deploy-plugin @@ -78,6 +90,9 @@ true + + + diff --git a/pom.xml b/pom.xml index 1d97aa0c4fd..1f86605c990 100644 --- a/pom.xml +++ b/pom.xml @@ -226,6 +226,7 @@ 2.9.1 true + true false ${javadoc.opts} @@ -238,6 +239,49 @@ http://fasterxml.github.io/jackson-databind/javadoc/2.6/ https://javaee-spec.java.net/nonav/javadocs/ + + + + org.xerial.snappy + snappy-java + ${snappy.version} + + + net.jpountz.lz4 + lz4 + ${lz4.version} + + + org.hdrhistogram + HdrHistogram + ${hdr.version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson.version} + + + joda-time + joda-time + ${joda.version} + + + javax.json + javax.json-api + ${jsr353-api.version} + + From e08417e4aaff6b645f636e018e97c7b6636a1254 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Thu, 2 Mar 2017 11:20:26 +0100 Subject: [PATCH 055/512] Fix various javac and javadoc warnings --- driver-core/src/main/java/com/datastax/driver/core/Host.java | 4 +++- .../com/datastax/driver/core/policies/ErrorAwarePolicy.java | 3 ++- .../src/main/java/com/datastax/driver/core/utils/UUIDs.java | 3 +-- .../policies/IdempotenceAwareRetryPolicyIntegrationTest.java | 1 + .../datastax/driver/examples/paging/ForwardPagingRestUi.java | 2 +- .../datastax/driver/examples/paging/RandomPagingRestUi.java | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/driver-core/src/main/java/com/datastax/driver/core/Host.java b/driver-core/src/main/java/com/datastax/driver/core/Host.java index 14e9d63cff3..f38a16e2bdf 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Host.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Host.java @@ -458,10 +458,11 @@ public interface LifecycleAwareStateListener extends StateListener { /** * Gets invoked when the listener is registered with a cluster, or at cluster startup if the * listener was registered at initialization with - * {@link com.datastax.driver.core.Cluster.Initializer#register(StateListener)}. + * {@link com.datastax.driver.core.Cluster#register(Host.StateListener)}. * * @param cluster the cluster that this listener is registered with. */ + @Override void onRegister(Cluster cluster); /** @@ -470,6 +471,7 @@ public interface LifecycleAwareStateListener extends StateListener { * * @param cluster the cluster that this listener was registered with. */ + @Override void onUnregister(Cluster cluster); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/ErrorAwarePolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/ErrorAwarePolicy.java index e718e495c18..f62bf3ec86a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/ErrorAwarePolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/ErrorAwarePolicy.java @@ -165,7 +165,8 @@ public Builder(LoadBalancingPolicy childPolicy) { * Defines the maximum number of errors allowed per minute for each host. *

    * The policy keeps track of the number of errors on each host (filtered by - * {@link #withErrorsFilter(ErrorFilter)}) over a sliding 1-minute window. If a host had more than this number + * {@link Builder#withErrorsFilter(com.datastax.driver.core.policies.ErrorAwarePolicy.ErrorFilter)}) + * over a sliding 1-minute window. If a host had more than this number * of errors, it will be excluded from the query plan for the duration defined by * {@link #withRetryPeriod(long, TimeUnit)}. *

    diff --git a/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java b/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java index 59f62ac36c2..39d58247450 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java +++ b/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java @@ -53,7 +53,7 @@ * * * - * @jira_ticket JAVA-444 + * @see JAVA-444 * @see A Universally Unique IDentifier (UUID) URN Namespace (RFC 4122) */ public final class UUIDs { @@ -68,7 +68,6 @@ public final class UUIDs { private UUIDs() { } - // http://www.ietf.org/rfc/rfc4122.txt private static final long START_EPOCH = makeEpoch(); private static final long CLOCK_SEQ_AND_NODE = makeClockSeqAndNode(); diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java index 81d8dadc1a7..b1d4409a41d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java @@ -34,6 +34,7 @@ /** * Integration test with an IdempotenceAwareRetryPolicy. */ +@SuppressWarnings("deprecation") public class IdempotenceAwareRetryPolicyIntegrationTest extends AbstractRetryPolicyIntegrationTest { public IdempotenceAwareRetryPolicyIntegrationTest() { diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/paging/ForwardPagingRestUi.java b/driver-examples/src/main/java/com/datastax/driver/examples/paging/ForwardPagingRestUi.java index 1c18c4ac180..cfba625d3a7 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/paging/ForwardPagingRestUi.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/paging/ForwardPagingRestUi.java @@ -150,7 +150,7 @@ public void run() { * This is also the place where you would normally configure JSON serialization, etc. *

    * Note that in this example, we rely on the automatic discovery and configuration of - * Jackson through {@link org.glassfish.jersey.jackson.JacksonFeature}. + * Jackson through {@code org.glassfish.jersey.jackson.JacksonFeature}. */ public static class VideoApplication extends ResourceConfig { diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java b/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java index 91e064046a5..7f66808d939 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java @@ -159,7 +159,7 @@ public void run() { * This is also the place where you would normally configure JSON serialization, etc. *

    * Note that in this example, we rely on the automatic discovery and configuration of - * Jackson through {@link org.glassfish.jersey.jackson.JacksonFeature}. + * Jackson through {@code org.glassfish.jersey.jackson.JacksonFeature}. */ public static class VideoApplication extends ResourceConfig { From 593f4415f3793a0b6eb77726f2a926554ff75653 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Thu, 2 Mar 2017 11:58:59 +0100 Subject: [PATCH 056/512] Fix various javac and javadoc warnings --- .../com/datastax/driver/core/Connection.java | 18 ++++++++++-------- .../driver/core/GuavaCompatibility.java | 3 +-- .../com/datastax/driver/core/TypeCodec.java | 4 ++-- driver-tests/osgi/pom.xml | 1 - 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index 9363dac0747..d72dc491076 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -29,6 +29,7 @@ import io.netty.channel.group.DefaultChannelGroup; import io.netty.channel.socket.SocketChannel; import io.netty.handler.codec.DecoderException; +import io.netty.handler.ssl.SslHandler; import io.netty.handler.timeout.IdleStateEvent; import io.netty.handler.timeout.IdleStateHandler; import io.netty.util.Timeout; @@ -98,8 +99,6 @@ enum State {OPEN, TRASHED, RESURRECTING, GONE} private final AtomicReference ownerRef = new AtomicReference(); - private final ListenableFuture thisFuture; - /** * Create a new connection to a Cassandra node and associate it with the given pool. * @@ -115,7 +114,7 @@ protected Connection(String name, InetSocketAddress address, Factory factory, Ow this.dispatcher = new Dispatcher(); this.name = name; this.ownerRef.set(owner); - this.thisFuture = Futures.immediateFuture(this); + ListenableFuture thisFuture = Futures.immediateFuture(this); this.defaultKeyspaceAttempt = new SetKeyspaceAttempt(null, thisFuture); this.targetKeyspace = new AtomicReference(defaultKeyspaceAttempt); } @@ -1426,11 +1425,14 @@ protected void initChannel(SocketChannel channel) throws Exception { ChannelPipeline pipeline = channel.pipeline(); if (sslOptions != null) { - if (sslOptions instanceof RemoteEndpointAwareSSLOptions) - pipeline.addLast("ssl", ((RemoteEndpointAwareSSLOptions) sslOptions).newSSLHandler(channel, connection.address)); - else - //noinspection deprecation - pipeline.addLast("ssl", sslOptions.newSSLHandler(channel)); + if (sslOptions instanceof RemoteEndpointAwareSSLOptions) { + SslHandler handler = ((RemoteEndpointAwareSSLOptions) sslOptions).newSSLHandler(channel, connection.address); + pipeline.addLast("ssl", handler); + } else { + @SuppressWarnings("deprecation") + SslHandler handler = sslOptions.newSSLHandler(channel); + pipeline.addLast("ssl", handler); + } } // pipeline.addLast("debug", new LoggingHandler(LogLevel.INFO)); diff --git a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java index 9ff0de2ff69..df103d5fb64 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java +++ b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java @@ -28,7 +28,6 @@ import java.net.URL; import java.util.Enumeration; import java.util.concurrent.Executor; -import java.util.concurrent.ThreadPoolExecutor; import java.util.jar.Attributes; import java.util.jar.Manifest; import java.util.regex.Matcher; @@ -127,7 +126,7 @@ public abstract ListenableFuture transformAsync(ListenableFuture in /** * Returns an {@link Executor} that runs each task in the thread that invokes - * {@link Executor#execute execute}, as in {@link ThreadPoolExecutor.CallerRunsPolicy}. + * {@link Executor#execute execute}, as in {@link java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy}. * * @see MoreExecutors#sameThreadExecutor() * @see MoreExecutors#directExecutor() diff --git a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java index ed692c3266b..2318b72167d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java @@ -404,7 +404,7 @@ public static TypeCodec tuple(TupleType type) { * @param type the custom type this codec should handle. * @return A newly-created codec for the given CQL custom type. */ - public static TypeCodec custom(CustomType type) { + public static TypeCodec custom(DataType.CustomType type) { return new CustomCodec(type); } @@ -413,7 +413,7 @@ public static TypeCodec custom(CustomType type) { *

    * This codec maps duration types to the driver's built-in {@link Duration} class, * thus providing a more user-friendly mapping than the low-level mapping provided by regular - * {@link #custom(CustomType) custom type codecs}. + * {@link #custom(DataType.CustomType) custom type codecs}. *

    * The returned instance is a singleton. * diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 44a55dbcc48..0c2044a4cce 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -233,7 +233,6 @@ com.datastax.driver.osgi.api,!com.datastax.driver.osgi.impl com.datastax.driver.osgi.impl.Activator <_include>-osgi.bnd - From 0e49dbff7381d784a86eed4bff8d8c66efaf12da Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 3 Mar 2017 09:34:49 -0600 Subject: [PATCH 057/512] Use java 1.8 for compiling in continuous integration Since there is some java 1.8 specific code in driver-extras, use java 1.8 to compile the driver and then switch back to the matrix-configured java version when running tests. --- .travis.yml | 6 ++++++ build.yaml | 9 +++++++++ ci/appveyor.ps1 | 2 ++ ci/appveyor.yml | 8 ++++++-- 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 83e614d3088..3658c4ad223 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,12 @@ jdk: - oraclejdk7 - oraclejdk8 sudo: false +before_install: + # Require JDK8 for compiling + - jdk_switcher use oraclejdk8 +before_script: + # Switch back to configured JDK for running tests + - jdk_switcher use $TRAVIS_JDK_VERSION cache: directories: - $HOME/.m2 diff --git a/build.yaml b/build.yaml index f692ef92928..12d8b67f2e1 100644 --- a/build.yaml +++ b/build.yaml @@ -43,6 +43,15 @@ cassandra: - '3.0' - '3.10' build: + - script: | + . /usr/local/bin/jdk_switcher.sh + jdk_switcher use oraclejdk8 + export MAVEN_HOME=/home/jenkins/.mvn/apache-maven-3.2.5 + export PATH=$MAVEN_HOME/bin:$PATH + mvn -B -V install -DskipTests + - script: | + . /usr/local/bin/jdk_switcher.sh + jdk_switcher use $JAVA_VERSION - type: maven version: 3.2.5 goals: verify --fail-never -P$TEST_GROUP diff --git a/ci/appveyor.ps1 b/ci/appveyor.ps1 index ef3c8a11e52..bc1d95b69f7 100644 --- a/ci/appveyor.ps1 +++ b/ci/appveyor.ps1 @@ -19,6 +19,8 @@ If ($env:PLATFORM -eq "X64") { } $env:JAVA_HOME="C:\Program Files\Java\jdk$($env:java_version)" +# The configured java version to test with. +$env:JAVA_PLATFORM_HOME="$($env:JAVA_HOME)" $env:JAVA_8_HOME="C:\Program Files\Java\jdk1.8.0" $env:PATH="$($env:PYTHON);$($env:PYTHON)\Scripts;$($env:JAVA_HOME)\bin;$($env:OPENSSL_PATH)\bin;$($env:PATH)" $env:CCM_PATH="$($dep_dir)\ccm" diff --git a/ci/appveyor.yml b/ci/appveyor.yml index 53109d158b5..da779375b57 100644 --- a/ci/appveyor.yml +++ b/ci/appveyor.yml @@ -9,9 +9,13 @@ platform: x64 install: - ps: .\ci\appveyor.ps1 build_script: - - mvn -B install -DskipTests=true + - ps: | + $env:JAVA_HOME="$($env:JAVA_8_HOME)" + mvn install -DskipTests=true -D"maven.javadoc.skip"=true -B -V test_script: - - "mvn -B -Dccm.java.home=\"%JAVA_8_HOME%\" -Dccm.maxNumberOfNodes=1 -Dcassandra.version=%cassandra_version% verify -P%test_profile%" + - ps: | + $env:JAVA_HOME="$($env:JAVA_PLATFORM_HOME)" + mvn -B -D"ccm.java.home"="$($env:JAVA_8_HOME)" -D"ccm.maxNumberOfNodes"=1 -D"cassandra.version"=$($env:cassandra_version) test -P $($env:test_profile) on_finish: - ps: .\ci\uploadtests.ps1 cache: From 4ed91668e9785c3c8831dc1272d165622cf54854 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 3 Mar 2017 14:38:12 -0600 Subject: [PATCH 058/512] Switch from Powershell back to Cmd for Appveyor builds Powershell errors out if anything is printed on stderr, which is pretty common since there are negative tests that produce stderr. --- ci/appveyor.yml | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/ci/appveyor.yml b/ci/appveyor.yml index da779375b57..fc69692327c 100644 --- a/ci/appveyor.yml +++ b/ci/appveyor.yml @@ -9,13 +9,9 @@ platform: x64 install: - ps: .\ci\appveyor.ps1 build_script: - - ps: | - $env:JAVA_HOME="$($env:JAVA_8_HOME)" - mvn install -DskipTests=true -D"maven.javadoc.skip"=true -B -V + - "set \"JAVA_HOME=%JAVA_8_HOME%\" && mvn install -DskipTests=true -D\"maven.javadoc.skip\"=true -B -V" test_script: - - ps: | - $env:JAVA_HOME="$($env:JAVA_PLATFORM_HOME)" - mvn -B -D"ccm.java.home"="$($env:JAVA_8_HOME)" -D"ccm.maxNumberOfNodes"=1 -D"cassandra.version"=$($env:cassandra_version) test -P $($env:test_profile) + - "set \"JAVA_HOME=%JAVA_PLATFORM_HOME%\" && mvn -B -D\"ccm.java.home\"=\"%JAVA_8_HOME%\" -D\"ccm.maxNumberOfNodes\"=1 -D\"cassandra.version\"=%cassandra_version% test -P %test_profile%" on_finish: - ps: .\ci\uploadtests.ps1 cache: From d8c646a26bc5a8bede668d60ec1097311d6a0d6d Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 7 Mar 2017 10:37:28 -0800 Subject: [PATCH 059/512] Modernize test - use descriptive method names - AssertJ - don't switch keyspaces between tests --- .../datastax/driver/core/UserTypesTest.java | 297 +++++++----------- 1 file changed, 107 insertions(+), 190 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java index 5f542f9281c..885cdf82b83 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java @@ -30,11 +30,10 @@ import java.util.*; import java.util.concurrent.Callable; +import static com.datastax.driver.core.Assertions.assertThat; import static com.datastax.driver.core.ConditionChecker.check; import static com.datastax.driver.core.Metadata.quote; import static java.util.concurrent.TimeUnit.MINUTES; -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNotEquals; @CassandraVersion("2.1.0") public class UserTypesTest extends CCMTestsSupport { @@ -66,13 +65,8 @@ public void onTestContextInitialized() { check().that(userTableExists).before(5, MINUTES).becomesTrue(); } - /** - * Basic write read test to ensure UDTs are stored and retrieved correctly. - * - * @throws Exception - */ @Test(groups = "short") - public void simpleWriteReadTest() throws Exception { + public void should_store_and_retrieve_with_prepared_statements() throws Exception { int userId = 0; PreparedStatement ins = session().prepare("INSERT INTO user(id, addr) VALUES (?, ?)"); PreparedStatement sel = session().prepare("SELECT * FROM user WHERE id=?"); @@ -89,19 +83,12 @@ public void simpleWriteReadTest() throws Exception { Row r = session().execute(sel.bind(userId)).one(); - assertEquals(r.getInt("id"), 0); - assertEquals(r.getUDTValue("addr"), addr); + assertThat(r.getInt("id")).isEqualTo(0); } - /** - * Run simpleWriteReadTest with unprepared requests. - * - * @throws Exception - */ @Test(groups = "short") - public void simpleUnpreparedWriteReadTest() throws Exception { + public void should_store_and_retrieve_with_simple_statements() throws Exception { int userId = 1; - session().execute("USE " + keyspace); UserType addrDef = cluster().getMetadata().getKeyspace(keyspace).getUserType(quote("\"User Address\"")); UserType phoneDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("phone"); @@ -114,59 +101,41 @@ public void simpleUnpreparedWriteReadTest() throws Exception { Row r = session().execute("SELECT * FROM user WHERE id=?", userId).one(); - assertEquals(r.getInt("id"), 1); - assertEquals(r.getUDTValue("addr"), addr); + assertThat(r.getInt("id")).isEqualTo(userId); + assertThat(r.getUDTValue("addr")).isEqualTo(addr); } - /** - * Test for ensuring udts are defined in a particular keyspace. - * - * @throws Exception - */ @Test(groups = "short") - public void nonExistingTypesTest() throws Exception { - UserType addrDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("address1"); - UserType phoneDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("phone1"); - assertEquals(addrDef, null); - assertEquals(phoneDef, null); - - addrDef = cluster().getMetadata().getKeyspace(keyspace).getUserType(quote("\"User Address\"")); - phoneDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("phone"); - assertNotEquals(addrDef, null); - assertNotEquals(phoneDef, null); - - // create keyspace - String nonExistingKeyspace = keyspace + "_nonEx"; - session().execute("CREATE KEYSPACE " + nonExistingKeyspace + " " + + public void should_store_type_definitions_in_their_keyspace() throws Exception { + KeyspaceMetadata thisKeyspace = cluster().getMetadata().getKeyspace(this.keyspace); + + // Types that don't exist don't have definitions + assertThat(thisKeyspace.getUserType("address1")) + .isNull(); + assertThat(thisKeyspace.getUserType("phone1")) + .isNull(); + + // Types created by this test have definitions + assertThat(thisKeyspace.getUserType(quote("\"User Address\""))) + .isNotNull(); + assertThat(thisKeyspace.getUserType("phone")) + .isNotNull(); + + // If we create another keyspace, it doesn't have the definitions of this keyspace + String otherKeyspaceName = this.keyspace + "_nonEx"; + session().execute("CREATE KEYSPACE " + otherKeyspaceName + " " + "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); - session().execute("USE " + nonExistingKeyspace); - addrDef = cluster().getMetadata().getKeyspace(nonExistingKeyspace).getUserType(quote("\"User Address\"")); - phoneDef = cluster().getMetadata().getKeyspace(nonExistingKeyspace).getUserType("phone"); - assertEquals(addrDef, null); - assertEquals(phoneDef, null); - - session().execute("USE " + keyspace); - - addrDef = cluster().getMetadata().getKeyspace(keyspace).getUserType(quote("\"User Address\"")); - phoneDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("phone"); - assertNotEquals(addrDef, null); - assertNotEquals(phoneDef, null); + KeyspaceMetadata otherKeyspace = cluster().getMetadata().getKeyspace(otherKeyspaceName); + assertThat(otherKeyspace.getUserType(quote("\"User Address\""))) + .isNull(); + assertThat(otherKeyspace.getUserType("phone")) + .isNull(); } - /** - * Test for ensuring extra-lengthy udts are handled correctly. - * Original code found in python-driver:integration.standard.test_udts.py:test_udt_sizes - * - * @throws Exception - */ @Test(groups = "short") - public void udtSizesTest() throws Exception { + public void should_handle_UDT_with_many_fields() throws Exception { int MAX_TEST_LENGTH = 1024; - // create keyspace - session().execute("CREATE KEYSPACE test_udt_sizes " + - "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); - session().execute("USE test_udt_sizes"); // create the seed udt StringBuilder sb = new StringBuilder(); @@ -179,10 +148,10 @@ public void udtSizesTest() throws Exception { session().execute(String.format("CREATE TYPE lengthy_udt (%s)", sb.toString())); // create a table with multiple sizes of udts - session().execute("CREATE TABLE mytable (k int PRIMARY KEY, v frozen)"); + session().execute("CREATE TABLE lengthy_udt_table (k int PRIMARY KEY, v frozen)"); // hold onto the UserType for future use - UserType udtDef = cluster().getMetadata().getKeyspace("test_udt_sizes").getUserType("lengthy_udt"); + UserType udtDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("lengthy_udt"); // verify inserts and reads for (int i : Arrays.asList(0, 1, 2, 3, MAX_TEST_LENGTH)) { @@ -193,28 +162,17 @@ public void udtSizesTest() throws Exception { } // write udt - session().execute("INSERT INTO mytable (k, v) VALUES (0, ?)", createdUDT); + session().execute("INSERT INTO lengthy_udt_table (k, v) VALUES (0, ?)", createdUDT); // verify udt was written and read correctly - UDTValue r = session().execute("SELECT v FROM mytable WHERE k=0") + UDTValue r = session().execute("SELECT v FROM lengthy_udt_table WHERE k=0") .one().getUDTValue("v"); - assertEquals(r.toString(), createdUDT.toString()); + assertThat(r.toString()).isEqualTo(createdUDT.toString()); } } - /** - * Test for inserting various types of DATA_TYPE_PRIMITIVES into UDT's. - * Original code found in python-driver:integration.standard.test_udts.py:test_primitive_datatypes - * - * @throws Exception - */ @Test(groups = "short") - public void testPrimitiveDatatypes() throws Exception { - // create keyspace - session().execute("CREATE KEYSPACE testPrimitiveDatatypes " + - "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); - session().execute("USE testPrimitiveDatatypes"); - + public void should_store_and_retrieve_UDT_containing_any_primitive_type() throws Exception { // create UDT List alpha_type_list = new ArrayList(); int startIndex = (int) 'a'; @@ -224,10 +182,10 @@ public void testPrimitiveDatatypes() throws Exception { } session().execute(String.format("CREATE TYPE alldatatypes (%s)", Joiner.on(',').join(alpha_type_list))); - session().execute("CREATE TABLE mytable (a int PRIMARY KEY, b frozen)"); + session().execute("CREATE TABLE alldatatypes_table (a int PRIMARY KEY, b frozen)"); // insert UDT data - UserType alldatatypesDef = cluster().getMetadata().getKeyspace("testPrimitiveDatatypes").getUserType("alldatatypes"); + UserType alldatatypesDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("alldatatypes"); UDTValue alldatatypes = alldatatypesDef.newValue(); @@ -241,24 +199,24 @@ public void testPrimitiveDatatypes() throws Exception { alldatatypes.setString(index, (String) sampleData); break; case BIGINT: - alldatatypes.setLong(index, ((Long) sampleData).longValue()); + alldatatypes.setLong(index, (Long) sampleData); break; case BLOB: alldatatypes.setBytes(index, (ByteBuffer) sampleData); break; case BOOLEAN: - alldatatypes.setBool(index, ((Boolean) sampleData).booleanValue()); + alldatatypes.setBool(index, (Boolean) sampleData); break; case DECIMAL: alldatatypes.setDecimal(index, (BigDecimal) sampleData); break; case DOUBLE: - alldatatypes.setDouble(index, ((Double) sampleData).doubleValue()); + alldatatypes.setDouble(index, (Double) sampleData); break; case DURATION: alldatatypes.set(index, Duration.from(sampleData.toString()), Duration.class); case FLOAT: - alldatatypes.setFloat(index, ((Float) sampleData).floatValue()); + alldatatypes.setFloat(index, (Float) sampleData); break; case INET: alldatatypes.setInet(index, (InetAddress) sampleData); @@ -270,7 +228,7 @@ public void testPrimitiveDatatypes() throws Exception { alldatatypes.setShort(index, (Short) sampleData); break; case INT: - alldatatypes.setInt(index, ((Integer) sampleData).intValue()); + alldatatypes.setInt(index, (Integer) sampleData); break; case TEXT: alldatatypes.setString(index, (String) sampleData); @@ -299,33 +257,22 @@ public void testPrimitiveDatatypes() throws Exception { } } - PreparedStatement ins = session().prepare("INSERT INTO mytable (a, b) VALUES (?, ?)"); + PreparedStatement ins = session().prepare("INSERT INTO alldatatypes_table (a, b) VALUES (?, ?)"); session().execute(ins.bind(0, alldatatypes)); // retrieve and verify data - ResultSet rs = session().execute("SELECT * FROM mytable"); + ResultSet rs = session().execute("SELECT * FROM alldatatypes_table"); List rows = rs.all(); - assertEquals(1, rows.size()); + assertThat(rows.size()).isEqualTo(1); Row row = rows.get(0); - assertEquals(row.getInt("a"), 0); - assertEquals(row.getUDTValue("b"), alldatatypes); + assertThat(row.getInt("a")).isEqualTo(0); + assertThat(row.getUDTValue("b")).isEqualTo(alldatatypes); } - /** - * Test for inserting various types of DATA_TYPE_NON_PRIMITIVE into UDT's - * Original code found in python-driver:integration.standard.test_udts.py:test_nonprimitive_datatypes - * - * @throws Exception - */ @Test(groups = "short") - public void testNonPrimitiveDatatypes() throws Exception { - // create keyspace - session().execute("CREATE KEYSPACE test_nonprimitive_datatypes " + - "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); - session().execute("USE test_nonprimitive_datatypes"); - + public void should_store_and_retrieve_UDT_containing_collections_and_tuples() throws Exception { // counters and durations are not allowed inside collections DATA_TYPE_PRIMITIVES.remove(DataType.counter()); DATA_TYPE_PRIMITIVES.remove(DataType.duration()); @@ -352,12 +299,12 @@ public void testNonPrimitiveDatatypes() throws Exception { alpha_type_list.add(typeString); } - session().execute(String.format("CREATE TYPE alldatatypes (%s)", Joiner.on(',').join(alpha_type_list))); - session().execute("CREATE TABLE mytable (a int PRIMARY KEY, b frozen)"); + session().execute(String.format("CREATE TYPE allcollectiontypes (%s)", Joiner.on(',').join(alpha_type_list))); + session().execute("CREATE TABLE allcollectiontypes_table (a int PRIMARY KEY, b frozen)"); // insert UDT data - UserType alldatatypesDef = cluster().getMetadata().getKeyspace("test_nonprimitive_datatypes").getUserType("alldatatypes"); - UDTValue alldatatypes = alldatatypesDef.newValue(); + UserType allcollectiontypesDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("allcollectiontypes"); + UDTValue allcollectiontypes = allcollectiontypesDef.newValue(); for (int i = 0; i < DATA_TYPE_NON_PRIMITIVE_NAMES.size(); i++) for (int j = 0; j < DATA_TYPE_PRIMITIVES.size(); j++) { @@ -368,46 +315,36 @@ public void testNonPrimitiveDatatypes() throws Exception { Object sampleElement = samples.get(dataType); switch (name) { case LIST: - alldatatypes.setList(index, Lists.newArrayList(sampleElement)); + allcollectiontypes.setList(index, Lists.newArrayList(sampleElement)); break; case SET: - alldatatypes.setSet(index, Sets.newHashSet(sampleElement)); + allcollectiontypes.setSet(index, Sets.newHashSet(sampleElement)); break; case MAP: - alldatatypes.setMap(index, ImmutableMap.of(sampleElement, sampleElement)); + allcollectiontypes.setMap(index, ImmutableMap.of(sampleElement, sampleElement)); break; case TUPLE: - alldatatypes.setTupleValue(index, cluster().getMetadata().newTupleType(dataType).newValue(sampleElement)); + allcollectiontypes.setTupleValue(index, cluster().getMetadata().newTupleType(dataType).newValue(sampleElement)); } } - PreparedStatement ins = session().prepare("INSERT INTO mytable (a, b) VALUES (?, ?)"); - session().execute(ins.bind(0, alldatatypes)); + PreparedStatement ins = session().prepare("INSERT INTO allcollectiontypes_table (a, b) VALUES (?, ?)"); + session().execute(ins.bind(0, allcollectiontypes)); // retrieve and verify data - ResultSet rs = session().execute("SELECT * FROM mytable"); + ResultSet rs = session().execute("SELECT * FROM allcollectiontypes_table"); List rows = rs.all(); - assertEquals(1, rows.size()); + assertThat(rows.size()).isEqualTo(1); Row row = rows.get(0); - assertEquals(row.getInt("a"), 0); - assertEquals(row.getUDTValue("b"), alldatatypes); + assertThat(row.getInt("a")).isEqualTo(0); + assertThat(row.getUDTValue("b")).isEqualTo(allcollectiontypes); } - /** - * Test for ensuring nested UDT's are handled correctly. - * Original code found in python-driver:integration.standard.test_udts.py:test_nested_registered_udts - * - * @throws Exception - */ @Test(groups = "short") - public void udtNestedTest() throws Exception { + public void should_save_and_retrieve_nested_UDTs() throws Exception { final int MAX_NESTING_DEPTH = 4; - // create keyspace - session().execute("CREATE KEYSPACE udtNestedTest " + - "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); - session().execute("USE udtNestedTest"); // create UDT session().execute("CREATE TYPE depth_0 (age int, name text)"); @@ -416,139 +353,119 @@ public void udtNestedTest() throws Exception { session().execute(String.format("CREATE TYPE depth_%s (value frozen)", String.valueOf(i), String.valueOf(i - 1))); } - session().execute(String.format("CREATE TABLE mytable (a int PRIMARY KEY, b frozen, c frozen, d frozen, e frozen," + + session().execute(String.format("CREATE TABLE nested_udt_table (a int PRIMARY KEY, b frozen, c frozen, d frozen, e frozen," + "f frozen)", MAX_NESTING_DEPTH)); // insert UDT data - UserType depthZeroDef = cluster().getMetadata().getKeyspace("udtNestedTest").getUserType("depth_0"); + KeyspaceMetadata keyspaceMetadata = cluster().getMetadata().getKeyspace(keyspace); + UserType depthZeroDef = keyspaceMetadata.getUserType("depth_0"); UDTValue depthZero = depthZeroDef.newValue().setInt("age", 42).setString("name", "Bob"); - UserType depthOneDef = cluster().getMetadata().getKeyspace("udtNestedTest").getUserType("depth_1"); + UserType depthOneDef = keyspaceMetadata.getUserType("depth_1"); UDTValue depthOne = depthOneDef.newValue().setUDTValue("value", depthZero); - UserType depthTwoDef = cluster().getMetadata().getKeyspace("udtNestedTest").getUserType("depth_2"); + UserType depthTwoDef = keyspaceMetadata.getUserType("depth_2"); UDTValue depthTwo = depthTwoDef.newValue().setUDTValue("value", depthOne); - UserType depthThreeDef = cluster().getMetadata().getKeyspace("udtNestedTest").getUserType("depth_3"); + UserType depthThreeDef = keyspaceMetadata.getUserType("depth_3"); UDTValue depthThree = depthThreeDef.newValue().setUDTValue("value", depthTwo); - UserType depthFourDef = cluster().getMetadata().getKeyspace("udtNestedTest").getUserType("depth_4"); + UserType depthFourDef = keyspaceMetadata.getUserType("depth_4"); UDTValue depthFour = depthFourDef.newValue().setUDTValue("value", depthThree); - PreparedStatement ins = session().prepare("INSERT INTO mytable (a, b, c, d, e, f) VALUES (?, ?, ?, ?, ?, ?)"); + PreparedStatement ins = session().prepare("INSERT INTO nested_udt_table (a, b, c, d, e, f) VALUES (?, ?, ?, ?, ?, ?)"); session().execute(ins.bind(0, depthZero, depthOne, depthTwo, depthThree, depthFour)); // retrieve and verify data - ResultSet rs = session().execute("SELECT * FROM mytable"); + ResultSet rs = session().execute("SELECT * FROM nested_udt_table"); List rows = rs.all(); - assertEquals(1, rows.size()); + assertThat(rows.size()).isEqualTo(1); Row row = rows.get(0); - assertEquals(row.getInt("a"), 0); - assertEquals(row.getUDTValue("b"), depthZero); - assertEquals(row.getUDTValue("c"), depthOne); - assertEquals(row.getUDTValue("d"), depthTwo); - assertEquals(row.getUDTValue("e"), depthThree); - assertEquals(row.getUDTValue("f"), depthFour); + assertThat(row.getInt("a")).isEqualTo(0); + assertThat(row.getUDTValue("b")).isEqualTo(depthZero); + assertThat(row.getUDTValue("c")).isEqualTo(depthOne); + assertThat(row.getUDTValue("d")).isEqualTo(depthTwo); + assertThat(row.getUDTValue("e")).isEqualTo(depthThree); + assertThat(row.getUDTValue("f")).isEqualTo(depthFour); } - /** - * Test for inserting null values into UDT's - * Original code found in python-driver:integration.standard.test_udts.py:test_udts_with_nulls - * - * @throws Exception - */ @Test(groups = "short") - public void testUdtsWithNulls() throws Exception { - // create keyspace - session().execute("CREATE KEYSPACE testUdtsWithNulls " + - "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); - session().execute("USE testUdtsWithNulls"); - + public void should_save_and_retrieve_UDTs_with_null_values() throws Exception { // create UDT - session().execute("CREATE TYPE user (a text, b int, c uuid, d blob)"); - session().execute("CREATE TABLE mytable (a int PRIMARY KEY, b frozen)"); + session().execute("CREATE TYPE user_null_values (a text, b int, c uuid, d blob)"); + session().execute("CREATE TABLE null_values_table (a int PRIMARY KEY, b frozen)"); // insert UDT data - UserType userTypeDef = cluster().getMetadata().getKeyspace("testUdtsWithNulls").getUserType("user"); + UserType userTypeDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("user_null_values"); UDTValue userType = userTypeDef.newValue().setString("a", null).setInt("b", 0).setUUID("c", null).setBytes("d", null); - PreparedStatement ins = session().prepare("INSERT INTO mytable (a, b) VALUES (?, ?)"); + PreparedStatement ins = session().prepare("INSERT INTO null_values_table (a, b) VALUES (?, ?)"); session().execute(ins.bind(0, userType)); // retrieve and verify data - ResultSet rs = session().execute("SELECT * FROM mytable"); + ResultSet rs = session().execute("SELECT * FROM null_values_table"); List rows = rs.all(); - assertEquals(1, rows.size()); + assertThat(rows.size()).isEqualTo(1); Row row = rows.get(0); - assertEquals(row.getInt("a"), 0); - assertEquals(row.getUDTValue("b"), userType); + assertThat(row.getInt("a")).isEqualTo(0); + assertThat(row.getUDTValue("b")).isEqualTo(userType); // test empty strings userType = userTypeDef.newValue().setString("a", "").setInt("b", 0).setUUID("c", null).setBytes("d", ByteBuffer.allocate(0)); session().execute(ins.bind(0, userType)); // retrieve and verify data - rs = session().execute("SELECT * FROM mytable"); + rs = session().execute("SELECT * FROM null_values_table"); rows = rs.all(); - assertEquals(1, rows.size()); + assertThat(rows.size()).isEqualTo(1); row = rows.get(0); - assertEquals(row.getInt("a"), 0); - assertEquals(row.getUDTValue("b"), userType); + assertThat(row.getInt("a")).isEqualTo(0); + assertThat(row.getUDTValue("b")).isEqualTo(userType); } - /** - * Test for inserting null values into collections of UDT's - * - * @throws Exception - */ @Test(groups = "short") - public void testUdtsWithCollectionNulls() throws Exception { - // create keyspace - session().execute("CREATE KEYSPACE testUdtsWithCollectionNulls " + - "WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor': '1'}"); - session().execute("USE testUdtsWithCollectionNulls"); - + public void should_save_and_retrieve_UDTs_with_null_collections() throws Exception { // create UDT - session().execute("CREATE TYPE user (a List, b Set, c Map, d frozen>)"); - session().execute("CREATE TABLE mytable (a int PRIMARY KEY, b frozen)"); + session().execute("CREATE TYPE user_null_collections (a List, b Set, c Map, d frozen>)"); + session().execute("CREATE TABLE null_collections_table (a int PRIMARY KEY, b frozen)"); // insert null UDT data - PreparedStatement ins = session().prepare("INSERT INTO mytable (a, b) " + + PreparedStatement ins = session().prepare("INSERT INTO null_collections_table (a, b) " + "VALUES (0, { a: ?, b: ?, c: ?, d: ? })"); session().execute(ins.bind().setList(0, null).setSet(1, null).setMap(2, null).setTupleValue(3, null)); // retrieve and verify data - ResultSet rs = session().execute("SELECT * FROM mytable"); + ResultSet rs = session().execute("SELECT * FROM null_collections_table"); List rows = rs.all(); - assertEquals(1, rows.size()); + assertThat(rows.size()).isEqualTo(1); Row row = rows.get(0); - assertEquals(row.getInt("a"), 0); + assertThat(row.getInt("a")).isEqualTo(0); - UserType userTypeDef = cluster().getMetadata().getKeyspace("testUdtsWithCollectionNulls").getUserType("user"); + UserType userTypeDef = cluster().getMetadata().getKeyspace(keyspace).getUserType("user_null_collections"); UDTValue userType = userTypeDef.newValue().setList("a", null).setSet("b", null).setMap("c", null).setTupleValue("d", null); - assertEquals(row.getUDTValue("b"), userType); + assertThat(row.getUDTValue("b")).isEqualTo(userType); // test missing UDT args - ins = session().prepare("INSERT INTO mytable (a, b) " + + ins = session().prepare("INSERT INTO null_collections_table (a, b) " + "VALUES (1, { a: ? })"); session().execute(ins.bind().setList(0, new ArrayList())); // retrieve and verify data - rs = session().execute("SELECT * FROM mytable"); + rs = session().execute("SELECT * FROM null_collections_table"); rows = rs.all(); - assertEquals(2, rows.size()); + assertThat(rows.size()).isEqualTo(2); row = rows.get(0); - assertEquals(row.getInt("a"), 1); + assertThat(row.getInt("a")).isEqualTo(1); userType = userTypeDef.newValue().setList(0, new ArrayList()); - assertEquals(row.getUDTValue("b"), userType); + assertThat(row.getUDTValue("b")).isEqualTo(userType); } } From 74b77c832628772a36bc4f3a6f0c7aac956e2195 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 7 Mar 2017 14:15:53 -0800 Subject: [PATCH 060/512] JAVA-1415: Correctly report if a UDT column is frozen --- changelog/README.md | 1 + .../driver/core/ColumnDefinitions.java | 8 +++ .../com/datastax/driver/core/DataType.java | 2 +- .../driver/core/DataTypeClassNameParser.java | 3 +- .../driver/core/DataTypeCqlNameParser.java | 4 +- .../com/datastax/driver/core/UserType.java | 48 +++++++++++++----- .../driver/core/CodecRegistryTest.java | 8 +-- .../datastax/driver/core/DataTypeTest.java | 4 +- .../datastax/driver/core/TypeCodecTest.java | 10 ++-- .../datastax/driver/core/UserTypesTest.java | 49 ++++++++++++++++++- 10 files changed, 109 insertions(+), 28 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index ce421160d4f..b5b7ace28a0 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -15,6 +15,7 @@ - [improvement] JAVA-1328: Provide compatibility with Guava 20. - [improvement] JAVA-1247: Disable idempotence warnings. - [improvement] JAVA-1286: Support setting and retrieving udt fields in QueryBuilder. +- [bug] JAVA-1415: Correctly report if a UDT column is frozen. Merged from 3.1.x branch: diff --git a/driver-core/src/main/java/com/datastax/driver/core/ColumnDefinitions.java b/driver-core/src/main/java/com/datastax/driver/core/ColumnDefinitions.java index 5057f72d4a0..a3721f74821 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ColumnDefinitions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ColumnDefinitions.java @@ -145,6 +145,10 @@ public String getName(int i) { /** * Returns the type of the {@code i}th column in this metadata. + *

    + * Note that this method does not set the {@link DataType#isFrozen()} flag on the returned + * object, it will always default to {@code false}. Use {@link Cluster#getMetadata()} to + * determine if a column is frozen. * * @param i the index in this metadata. * @return the type of the {@code i}th column in this metadata. @@ -156,6 +160,10 @@ public DataType getType(int i) { /** * Returns the type of the first occurrence of {@code name} in this metadata. + *

    + * Note that this method does not set the {@link DataType#isFrozen()} flag on the returned + * object, it will always default to {@code false}. Use {@link Cluster#getMetadata()} to + * determine if a column is frozen. * * @param name the name of the column. * @return the type of (the first occurrence of) {@code name} in this metadata. diff --git a/driver-core/src/main/java/com/datastax/driver/core/DataType.java b/driver-core/src/main/java/com/datastax/driver/core/DataType.java index 1443bba76cc..1f29a9c7ab6 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DataType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DataType.java @@ -188,7 +188,7 @@ static DataType decode(ByteBuf buffer, ProtocolVersion protocolVersion, CodecReg DataType fieldType = decode(buffer, protocolVersion, codecRegistry); fields.add(new UserType.Field(fieldName, fieldType)); } - return new UserType(keyspace, type, fields, protocolVersion, codecRegistry); + return new UserType(keyspace, type, false, fields, protocolVersion, codecRegistry); case TUPLE: nFields = buffer.readShort() & 0xffff; List types = new ArrayList(nFields); diff --git a/driver-core/src/main/java/com/datastax/driver/core/DataTypeClassNameParser.java b/driver-core/src/main/java/com/datastax/driver/core/DataTypeClassNameParser.java index 4c6950db5d0..f7741702bff 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DataTypeClassNameParser.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DataTypeClassNameParser.java @@ -113,7 +113,8 @@ static DataType parseOne(String className, ProtocolVersion protocolVersion, Code List fields = new ArrayList(rawFields.size()); for (Map.Entry entry : rawFields.entrySet()) fields.add(new UserType.Field(entry.getKey(), parseOne(entry.getValue(), protocolVersion, codecRegistry))); - return new UserType(keyspace, typeName, fields, protocolVersion, codecRegistry); + // create a frozen UserType since C* 2.x UDTs are always frozen. + return new UserType(keyspace, typeName, true, fields, protocolVersion, codecRegistry); } if (isTupleType(next)) { diff --git a/driver-core/src/main/java/com/datastax/driver/core/DataTypeCqlNameParser.java b/driver-core/src/main/java/com/datastax/driver/core/DataTypeCqlNameParser.java index 1eb010f6137..4a0bd6ed83c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DataTypeCqlNameParser.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DataTypeCqlNameParser.java @@ -137,7 +137,7 @@ static DataType parse(String toParse, Cluster cluster, String currentKeyspaceNam // We need to remove escaped double quotes within the type name as it is stored unescaped. // Otherwise it's a UDT. If we only want a shallow definition build it, otherwise search known definitions. if (shallowUserTypes) - return new UserType.Shallow(currentKeyspaceName, Metadata.handleId(type)); + return new UserType.Shallow(currentKeyspaceName, Metadata.handleId(type), frozen); UserType userType = null; if (currentUserTypes != null) @@ -148,7 +148,7 @@ static DataType parse(String toParse, Cluster cluster, String currentKeyspaceNam if (userType == null) throw new UnresolvedUserTypeException(currentKeyspaceName, type); else - return userType; + return userType.copy(frozen); } private static class Parser { diff --git a/driver-core/src/main/java/com/datastax/driver/core/UserType.java b/driver-core/src/main/java/com/datastax/driver/core/UserType.java index d3db0f61cf2..405121da3e4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/UserType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/UserType.java @@ -33,8 +33,11 @@ public class UserType extends DataType implements Iterable { private final String keyspace; private final String typeName; + private final boolean frozen; private final ProtocolVersion protocolVersion; + // can be null, if this object is being constructed from a response message + // see Responses.Result.Rows.Metadata.decode() private volatile CodecRegistry codecRegistry; // Note that we don't expose the order of fields, from an API perspective this is a map @@ -46,20 +49,31 @@ public class UserType extends DataType implements Iterable { // implementation. final Map byName; - UserType(String keyspace, String typeName, Collection fields, ProtocolVersion protocolVersion, CodecRegistry codecRegistry) { - super(DataType.Name.UDT); + private UserType(Name name, String keyspace, String typeName, boolean frozen, ProtocolVersion protocolVersion, CodecRegistry codecRegistry, Field[] byIdx, Map byName) { + super(name); this.keyspace = keyspace; this.typeName = typeName; + this.frozen = frozen; this.protocolVersion = protocolVersion; - // codecRegistry can be null, if this object is being constructed from a response message - // see Responses.Result.Rows.Metadata.decode() this.codecRegistry = codecRegistry; - this.byIdx = fields.toArray(new Field[fields.size()]); + this.byIdx = byIdx; + this.byName = byName; + } + + UserType(String keyspace, String typeName, boolean frozen, Collection fields, ProtocolVersion protocolVersion, CodecRegistry codecRegistry) { + this(DataType.Name.UDT, keyspace, typeName, frozen, protocolVersion, codecRegistry, + fields.toArray(new Field[fields.size()]), + mapByName(fields)); + } + private static ImmutableMap mapByName(Collection fields) { ImmutableMap.Builder builder = new ImmutableMap.Builder(); - for (int i = 0; i < byIdx.length; i++) - builder.put(byIdx[i].getName(), new int[]{i}); - this.byName = builder.build(); + int i = 0; + for (Field field : fields) { + builder.put(field.getName(), new int[]{i}); + i += 1; + } + return builder.build(); } static UserType build(KeyspaceMetadata ksm, Row row, VersionNumber version, Cluster cluster, Map userTypes) { @@ -82,7 +96,7 @@ static UserType build(KeyspaceMetadata ksm, Row row, VersionNumber version, Clus } fields.add(new Field(fieldNames.get(i), fieldType)); } - return new UserType(keyspace, name, fields, protocolVersion, codecRegistry); + return new UserType(keyspace, name, false, fields, protocolVersion, codecRegistry); } /** @@ -174,7 +188,15 @@ public DataType getFieldType(String name) { @Override public boolean isFrozen() { - return true; + return frozen; + } + + public UserType copy(boolean newFrozen) { + if (newFrozen == frozen) { + return this; + } else { + return new UserType(name, keyspace, typeName, newFrozen, protocolVersion, codecRegistry, byIdx, byName); + } } @Override @@ -340,16 +362,18 @@ static class Shallow extends DataType { final String keyspaceName; final String typeName; + final boolean frozen; - Shallow(String keyspaceName, String typeName) { + Shallow(String keyspaceName, String typeName, boolean frozen) { super(Name.UDT); this.keyspaceName = keyspaceName; this.typeName = typeName; + this.frozen = frozen; } @Override public boolean isFrozen() { - return false; + return frozen; } } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/CodecRegistryTest.java b/driver-core/src/test/java/com/datastax/driver/core/CodecRegistryTest.java index 3cc6b63a854..4285436ee07 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CodecRegistryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CodecRegistryTest.java @@ -362,25 +362,25 @@ public void should_create_tuple_codec() { @Test(groups = "unit") public void should_create_udt_codec() { CodecRegistry registry = new CodecRegistry(); - UserType udt = new UserType("ks", "test", Collections.emptyList(), V4, registry); + UserType udt = new UserType("ks", "test", false, Collections.emptyList(), V4, registry); assertThat(registry.codecFor(udt)) .isNotNull() .accepts(udt) .accepts(UDTValue.class); registry = new CodecRegistry(); - udt = new UserType("ks", "test", Collections.emptyList(), V4, registry); + udt = new UserType("ks", "test", false, Collections.emptyList(), V4, registry); assertThat(registry.codecFor(udt, UDTValue.class)) .isNotNull() .accepts(udt) .accepts(UDTValue.class); registry = new CodecRegistry(); - udt = new UserType("ks", "test", Collections.emptyList(), V4, registry); + udt = new UserType("ks", "test", false, Collections.emptyList(), V4, registry); assertThat(registry.codecFor(new UDTValue(udt))) .isNotNull() .accepts(udt) .accepts(UDTValue.class); registry = new CodecRegistry(); - udt = new UserType("ks", "test", Collections.emptyList(), V4, registry); + udt = new UserType("ks", "test", false, Collections.emptyList(), V4, registry); assertThat(registry.codecFor(udt, new UDTValue(udt))) .isNotNull() .accepts(udt) diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java index 81bc3208706..20f8df74ff6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java @@ -238,8 +238,8 @@ public void parseFormatMapTest() { public void parseFormatUDTTest() { String toParse = "{t:'fo''o',i:3,\"L\":['a','b'],s:{3:{a:0x01}}}"; - final UserType udt1 = new UserType("ks", "t", Arrays.asList(new UserType.Field("a", DataType.blob())), protocolVersion, codecRegistry); - UserType udt2 = new UserType("ks", "t", Arrays.asList( + final UserType udt1 = new UserType("ks", "t", false, Arrays.asList(new UserType.Field("a", DataType.blob())), protocolVersion, codecRegistry); + UserType udt2 = new UserType("ks", "t", false, Arrays.asList( new UserType.Field("t", DataType.text()), new UserType.Field("i", DataType.cint()), new UserType.Field("L", DataType.list(DataType.text())), diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTest.java index 1773ae3d044..1a499b20fa1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTest.java @@ -148,10 +148,10 @@ public void test_varchar_vs_text() { .accepts(t2) .accepts(t3) .accepts(t4); - UserType u1 = new UserType("ks", "table", newArrayList(new Field("f1", varchar()), new Field("f2", varchar())), V3, new CodecRegistry()); - UserType u2 = new UserType("ks", "table", newArrayList(new Field("f1", text()), new Field("f2", varchar())), V3, new CodecRegistry()); - UserType u3 = new UserType("ks", "table", newArrayList(new Field("f1", varchar()), new Field("f2", text())), V3, new CodecRegistry()); - UserType u4 = new UserType("ks", "table", newArrayList(new Field("f1", text()), new Field("f2", text())), V3, new CodecRegistry()); + UserType u1 = new UserType("ks", "table", false, newArrayList(new Field("f1", varchar()), new Field("f2", varchar())), V3, new CodecRegistry()); + UserType u2 = new UserType("ks", "table", false, newArrayList(new Field("f1", text()), new Field("f2", varchar())), V3, new CodecRegistry()); + UserType u3 = new UserType("ks", "table", false, newArrayList(new Field("f1", varchar()), new Field("f2", text())), V3, new CodecRegistry()); + UserType u4 = new UserType("ks", "table", false, newArrayList(new Field("f1", text()), new Field("f2", text())), V3, new CodecRegistry()); assertThat(TypeCodec.userType(u1)) .accepts(u2) .accepts(u3) @@ -219,7 +219,7 @@ public void should_deserialize_empty_buffer_as_tuple_with_null_values() { @Test(groups = "unit") public void should_deserialize_empty_buffer_as_udt_with_null_values() { CodecRegistry codecRegistry = new CodecRegistry(); - UserType udt = new UserType("ks", "t", Arrays.asList( + UserType udt = new UserType("ks", "t", false, Arrays.asList( new UserType.Field("t", DataType.text()), new UserType.Field("i", DataType.cint()), new UserType.Field("l", DataType.list(DataType.text())) diff --git a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java index 885cdf82b83..7e303723aaf 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java @@ -59,8 +59,9 @@ public void onTestContextInitialized() { samples = PrimitiveTypeSamples.samples(protocolVersion); String type1 = "CREATE TYPE phone (alias text, number text)"; String type2 = "CREATE TYPE \"\"\"User Address\"\"\" (street text, \"ZIP\"\"\" int, phones set>)"; + String type3 = "CREATE TYPE type_for_frozen_test(i int)"; String table = "CREATE TABLE user (id int PRIMARY KEY, addr frozen<\"\"\"User Address\"\"\">)"; - execute(type1, type2, table); + execute(type1, type2, type3, table); // Ci tests fail with "unconfigured columnfamily user" check().that(userTableExists).before(5, MINUTES).becomesTrue(); } @@ -468,4 +469,50 @@ public void should_save_and_retrieve_UDTs_with_null_collections() throws Excepti userType = userTypeDef.newValue().setList(0, new ArrayList()); assertThat(row.getUDTValue("b")).isEqualTo(userType); } + + @Test(groups = "short") + public void should_indicate_user_type_is_frozen() { + session().execute("CREATE TABLE frozen_table(k int primary key, v frozen)"); + + KeyspaceMetadata keyspaceMetadata = cluster().getMetadata().getKeyspace(this.keyspace); + + assertThat(keyspaceMetadata.getUserType("type_for_frozen_test")) + .isNotFrozen(); + + assertThat(keyspaceMetadata.getTable("frozen_table").getColumn("v").getType()) + .isFrozen(); + + // The frozen flag is not set for result set definitions (the protocol does not provide + // that information and it's not really useful in that situation). We always return false. + ResultSet rs = session().execute("SELECT v FROM frozen_table WHERE k = 1"); + assertThat(rs.getColumnDefinitions().getType(0)) + .isNotFrozen(); + + // Same thing for prepared statements + PreparedStatement pst = session().prepare("SELECT v FROM frozen_table WHERE k = ?"); + assertThat(pst.getVariables().getType(0)) + .isNotFrozen(); + } + + @Test(groups = "short") + @CassandraVersion(value = "3.6", description = "Non-frozen UDTs were introduced in C* 3.6") + public void should_indicate_user_type_is_not_frozen() { + session().execute("CREATE TABLE not_frozen_table(k int primary key, v type_for_frozen_test)"); + + KeyspaceMetadata keyspaceMetadata = cluster().getMetadata().getKeyspace(this.keyspace); + + assertThat(keyspaceMetadata.getUserType("type_for_frozen_test")) + .isNotFrozen(); + + assertThat(keyspaceMetadata.getTable("not_frozen_table").getColumn("v").getType()) + .isNotFrozen(); + + ResultSet rs = session().execute("SELECT v FROM not_frozen_table WHERE k = 1"); + assertThat(rs.getColumnDefinitions().getType(0)) + .isNotFrozen(); + + PreparedStatement pst = session().prepare("SELECT v FROM not_frozen_table WHERE k = ?"); + assertThat(pst.getVariables().getType(0)) + .isNotFrozen(); + } } From 109c529010614bc0af99b55d708d987afc217441 Mon Sep 17 00:00:00 2001 From: Olivier Michallat Date: Thu, 9 Mar 2017 09:19:49 -0800 Subject: [PATCH 061/512] JAVA-1418: Make Guava version detection more reliable (#825) --- changelog/README.md | 1 + .../driver/core/GuavaCompatibility.java | 112 ++++++++---------- 2 files changed, 50 insertions(+), 63 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index b5b7ace28a0..94435f1e1a5 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -16,6 +16,7 @@ - [improvement] JAVA-1247: Disable idempotence warnings. - [improvement] JAVA-1286: Support setting and retrieving udt fields in QueryBuilder. - [bug] JAVA-1415: Correctly report if a UDT column is frozen. +- [bug] JAVA-1418: Make Guava version detection more reliable. Merged from 3.1.x branch: diff --git a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java index df103d5fb64..d7b14539341 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java +++ b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java @@ -16,22 +16,17 @@ package com.datastax.driver.core; import com.datastax.driver.core.exceptions.DriverInternalError; -import com.google.common.base.Preconditions; +import com.google.common.collect.BiMap; +import com.google.common.collect.Maps; import com.google.common.reflect.TypeToken; import com.google.common.util.concurrent.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.IOException; -import java.io.InputStream; +import java.lang.reflect.ParameterizedType; import java.lang.reflect.Type; -import java.net.URL; -import java.util.Enumeration; +import java.util.Map; import java.util.concurrent.Executor; -import java.util.jar.Attributes; -import java.util.jar.Manifest; -import java.util.regex.Matcher; -import java.util.regex.Pattern; /** * A compatibility layer to support a wide range of Guava versions. @@ -50,7 +45,6 @@ public abstract class GuavaCompatibility { private static final Logger logger = LoggerFactory.getLogger(GuavaCompatibility.class); - private static final Pattern GA_VERSION_EXTRACTOR = Pattern.compile("(\\d+\\.\\d+\\.\\d+).*"); /** * The unique instance of this class, that is compatible with the Guava version found in the classpath. @@ -134,61 +128,15 @@ public abstract ListenableFuture transformAsync(ListenableFuture in public abstract Executor sameThreadExecutor(); private static GuavaCompatibility selectImplementation() { - String fullVersion = getBundleVersion(loadGuavaManifest()); - // Get rid of potential rc qualifier, as it could throw off the lexical comparisons - String version = stripQualifiers(fullVersion); - if (version.compareTo("16.0.1") < 0) { - throw new DriverInternalError(String.format( - "Detected incompatible version of Guava in the classpath (%s). " + - "You need 16.0.1 or higher.", fullVersion)); - } else if (version.compareTo("19.0") < 0) { - logger.info("Detected Guava {} in the classpath, using pre-19 compatibility layer", fullVersion); - return new Version18OrLower(); - } else { - logger.info("Detected Guava {} in the classpath, using 19+ compatibility layer", fullVersion); + if (isGuava_19_0_OrHigher()) { + logger.info("Detected Guava >= 19 in the classpath, using modern compatibility layer"); return new Version19OrHigher(); - } - } - - private static Manifest loadGuavaManifest() { - InputStream in = null; - try { - Enumeration resources = Preconditions.class.getClassLoader() - .getResources("META-INF/MANIFEST.MF"); - while (resources.hasMoreElements()) { - in = resources.nextElement().openStream(); - Manifest manifest = new Manifest(in); - Attributes mainAttributes = manifest.getMainAttributes(); - String symbolicName = mainAttributes.getValue("Bundle-SymbolicName"); - if ("com.google.guava".equals(symbolicName)) { - return manifest; - } - } - throw new DriverInternalError("Error while looking up Guava manifest: " + - "no manifest with symbolic name 'com.google.guava' found in classpath."); - } catch (Exception e) { - throw new DriverInternalError("Error while looking up Guava manifest", e); - } finally { - if (in != null) { - try { - in.close(); - } catch (IOException e) { - // ignore - } - } - } - } - - private static String getBundleVersion(Manifest manifest) { - return manifest.getMainAttributes().getValue("Bundle-Version"); - } - - private static String stripQualifiers(String fullVersion) { - Matcher matcher = GA_VERSION_EXTRACTOR.matcher(fullVersion); - if (matcher.matches()) { - return matcher.group(1); + } else if (isGuava_16_0_1_OrHigher()) { + logger.info("Detected Guava < 19 in the classpath, using legacy compatibility layer"); + return new Version18OrLower(); } else { - throw new DriverInternalError(String.format("Could not strip qualifiers from full Guava version %s", fullVersion)); + throw new DriverInternalError("Detected incompatible version of Guava in the classpath. " + + "You need 16.0.1 or higher."); } } @@ -272,4 +220,42 @@ public Executor sameThreadExecutor() { return MoreExecutors.directExecutor(); } } + + private static boolean isGuava_19_0_OrHigher() { + return methodExists(Futures.class, "transformAsync", ListenableFuture.class, AsyncFunction.class); + } + + private static boolean isGuava_16_0_1_OrHigher() { + // Cheap check for < 16.0 + if (!methodExists(Maps.class, "asConverter", BiMap.class)) { + return false; + } + // More elaborate check to filter out 16.0, which has a bug in TypeToken. We need 16.0.1. + boolean resolved = false; + TypeToken> mapOfString = TypeTokens.mapOf(String.class, String.class); + Type type = mapOfString.getType(); + if (type instanceof ParameterizedType) { + ParameterizedType pType = (ParameterizedType) type; + Type[] types = pType.getActualTypeArguments(); + if (types.length == 2) { + TypeToken valueType = TypeToken.of(types[1]); + resolved = valueType.getRawType().equals(String.class); + } + } + if (!resolved) { + logger.debug("Detected Guava issue #1635 which indicates that version 16.0 is in the classpath"); + } + return resolved; + } + + private static boolean methodExists(Class declaringClass, String methodName, Class... parameterTypes) { + try { + declaringClass.getMethod(methodName, parameterTypes); + return true; + } catch (Exception e) { + logger.debug("Error while checking existence of method " + + declaringClass.getSimpleName() + "." + methodName, e); + return false; + } + } } From 447e0b905758711abbbf5b07f1c5d6d200ae1b37 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 2 Mar 2017 19:13:11 -0600 Subject: [PATCH 062/512] Allow Guava 21 to be imported in OSGi bundle Also consistently use com.google.common.* for Import-Package --- driver-core/pom.xml | 4 ++-- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 4725272b6ef..77d68eeb17d 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -200,7 +200,7 @@ <_include>-osgi.bnd - + jar @@ -224,7 +224,7 @@ JNR does not provide OSGi bundles, so exclude it; the driver can live without it Explicitly import javax.security.cert because it's required by Netty, but Netty has been explicitly excluded --> - + com.datastax.shaded.* diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 197c04906a5..22bda4ff7e0 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -230,7 +230,7 @@ com.datastax.driver.extras ${project.version} <_include>-osgi.bnd - + jar diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index a96ddf9974a..400c00c5a60 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -158,7 +158,7 @@ com.datastax.driver.mapping ${project.version} <_include>-osgi.bnd - + jar From c7c43408572f53ba406602f1fde2eb3d29ca852f Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 2 Mar 2017 19:13:57 -0600 Subject: [PATCH 063/512] Add OSGi test for Guava 21 support --- .../driver/osgi/MailboxServiceGuava21IT.java | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava21IT.java diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava21IT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava21IT.java new file mode 100644 index 00000000000..6235f5ef9ce --- /dev/null +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava21IT.java @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.osgi; + +import com.datastax.driver.osgi.api.MailboxException; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; +import org.ops4j.pax.exam.testng.listener.PaxExam; +import org.testng.SkipException; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +import static com.datastax.driver.osgi.BundleOptions.*; +import static org.ops4j.pax.exam.CoreOptions.options; + +@Listeners({CCMBridgeListener.class, PaxExam.class}) +public class MailboxServiceGuava21IT extends MailboxServiceTests { + + @Configuration + public Option[] guava21Config() { + MavenArtifactProvisionOption guavaBundle = guavaBundle(); + String javaVersion = System.getProperty("java.version"); + // Only bring in 21.0 if java version >= 1.8. If this is not done the framework + // will fail to load for < 1.8 and we plan on skipping the test anyways. + if (javaVersion.compareTo("1.8") >= 0) { + guavaBundle = guavaBundle.version("21.0"); + } + + return options( + defaultOptions(), + nettyBundles(), + guavaBundle, + driverBundle(), + extrasBundle(), + mappingBundle(), + mailboxBundle() + ); + } + + /** + * Exercises a 'mailbox' service provided by an OSGi bundle that depends on the driver with + * Guava 21 explicitly enforced. + * + * @test_category packaging + * @expected_result Can create, retrieve and delete data using the mailbox service. + * @jira_ticket JAVA-620 + * @since 2.0.10, 2.1.5 + */ + @Test(groups = "short") + public void test_guava_21() throws MailboxException { + String javaVersion = System.getProperty("java.version"); + if (javaVersion.compareTo("1.8") < 0) { + throw new SkipException("Guava 21 requires Java 1.8"); + } + checkService(); + } +} From 4746cd3398e9ff888171eb1720eaf14ea68e4b3a Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 10 Mar 2017 09:20:52 -0600 Subject: [PATCH 064/512] Exclude frozen specifier from fullFunctionName As a function/aggregate argument applying frozen<> to a UDT is not applicable since that's a consequence of the serialization of the data and not the definition of the argument. Previously this was not an issue since UDTs were always frozen which is no longer the case. --- .../src/main/java/com/datastax/driver/core/Metadata.java | 4 ---- 1 file changed, 4 deletions(-) diff --git a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java index 10cf93a2e89..33529117af1 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java @@ -175,11 +175,7 @@ static String fullFunctionName(String simpleName, Collection argumentTypes) { if (argumentType instanceof UserType) { UserType userType = (UserType) argumentType; String typeName = Metadata.escapeId(userType.getTypeName()); - if (userType.isFrozen()) - sb.append("frozen<"); sb.append(typeName); - if (userType.isFrozen()) - sb.append(">"); } else { sb.append(argumentType); } From da865b1ab1171e1674abbc53e9a38eb8dfa04f48 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 10 Mar 2017 09:22:47 -0600 Subject: [PATCH 065/512] Include 2.2 and 3.0 in 'commit' configuration 2.2 and 3.0 are different enough from latest 3.X version to justify always being run. --- build.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/build.yaml b/build.yaml index 12d8b67f2e1..ae3992c1d84 100644 --- a/build.yaml +++ b/build.yaml @@ -9,8 +9,6 @@ schedules: # Exclude java6 with all versions except latest - java: openjdk6 cassandra: ['1.2', '2.0', '2.1', '2.2', '3.0'] - # Exclude 2.2 and 3.0 always since 3.X provides latest protocol version - - cassandra: ['2.2', '3.0'] env_vars: | TEST_GROUP="short" nightly: From f7d47c9f1a2e2795e0a4bded5780d10299147da3 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 10 Mar 2017 13:23:20 -0600 Subject: [PATCH 066/512] Support Duration type in PrimitiveTypeSamples. (#828) * Support Duration type in PrimitiveTypeSamples. A number of tests use PrimitiveTypeSamples for getting sample values for given DataTypes. Duration was previously omitted from this because it is not supported in Set or Map keys. Special case tests that involve using these samples for Map and Sets so we get better Duration coverage. In addition, this fixes a bug in UserTypesTest where it attempts to resolve a sample for Duration but one is not found. --- .../driver/core/DataTypeIntegrationTest.java | 18 ++++++++++++------ .../driver/core/PrimitiveTypeSamples.java | 5 ++--- .../com/datastax/driver/core/TupleTest.java | 13 +++++++++++-- .../datastax/driver/core/UserTypesTest.java | 1 + 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java index 684607d90ee..d2ceddc7eac 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java @@ -217,7 +217,7 @@ private List tablesWithPrimitives() { private List tablesWithPrimitivesNull() { List tables = Lists.newArrayList(); // Create a test table for each primitive type testing with null values. If the - // type maps to a java primitive type it's value will by the default value instead of null. + // type maps to a java primitive type it's value will be the default one specified here instead of null. for (DataType dataType : TestUtils.allPrimitiveTypes(ccm().getProtocolVersion())) { Object expectedPrimitiveValue = null; switch (dataType.getName()) { @@ -243,10 +243,8 @@ private List tablesWithPrimitivesNull() { case BOOLEAN: expectedPrimitiveValue = false; break; - case COUNTER: - case DURATION: - // Duration is handled separately in DurationIntegrationTest, because it has specific restrictions (e.g. - // not allowed in collections). + default: + // not a Java primitive type continue; } @@ -264,7 +262,9 @@ private List tablesWithCollectionsOfPrimitives() { Object elementSample = entry.getValue(); tables.add(new TestTable(DataType.list(elementType), Lists.newArrayList(elementSample, elementSample), "1.2.0")); - tables.add(new TestTable(DataType.set(elementType), Sets.newHashSet(elementSample), "1.2.0")); + // Duration not supported in Set + if (elementType != DataType.duration()) + tables.add(new TestTable(DataType.set(elementType), Sets.newHashSet(elementSample), "1.2.0")); } return tables; } @@ -272,7 +272,11 @@ private List tablesWithCollectionsOfPrimitives() { private List tablesWithMapsOfPrimitives() { List tables = Lists.newArrayList(); for (Map.Entry keyEntry : samples.entrySet()) { + // Duration not supported as Map key DataType keyType = keyEntry.getKey(); + if (keyType == DataType.duration()) + continue; + Object keySample = keyEntry.getValue(); for (Map.Entry valueEntry : samples.entrySet()) { DataType valueType = valueEntry.getKey(); @@ -467,6 +471,8 @@ private Object getValue(GettableByIndexData data, DataType dataType) { return data.getMap(0, codecRegistry.codecFor(dataType.getTypeArguments().get(0)).getJavaType(), codecRegistry.codecFor(dataType.getTypeArguments().get(1)).getJavaType()); + case DURATION: + return data.get(0, Duration.class); case CUSTOM: case COUNTER: default: diff --git a/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java b/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java index 0d0c1f76883..7624b560cb8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java @@ -51,6 +51,7 @@ static Map samples(ProtocolVersion protocolVersion) { .put(DataType.tinyint(), Byte.MAX_VALUE) .put(DataType.smallint(), Short.MAX_VALUE) .put(DataType.cint(), Integer.MAX_VALUE) + .put(DataType.duration(), Duration.from("PT30H20M")) .put(DataType.text(), "text") .put(DataType.timestamp(), new Date(872835240000L)) .put(DataType.date(), LocalDate.fromDaysSinceEpoch(16071)) @@ -74,9 +75,7 @@ public boolean apply(DataType input) { List tmp = Lists.newArrayList(primitiveTypes); tmp.removeAll(result.keySet()); - List expectedFilteredTypes = protocolVersion.compareTo(ProtocolVersion.V5) >= 0 ? - Lists.newArrayList(DataType.counter(), DataType.duration()) : - Lists.newArrayList(DataType.counter()); + List expectedFilteredTypes = Lists.newArrayList(DataType.counter()); assertThat(tmp) .as("new datatype not covered in test") diff --git a/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java b/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java index 1b5e17cc8af..9bdffcce239 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java @@ -277,12 +277,16 @@ public void tupleNonPrimitiveSubTypesTest() throws Exception { // create set values for (DataType datatype : DATA_TYPE_PRIMITIVES) { - values.add(String.format("v_%s frozen>>", values.size(), datatype)); + // Duration not supported in Set. + if (datatype != DataType.duration()) + values.add(String.format("v_%s frozen>>", values.size(), datatype)); } // create map values for (DataType datatype : DATA_TYPE_PRIMITIVES) { - values.add(String.format("v_%s frozen>>", values.size(), datatype, datatype)); + // Duration not supported as Map key. + if (datatype != DataType.duration()) + values.add(String.format("v_%s frozen>>", values.size(), datatype, datatype)); } // create table @@ -315,6 +319,9 @@ public void tupleNonPrimitiveSubTypesTest() throws Exception { // test tuple> for (DataType datatype : DATA_TYPE_PRIMITIVES) { + if (datatype == DataType.duration()) + continue; + // create tuple ArrayList dataTypes = new ArrayList(); ArrayList createdValues = new ArrayList(); @@ -338,6 +345,8 @@ public void tupleNonPrimitiveSubTypesTest() throws Exception { // test tuple> for (DataType datatype : DATA_TYPE_PRIMITIVES) { + if (datatype == DataType.duration()) + continue; // create tuple ArrayList dataTypes = new ArrayList(); ArrayList createdValues = new ArrayList(); diff --git a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java index 7e303723aaf..8012071393e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java @@ -216,6 +216,7 @@ public void should_store_and_retrieve_UDT_containing_any_primitive_type() throws break; case DURATION: alldatatypes.set(index, Duration.from(sampleData.toString()), Duration.class); + break; case FLOAT: alldatatypes.setFloat(index, (Float) sampleData); break; From 3c7b209d2baf615191083dc6ad7471441ab54277 Mon Sep 17 00:00:00 2001 From: GregBestland Date: Tue, 7 Mar 2017 17:05:49 -0600 Subject: [PATCH 067/512] Fixing Misc Unreliable Tests Fixed race conditions in HostConnectionPool Related to changes introduced in JAVA-1371 Skipping null mapper tests for C* < 2.1.0 --- .../driver/core/HostConnectionPoolTest.java | 15 +++++++++------ .../driver/mapping/MapperSaveNullFieldsTest.java | 2 ++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolTest.java b/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolTest.java index bf8ee3371a9..33d85670827 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolTest.java @@ -18,7 +18,7 @@ import com.codahale.metrics.Gauge; import com.datastax.driver.core.exceptions.*; import com.datastax.driver.core.policies.ConstantReconnectionPolicy; -import com.datastax.driver.core.utils.MoreFutures; +import com.google.common.base.Function; import com.google.common.base.Predicate; import com.google.common.base.Throwables; import com.google.common.util.concurrent.*; @@ -290,7 +290,7 @@ public void should_adjust_connection_keyspace_on_dequeue_if_pool_state_is_differ int count = 0; for (MockRequest queuedRequest : queuedRequests) { try { - Uninterruptibles.getUninterruptibly(queuedRequest.connectionFuture, 5, TimeUnit.SECONDS); + Uninterruptibles.getUninterruptibly(queuedRequest.connectionFuture, 10, TimeUnit.SECONDS); count++; } catch (ExecutionException e) { // 128th request should timeout since all in flight requests are used. @@ -400,7 +400,6 @@ public void should_fail_in_dequeue_when_setting_keyspace_and_another_set_keyspac assertThat(e.getCause()).isInstanceOf(DriverException.class); assertThat(e.getCause().getMessage()).contains("Aborting attempt to set keyspace to 'newkeyspace' since there is already an in flight attempt to set keyspace to 'slowks'."); } - } finally { MockRequest.completeAll(requests); cluster.close(); @@ -1242,8 +1241,8 @@ public void should_wait_on_connection_if_zero_core_connections() throws Exceptio // Should create up to core connections. verify(factory, timeout(readTimeout).times(1)).open(any(HostConnectionPool.class)); - assertPoolSize(pool, 1); + Uninterruptibles.getUninterruptibly(request.requestInitialized, 10, TimeUnit.SECONDS); request.simulateSuccessResponse(); } finally { cluster.close(); @@ -1348,6 +1347,9 @@ static class MockRequest implements Connection.ResponseCallback { enum State {START, COMPLETED, FAILED, TIMED_OUT} final ListenableFuture connectionFuture; + + final ListenableFuture requestInitialized; + private volatile Connection.ResponseHandler responseHandler; final AtomicReference state = new AtomicReference(State.START); @@ -1404,12 +1406,13 @@ private static void completeAll(List requests) { private MockRequest(HostConnectionPool pool, int timeoutMillis, int maxQueueSize) throws ConnectionException { this.connectionFuture = pool.borrowConnection(timeoutMillis, MILLISECONDS, maxQueueSize); - Futures.addCallback(this.connectionFuture, new MoreFutures.SuccessCallback() { + requestInitialized = Futures.transform(this.connectionFuture, new Function() { @Override - public void onSuccess(Connection connection) { + public Connection.ResponseHandler apply(Connection connection) { MockRequest thisRequest = MockRequest.this; thisRequest.responseHandler = new Connection.ResponseHandler(connection, -1, thisRequest); connection.dispatcher.add(thisRequest.responseHandler); + return responseHandler; } }); } diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java index 296bec09b52..358903bb7cb 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java @@ -17,6 +17,7 @@ import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.core.utils.CassandraVersion; import com.datastax.driver.mapping.Mapper.Option; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; @@ -40,6 +41,7 @@ public void setup() { mapper = new MappingManager(session()).mapper(User.class); } + @CassandraVersion("2.1.0") @Test(groups = "short") void should_save_null_fields_if_requested() { should_save_null_fields(true, Option.saveNullFields(true)); From fbf0ab0304da0f9127a4a614bddb333c2bea8eb0 Mon Sep 17 00:00:00 2001 From: olim7t Date: Wed, 8 Mar 2017 13:20:38 -0800 Subject: [PATCH 068/512] Refactor mapping options - improve method names - prepare for options that require different prepared statements depending on their value --- .../com/datastax/driver/mapping/Mapper.java | 275 ++++++++++++------ .../datastax/driver/mapping/QueryType.java | 22 +- 2 files changed, 199 insertions(+), 98 deletions(-) diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java index 699e8fbc2ff..1e997598a5d 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java @@ -16,6 +16,7 @@ package com.datastax.driver.mapping; import com.datastax.driver.core.*; +import com.datastax.driver.core.querybuilder.BuiltStatement; import com.datastax.driver.core.querybuilder.Delete; import com.datastax.driver.core.querybuilder.Insert; import com.datastax.driver.core.querybuilder.QueryBuilder; @@ -26,6 +27,7 @@ import com.google.common.base.Function; import com.google.common.base.Functions; import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableSet; import com.google.common.util.concurrent.*; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -238,9 +240,9 @@ public BoundStatement apply(PreparedStatement input) { if (mapper.writeConsistency != null) bs.setConsistencyLevel(mapper.writeConsistency); - for (Option opt : options.values()) { - opt.checkValidFor(QueryType.SAVE, manager); - opt.addToPreparedStatement(bs, i++); + for (Option option : options.values()) { + option.validate(QueryType.SAVE, manager); + i = option.apply(bs, i); } return bs; @@ -401,11 +403,9 @@ public BoundStatement apply(PreparedStatement input) { if (mapper.readConsistency != null) bs.setConsistencyLevel(mapper.readConsistency); - for (Option opt : options.values()) { - opt.checkValidFor(QueryType.GET, manager); - opt.addToPreparedStatement(bs, i); - if (opt.isIncludedInQuery()) - i++; + for (Option option : options.values()) { + option.validate(QueryType.GET, manager); + i = option.apply(bs, i); } return bs; } @@ -591,11 +591,9 @@ public BoundStatement apply(PreparedStatement input) { bs.setConsistencyLevel(mapper.writeConsistency); int i = 0; - for (Option opt : options.values()) { - opt.checkValidFor(QueryType.DEL, manager); - opt.addToPreparedStatement(bs, i); - if (opt.isIncludedInQuery()) - i++; + for (Option option : options.values()) { + option.validate(QueryType.DEL, manager); + i = option.apply(bs, i); } int columnNumber = 0; @@ -860,12 +858,6 @@ public static abstract class Option { enum Type {TTL, TIMESTAMP, CL, TRACING, SAVE_NULL_FIELDS} - final Type type; - - protected Option(Type type) { - this.type = type; - } - /** * Creates a new Option object to add time-to-live to a mapper operation. This is * only valid for save operations. @@ -932,19 +924,59 @@ public static Option saveNullFields(boolean enabled) { return new SaveNullFields(enabled); } + final Type type; + + protected Option(Type type) { + this.type = type; + } + + /** + * @deprecated This method is public for backward compatibility only. It should not be accessible since it leaks + * a package-private type. + */ + @Deprecated public Type getType() { - return this.type; + return type; } - abstract void appendTo(Insert.Options usings); + /** + * Checks that the option is allowed for a given query type, in a given manager. + * + * @throws IllegalArgumentException if the option is not valid + */ + abstract void validate(QueryType qt, MappingManager manager); - abstract void appendTo(Delete.Options usings); + /** + * Whether the option has any impact on the prepared query string. + */ + abstract boolean modifiesQueryString(); - abstract void addToPreparedStatement(BoundStatement bs, int i); + /** + * Appends the option to the prepared statement associated to the mapper operation + * (might be a no-op, not all options affect the query string). + */ + abstract void modifyQueryString(BuiltStatement query); - abstract void checkValidFor(QueryType qt, MappingManager manager) throws IllegalArgumentException; + /** + * Applies the option to the bound statement before the request gets executed (might be a + * no-op). + *

    + * If the option's value is set as a bound variable, then this must be done at the given + * index, and the method should return the new position. + *

    + * Options may also affect the statement itself, not a bound variable; in that case, the + * method must return the index unchanged. + */ + abstract int apply(BoundStatement bs, int currentIndex); - abstract boolean isIncludedInQuery(); + /** + * A key to represent the option in the prepared statement cache. + *

    + * If the same option with different values produces different query strings, this should + * be the option itself. + * Otherwise this should be the option type. + */ + abstract Object asCacheKey(); static class Ttl extends Option { @@ -956,29 +988,43 @@ static class Ttl extends Option { } @Override - void appendTo(Insert.Options usings) { - usings.and(QueryBuilder.ttl(QueryBuilder.bindMarker())); + void validate(QueryType qt, MappingManager manager) { + checkArgument(!manager.isCassandraV1, "TTL option requires native protocol v2 or above"); + checkArgument(qt == QueryType.SAVE, "TTL option is only allowed in save queries"); + } + + @Override + boolean modifiesQueryString() { + return true; } @Override - void appendTo(Delete.Options usings) { - throw new UnsupportedOperationException("shouldn't be called"); + void modifyQueryString(BuiltStatement query) { + ((Insert) query).using().and( + QueryBuilder.ttl(QueryBuilder.bindMarker())); } @Override - void addToPreparedStatement(BoundStatement bs, int i) { - bs.setInt(i, this.ttlValue); + int apply(BoundStatement bs, int currentIndex) { + bs.setInt(currentIndex, this.ttlValue); + return currentIndex + 1; } @Override - void checkValidFor(QueryType qt, MappingManager manager) { - checkArgument(!manager.isCassandraV1, "TTL option requires native protocol v2 or above"); - checkArgument(qt == QueryType.SAVE, "TTL option is only allowed in save queries"); + Object asCacheKey() { + // ttl is set as a bound variable "TTL(?)", so different values yield the same prepared query + return Type.TTL; } @Override - boolean isIncludedInQuery() { - return true; + public boolean equals(Object other) { + return other == this || + (other instanceof Ttl && this.ttlValue == ((Ttl) other).ttlValue); + } + + @Override + public int hashCode() { + return ttlValue; } } @@ -992,29 +1038,49 @@ static class Timestamp extends Option { } @Override - void appendTo(Insert.Options usings) { - usings.and(QueryBuilder.timestamp(QueryBuilder.bindMarker())); + void validate(QueryType qt, MappingManager manager) { + checkArgument(!manager.isCassandraV1, "Timestamp option requires native protocol v2 or above"); + checkArgument(qt == QueryType.SAVE || qt == QueryType.DEL, "Timestamp option is only allowed in save and delete queries"); + } + + @Override + boolean modifiesQueryString() { + return true; } @Override - void appendTo(Delete.Options usings) { - usings.and(QueryBuilder.timestamp(QueryBuilder.bindMarker())); + void modifyQueryString(BuiltStatement query) { + if (query instanceof Insert) { + ((Insert) query).using().and(QueryBuilder.timestamp(QueryBuilder.bindMarker())); + } else if (query instanceof Delete) { + ((Delete) query).using().and(QueryBuilder.timestamp(QueryBuilder.bindMarker())); + } else { + throw new AssertionError("Unexpected query type: " + query.getClass()); + } } @Override - void checkValidFor(QueryType qt, MappingManager manager) { - checkArgument(!manager.isCassandraV1, "Timestamp option requires native protocol v2 or above"); - checkArgument(qt == QueryType.SAVE || qt == QueryType.DEL, "Timestamp option is only allowed in save and delete queries"); + int apply(BoundStatement bs, int currentIndex) { + bs.setLong(currentIndex, this.tsValue); + return currentIndex + 1; } @Override - void addToPreparedStatement(BoundStatement bs, int i) { - bs.setLong(i, this.tsValue); + Object asCacheKey() { + // timestamp is set as a bound variable "USING TIMESTAMP ?", so different values + // yield the same prepared query + return Type.TIMESTAMP; } @Override - boolean isIncludedInQuery() { - return true; + public boolean equals(Object other) { + return other == this || + (other instanceof Timestamp && this.tsValue == ((Timestamp) other).tsValue); + } + + @Override + public int hashCode() { + return (int) (tsValue ^ (tsValue >>> 32)); } } @@ -1028,29 +1094,40 @@ static class ConsistencyLevelOption extends Option { } @Override - void appendTo(Insert.Options usings) { - throw new UnsupportedOperationException("shouldn't be called"); + void validate(QueryType qt, MappingManager manager) { + } + + @Override + boolean modifiesQueryString() { + return false; } @Override - void appendTo(Delete.Options usings) { - throw new UnsupportedOperationException("shouldn't be called"); + void modifyQueryString(BuiltStatement query) { + // nothing to do, CL is set on the bound statement } @Override - void addToPreparedStatement(BoundStatement bs, int i) { + int apply(BoundStatement bs, int currentIndex) { bs.setConsistencyLevel(cl); + return currentIndex; } @Override - void checkValidFor(QueryType qt, MappingManager manager) { - checkArgument(qt == QueryType.SAVE || qt == QueryType.DEL || qt == QueryType.GET, - "Consistency level option is only allowed in save, delete and get queries"); + Object asCacheKey() { + // does not modify the query string + return Type.CL; } @Override - boolean isIncludedInQuery() { - return false; + public boolean equals(Object other) { + return other == this || + (other instanceof ConsistencyLevelOption && this.cl == ((ConsistencyLevelOption) other).cl); + } + + @Override + public int hashCode() { + return cl.hashCode(); } } @@ -1064,30 +1141,42 @@ static class Tracing extends Option { } @Override - void appendTo(Insert.Options usings) { - throw new UnsupportedOperationException("shouldn't be called"); + void validate(QueryType qt, MappingManager manager) { } @Override - void appendTo(Delete.Options usings) { - throw new UnsupportedOperationException("shouldn't be called"); + boolean modifiesQueryString() { + return false; } @Override - void addToPreparedStatement(BoundStatement bs, int i) { - if (this.tracing) + void modifyQueryString(BuiltStatement query) { + // nothing to do, tracing is enabled on the prepared statement + } + + @Override + int apply(BoundStatement bs, int currentIndex) { + if (this.tracing) { bs.enableTracing(); + } + return currentIndex; } @Override - void checkValidFor(QueryType qt, MappingManager manager) { - checkArgument(qt == QueryType.SAVE || qt == QueryType.DEL || qt == QueryType.GET, - "Tracing option is only allowed in save, delete and get queries"); + Object asCacheKey() { + // does not modify the query string + return Type.TRACING; } @Override - boolean isIncludedInQuery() { - return false; + public boolean equals(Object other) { + return other == this || + (other instanceof Tracing && this.tracing == ((Tracing) other).tracing); + } + + @Override + public int hashCode() { + return tracing ? 1231 : 1237; } } @@ -1101,28 +1190,40 @@ static class SaveNullFields extends Option { } @Override - void appendTo(Insert.Options usings) { - throw new UnsupportedOperationException("shouldn't be called"); + void validate(QueryType qt, MappingManager manager) { + checkArgument(qt == QueryType.SAVE, "SaveNullFields option is only allowed in save queries"); } @Override - void appendTo(Delete.Options usings) { - throw new UnsupportedOperationException("shouldn't be called"); + boolean modifiesQueryString() { + return false; } @Override - void addToPreparedStatement(BoundStatement bs, int i) { + void modifyQueryString(BuiltStatement query) { // nothing to do } @Override - void checkValidFor(QueryType qt, MappingManager manager) { - checkArgument(qt == QueryType.SAVE, "SaveNullFields option is only allowed in save queries"); + int apply(BoundStatement bs, int currentIndex) { + return currentIndex; } @Override - boolean isIncludedInQuery() { - return false; + Object asCacheKey() { + // does not modify the query string + return Type.SAVE_NULL_FIELDS; + } + + @Override + public boolean equals(Object other) { + return other == this || + (other instanceof SaveNullFields && this.saveNullFields == ((SaveNullFields) other).saveNullFields); + } + + @Override + public int hashCode() { + return saveNullFields ? 1231 : 1237; } } @@ -1130,20 +1231,22 @@ boolean isIncludedInQuery() { private static class MapperQueryKey { private final QueryType queryType; - private final EnumSet optionTypes; + private final Set optionKeys; private final Set columns; - MapperQueryKey(QueryType queryType, Set propertyMappers, EnumMap options) { + MapperQueryKey(QueryType queryType, Set propertyMappers, EnumMap allOptions) { Preconditions.checkNotNull(queryType); - Preconditions.checkNotNull(options); + Preconditions.checkNotNull(allOptions); Preconditions.checkNotNull(propertyMappers); this.queryType = queryType; this.columns = propertyMappers; - this.optionTypes = EnumSet.noneOf(Option.Type.class); - for (Option opt : options.values()) { - if (opt.isIncludedInQuery()) - this.optionTypes.add(opt.type); + ImmutableSet.Builder optionKeysBuilder = ImmutableSet.builder(); + for (Option option : allOptions.values()) { + if (option.modifiesQueryString()) { + optionKeysBuilder.add(option.asCacheKey()); + } } + this.optionKeys = optionKeysBuilder.build(); } @Override @@ -1153,7 +1256,7 @@ public boolean equals(Object other) { if (other instanceof MapperQueryKey) { MapperQueryKey that = (MapperQueryKey) other; return this.queryType.equals(that.queryType) - && this.optionTypes.equals(that.optionTypes) + && this.optionKeys.equals(that.optionKeys) && this.columns.equals(that.columns); } return false; @@ -1161,7 +1264,7 @@ public boolean equals(Object other) { @Override public int hashCode() { - return MoreObjects.hashCode(queryType, optionTypes, columns); + return MoreObjects.hashCode(queryType, optionKeys, columns); } } } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java index 0d99df588bd..705bcb2dadf 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java @@ -37,11 +37,9 @@ String makePreparedQueryString(TableMetadata table, EntityMapper mapper, Mapp if (!col.isComputed()) insert.value(col.columnName, bindMarker()); - Insert.Options usings = insert.using(); for (Mapper.Option opt : options) { - opt.checkValidFor(QueryType.SAVE, manager); - if (opt.isIncludedInQuery()) - opt.appendTo(usings); + opt.validate(QueryType.SAVE, manager); + opt.modifyQueryString(insert); } return insert.toString(); } @@ -73,8 +71,10 @@ String makePreparedQueryString(TableMetadata table, EntityMapper mapper, Mapp for (int i = 0; i < mapper.primaryKeySize(); i++) where.and(eq(mapper.getPrimaryKeyColumn(i).columnName, bindMarker())); - for (Mapper.Option opt : options) - opt.checkValidFor(QueryType.GET, manager); + for (Mapper.Option option : options) { + option.validate(QueryType.GET, manager); + option.modifyQueryString(select); + } return select.toString(); } }, @@ -88,12 +88,10 @@ String makePreparedQueryString(TableMetadata table, EntityMapper mapper, Mapp Delete.Where where = delete.where(); for (int i = 0; i < mapper.primaryKeySize(); i++) where.and(eq(mapper.getPrimaryKeyColumn(i).columnName, bindMarker())); - Delete.Options usings = delete.using(); - for (Mapper.Option opt : options) { - opt.checkValidFor(QueryType.DEL, manager); - if (opt.isIncludedInQuery()) - opt.appendTo(usings); - } + for (Mapper.Option option : options) { + option.validate(QueryType.DEL, manager); + option.modifyQueryString(delete); + } return delete.toString(); } }; From 9270061d3c0b4770586ce555dae3aee95f6fe65d Mon Sep 17 00:00:00 2001 From: Mehmet Gurevin Date: Mon, 21 Mar 2016 15:39:55 +0200 Subject: [PATCH 069/512] JAVA-1174: Add ifNotExists option to mapper --- changelog/README.md | 1 + .../com/datastax/driver/mapping/Mapper.java | 62 ++++++++++++++++++- .../driver/mapping/MapperOptionTest.java | 47 ++++++++++++++ manual/object_mapper/using/README.md | 4 ++ 4 files changed, 113 insertions(+), 1 deletion(-) diff --git a/changelog/README.md b/changelog/README.md index 94435f1e1a5..1ac3457c34d 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -17,6 +17,7 @@ - [improvement] JAVA-1286: Support setting and retrieving udt fields in QueryBuilder. - [bug] JAVA-1415: Correctly report if a UDT column is frozen. - [bug] JAVA-1418: Make Guava version detection more reliable. +- [new feature] JAVA-1174: Add ifNotExists option to mapper. Merged from 3.1.x branch: diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java index 1e997598a5d..17273f9e927 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java @@ -856,7 +856,7 @@ private static EnumMap toMapWithDefaults(Option[] options, */ public static abstract class Option { - enum Type {TTL, TIMESTAMP, CL, TRACING, SAVE_NULL_FIELDS} + enum Type {TTL, TIMESTAMP, CL, TRACING, SAVE_NULL_FIELDS, IF_NOT_EXISTS} /** * Creates a new Option object to add time-to-live to a mapper operation. This is @@ -924,6 +924,19 @@ public static Option saveNullFields(boolean enabled) { return new SaveNullFields(enabled); } + /** + * Creates a new Option object to specify whether an IF NOT EXISTS clause should be included in + * insert queries. This option is valid only for save operations. + *

    + * If this option is not specified, it defaults to {@code false} (IF NOT EXISTS statements are not used). + * + * @param enabled whether to include an IF NOT EXISTS clause in queries. + * @return the option. + */ + public static Option ifNotExists(boolean enabled) { + return new IfNotExists(enabled); + } + final Type type; protected Option(Type type) { @@ -1227,6 +1240,53 @@ public int hashCode() { } } + static class IfNotExists extends Option { + boolean ifNotExists; + + IfNotExists(boolean ifNotExists) { + super(Type.IF_NOT_EXISTS); + this.ifNotExists = ifNotExists; + } + + @Override + void validate(QueryType qt, MappingManager manager) { + checkArgument(qt == QueryType.SAVE, "IfNotExists option is only allowed in save queries"); + } + + @Override + boolean modifiesQueryString() { + return true; + } + + @Override + void modifyQueryString(BuiltStatement query) { + if (ifNotExists) { + ((Insert) query).ifNotExists(); + } + } + + @Override + int apply(BoundStatement bs, int currentIndex) { + return currentIndex; + } + + @Override + Object asCacheKey() { + // Different values do change the query string ("IF NOT EXIST" clause present or not) + return this; + } + + @Override + public boolean equals(Object other) { + return other == this || + (other instanceof IfNotExists && this.ifNotExists == ((IfNotExists) other).ifNotExists); + } + + @Override + public int hashCode() { + return (ifNotExists) ? 1231 : 1237; + } + } } private static class MapperQueryKey { diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperOptionTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperOptionTest.java index 80fb06ac6dc..8e17733ae8e 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperOptionTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperOptionTest.java @@ -26,6 +26,7 @@ import org.testng.annotations.Test; import java.util.concurrent.ExecutionException; +import java.util.regex.Pattern; import static com.datastax.driver.core.ConsistencyLevel.*; import static com.datastax.driver.core.ProtocolVersion.V1; @@ -153,6 +154,52 @@ void should_prioritize_option_over_model_consistency() { Statement readProvidedCL = mapper.getQuery(1859, Option.consistencyLevel(LOCAL_QUORUM)); assertThat(readProvidedCL.getConsistencyLevel()).isEqualTo(LOCAL_QUORUM); } + + + @Test(groups = "short") + @CassandraVersion("2.0.0") + void should_use_if_not_exists_option() { + Pattern ifNotExistsPattern = Pattern.compile(".*\\sIF\\s+NOT\\s+EXISTS(\\s+)?;?(\\s+)?$", Pattern.CASE_INSENSITIVE); + + User user = new User(42, "Cin Ali"); + + // test default + BoundStatement saveDefault = (BoundStatement) mapper.saveQuery(user); + DefaultPreparedStatement stmt = (DefaultPreparedStatement) saveDefault.preparedStatement(); + assertThat(stmt.getQueryString()).doesNotMatch(ifNotExistsPattern); + + // test disabled + saveDefault = (BoundStatement) mapper.saveQuery(user, Option.ifNotExists(false)); + stmt = (DefaultPreparedStatement) saveDefault.preparedStatement(); + assertThat(stmt.getQueryString()).doesNotMatch(ifNotExistsPattern); + + // test enabled + saveDefault = (BoundStatement) mapper.saveQuery(user, Option.ifNotExists(true)); + stmt = (DefaultPreparedStatement) saveDefault.preparedStatement(); + assertThat(stmt.getQueryString()).matches(ifNotExistsPattern); + + // test default enabled + mapper.setDefaultSaveOptions(Option.ifNotExists(true)); + saveDefault = (BoundStatement) mapper.saveQuery(user); + stmt = (DefaultPreparedStatement) saveDefault.preparedStatement(); + assertThat(stmt.getQueryString()).matches(ifNotExistsPattern); + + // test default disabled + mapper.setDefaultSaveOptions(Option.ifNotExists(false)); + saveDefault = (BoundStatement) mapper.saveQuery(user); + stmt = (DefaultPreparedStatement) saveDefault.preparedStatement(); + assertThat(stmt.getQueryString()).doesNotMatch(ifNotExistsPattern); + } + + @Test(groups = "short", expectedExceptions = {IllegalArgumentException.class}) + void should_fail_when_using_if_not_exists_on_get_query() { + mapper.get(new User(42, "Cin Ali"), Option.ifNotExists(true)); + } + + @Test(groups = "short", expectedExceptions = {IllegalArgumentException.class}) + void should_fail_when_using_if_not_exists_on_delete_query() { + mapper.delete(new User(42, "Cin Ali"), Option.ifNotExists(true)); + } @Test(groups = "short") @CassandraVersion("2.0.0") diff --git a/manual/object_mapper/using/README.md b/manual/object_mapper/using/README.md index 91912371dbd..4e95e503a9c 100644 --- a/manual/object_mapper/using/README.md +++ b/manual/object_mapper/using/README.md @@ -90,6 +90,9 @@ underlying query: in the query. If set to false, fields with null value won't be included in the write query (thus avoiding tombstones). If not specified, the default behavior is to persist `null` fields. +- `ifNotExists`: if set to true, adds an `IF NOT EXISTS` clause to the + save operation (use `ifNotExists(false)` if you enabled the option by + default and need to disable it for a specific operation). To use options, add them to the mapper call after regular parameters: @@ -109,6 +112,7 @@ Some options don't apply to all operations: ConsistencyLevel yes yes yes Tracing yes yes yes SaveNullFields yes no no + IfNotExists yes no no Note that `Option.consistencyLevel` is redundant with the consistency From 106e7348a4878c62bbabf959a400eec79033be3f Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Mon, 13 Mar 2017 23:15:05 +0100 Subject: [PATCH 070/512] JAVA-1414: Optimize Metadata.escapeId and Metadata.handleId (#823) --- changelog/README.md | 1 + .../com/datastax/driver/core/Metadata.java | 53 +++++++++++++++---- .../datastax/driver/core/MetadataTest.java | 18 +++++++ 3 files changed, 62 insertions(+), 10 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 1ac3457c34d..3e8880b9247 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -18,6 +18,7 @@ - [bug] JAVA-1415: Correctly report if a UDT column is frozen. - [bug] JAVA-1418: Make Guava version detection more reliable. - [new feature] JAVA-1174: Add ifNotExists option to mapper. +- [improvement] JAVA-1414: Optimize Metadata.escapeId and Metadata.handleId. Merged from 3.1.x branch: diff --git a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java index 33529117af1..b6cbdfcc2cf 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java @@ -27,7 +27,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; import java.util.concurrent.locks.ReentrantLock; -import java.util.regex.Pattern; /** * Keeps metadata on the connected cluster, including known nodes and schema definitions. @@ -45,9 +44,6 @@ public class Metadata { final ReentrantLock lock = new ReentrantLock(); - private static final Pattern alphanumeric = Pattern.compile("\\w+"); // this includes _ - private static final Pattern lowercaseAlphanumeric = Pattern.compile("[a-z][a-z0-9_]*"); - // See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#appendixA private static final Set RESERVED_KEYWORDS = ImmutableSet.of( "add", "allow", "alter", "and", "any", "apply", "asc", "authorize", "batch", "begin", "by", @@ -131,22 +127,59 @@ static String handleId(String id) { if (id == null) return null; - if (alphanumeric.matcher(id).matches()) + if (isAlphanumeric(id)) return id.toLowerCase(); // Check if it's enclosed in quotes. If it is, remove them and unescape internal double quotes return ParseUtils.unDoubleQuote(id); } + private static boolean isAlphanumeric(String s) { + for (int i = 0; i < s.length(); i++) { + char c = s.charAt(i); + if (!( + (c >= 48 && c <= 57) // 0-9 + || (c >= 65 && c <= 90) // A-Z + || (c == 95) // _ (underscore) + || (c >= 97 && c <= 122) // a-z + )) + return false; + } + return true; + } + // Escape a CQL3 identifier based on its value as read from the schema // tables. Because it comes from Cassandra, we could just always quote it, // but to get a nicer output we don't do it if it's not necessary. static String escapeId(String ident) { - // we don't need to escape if it's lowercase and match non-quoted CQL3 ids, - // and if it's not a CQL reserved keyword - return lowercaseAlphanumeric.matcher(ident).matches() - && !isReservedCqlKeyword(ident) ? - ident : quote(ident); + return needsQuote(ident) + ? quote(ident) + : ident; + } + + /** + * We don't need to escape an identifier if it + * matches non-quoted CQL3 ids ([a-z][a-z0-9_]*), + * and if it's not a CQL reserved keyword. + */ + private static boolean needsQuote(String s) { + // this method should only be called for C*-provided identifiers, + // so we expect it to be non-null and non-empty. + assert s != null && !s.isEmpty(); + char c = s.charAt(0); + if (!(c >= 97 && c <= 122)) // a-z + return true; + for (int i = 1; i < s.length(); i++) { + c = s.charAt(i); + if (!( + (c >= 48 && c <= 57) // 0-9 + || (c == 95) // _ + || (c >= 97 && c <= 122) // a-z + )) { + return true; + } + } + return isReservedCqlKeyword(s); } /** diff --git a/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java index 1eb796cc3cb..8b793fc601c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java @@ -143,4 +143,22 @@ public void handleId_should_unescape_duplicate_double_quotes_in_quoted_identifie public void handleId_should_preserve_unquoted_non_alphanumeric_identifiers() { assertThat(Metadata.handleId("Foo Bar")).isEqualTo("Foo Bar"); } + + @Test(groups = "unit") + public void escapeId_should_not_quote_lowercase_identifiers() { + String id = "this_does_not_need_quoting_0123456789abcdefghijklmnopqrstuvwxyz"; + assertThat(Metadata.escapeId(id)).isEqualTo(id); + } + + @Test(groups = "unit") + public void escapeId_should_quote_non_lowercase_identifiers() { + assertThat(Metadata.escapeId("This_Needs_Quoting_1234")).isEqualTo("\"This_Needs_Quoting_1234\""); + assertThat(Metadata.escapeId("This Needs Quoting 1234!!")).isEqualTo("\"This Needs Quoting 1234!!\""); + } + + @Test(groups = "unit") + public void escapeId_should_quote_reserved_cql_keywords() { + assertThat(Metadata.escapeId("columnfamily")).isEqualTo("\"columnfamily\""); + } + } From f5db4e09254286a97a090705a7a8089ad2a72c30 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 10 Mar 2017 16:07:07 -0600 Subject: [PATCH 071/512] JAVA-1415: UserType.toString should only include 'frozen<>' when frozen --- .../main/java/com/datastax/driver/core/UserType.java | 5 ++++- .../java/com/datastax/driver/core/UserTypesTest.java | 10 ++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/driver-core/src/main/java/com/datastax/driver/core/UserType.java b/driver-core/src/main/java/com/datastax/driver/core/UserType.java index 405121da3e4..feb7026eb00 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/UserType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/UserType.java @@ -291,7 +291,10 @@ private String asCQLQuery(boolean formatted) { @Override public String toString() { - return "frozen<" + Metadata.escapeId(getKeyspace()) + '.' + Metadata.escapeId(getTypeName()) + ">"; + String str = Metadata.escapeId(getKeyspace()) + "." + Metadata.escapeId(getTypeName()); + return isFrozen() ? + "frozen<" + str + ">" : + str; } @Override diff --git a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java index 8012071393e..780e2bd9036 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java @@ -480,8 +480,9 @@ public void should_indicate_user_type_is_frozen() { assertThat(keyspaceMetadata.getUserType("type_for_frozen_test")) .isNotFrozen(); - assertThat(keyspaceMetadata.getTable("frozen_table").getColumn("v").getType()) - .isFrozen(); + DataType userType = keyspaceMetadata.getTable("frozen_table").getColumn("v").getType(); + assertThat(userType).isFrozen(); + assertThat(userType.toString()).isEqualTo("frozen<" + keyspace + ".type_for_frozen_test>"); // The frozen flag is not set for result set definitions (the protocol does not provide // that information and it's not really useful in that situation). We always return false. @@ -505,8 +506,9 @@ public void should_indicate_user_type_is_not_frozen() { assertThat(keyspaceMetadata.getUserType("type_for_frozen_test")) .isNotFrozen(); - assertThat(keyspaceMetadata.getTable("not_frozen_table").getColumn("v").getType()) - .isNotFrozen(); + DataType userType = keyspaceMetadata.getTable("not_frozen_table").getColumn("v").getType(); + assertThat(userType).isNotFrozen(); + assertThat(userType.toString()).isEqualTo(keyspace + ".type_for_frozen_test"); ResultSet rs = session().execute("SELECT v FROM not_frozen_table WHERE k = 1"); assertThat(rs.getColumnDefinitions().getType(0)) From 8c4236599e7e645c3cb0e8f373c1ce1a50c5bb3e Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Thu, 23 Mar 2017 12:33:30 +0100 Subject: [PATCH 072/512] Add support for pausing and resuming CCM nodes --- .../java/com/datastax/driver/core/CCMAccess.java | 14 ++++++++++++++ .../java/com/datastax/driver/core/CCMBridge.java | 14 ++++++++++++++ .../java/com/datastax/driver/core/CCMCache.java | 10 ++++++++++ .../com/datastax/driver/core/CCMTestsSupport.java | 10 ++++++++++ 4 files changed, 48 insertions(+) diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java b/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java index 6aa01f196c8..4d3b52338f6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java @@ -168,6 +168,20 @@ enum Workload {cassandra, solr, hadoop, spark, cfs, graph} */ void forceStop(int n); + /** + * Pauses the {@code nth} host in the CCM cluster. + * + * @param n the node number (starting from 1). + */ + void pause(int n); + + /** + * Resumes the {@code nth} host in the CCM cluster. + * + * @param n the node number (starting from 1). + */ + void resume(int n); + /** * Removes the {@code nth} host in the CCM cluster. * diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java index 8b800ac85f0..343b294d7eb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java @@ -521,6 +521,18 @@ public void forceStop(int n) { execute(CCM_COMMAND + " node%d stop --not-gently", n); } + @Override + public void pause(int n) { + logger.debug(String.format("Pausing: node %s (%s%s:%s) in %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + execute(CCM_COMMAND + " node%d pause", n); + } + + @Override + public void resume(int n) { + logger.debug(String.format("Resuming: node %s (%s%s:%s) in %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + execute(CCM_COMMAND + " node%d resume", n); + } + @Override public void remove(int n) { logger.debug(String.format("Removing: node %s (%s%s:%s) from %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); @@ -679,6 +691,7 @@ protected void processLine(String line, int logLevel) { /** * Waits for a host to be up by pinging the TCP socket directly, without using the Java driver's API. */ + @Override public void waitForUp(int node) { TestUtils.waitUntilPortIsUp(addressOfNode(node)); } @@ -686,6 +699,7 @@ public void waitForUp(int node) { /** * Waits for a host to be down by pinging the TCP socket directly, without using the Java driver's API. */ + @Override public void waitForDown(int node) { TestUtils.waitUntilPortIsDown(addressOfNode(node)); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java b/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java index 4a1c6317d62..043190478fb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java @@ -165,6 +165,16 @@ public void forceStop(int n) { ccm.forceStop(n); } + @Override + public void pause(int n) { + ccm.pause(n); + } + + @Override + public void resume(int n) { + ccm.resume(n); + } + @Override public void remove(int n) { ccm.remove(n); diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java index f8d18c00c0f..853d844d493 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java @@ -177,6 +177,16 @@ public void forceStop(int n) { throw new UnsupportedOperationException("This CCM cluster is read-only"); } + @Override + public void pause(int n) { + throw new UnsupportedOperationException("This CCM cluster is read-only"); + } + + @Override + public void resume(int n) { + throw new UnsupportedOperationException("This CCM cluster is read-only"); + } + @Override public void remove(int n) { throw new UnsupportedOperationException("This CCM cluster is read-only"); From 2f682c35f022cae5c60ec53866353ebb9fc96b56 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Thu, 23 Mar 2017 12:36:56 +0100 Subject: [PATCH 073/512] JAVA-1429: Prevent heartbeats until connection is fully initialized --- changelog/README.md | 1 + .../com/datastax/driver/core/Connection.java | 2 +- .../driver/core/AuthenticationTest.java | 46 +++++++++++++++++++ 3 files changed, 48 insertions(+), 1 deletion(-) diff --git a/changelog/README.md b/changelog/README.md index dbec61d9fd6..b8266ac5089 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -3,6 +3,7 @@ ### 3.0.8 (in progress) - [bug] JAVA-1404: Fix min token handling in TokenRange.contains. +- [bug] JAVA-1429: Prevent heartbeats until connection is fully initialized. ### 3.0.7 diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index 9edb0113c3d..39d15e3e8a0 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -1077,7 +1077,7 @@ protected void channelRead0(ChannelHandlerContext ctx, Message.Response response @Override public void userEventTriggered(ChannelHandlerContext ctx, Object evt) throws Exception { - if (!isClosed() && evt instanceof IdleStateEvent && ((IdleStateEvent) evt).state() == READER_IDLE) { + if (isInitialized && !isClosed() && evt instanceof IdleStateEvent && ((IdleStateEvent) evt).state() == READER_IDLE) { logger.debug("{} was inactive for {} seconds, sending heartbeat", Connection.this, factory.configuration.getPoolingOptions().getHeartbeatIntervalSeconds()); write(HEARTBEAT_CALLBACK); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java b/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java index 41a1e4e1a97..c96cc6914f0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java @@ -20,6 +20,9 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; +import java.net.InetSocketAddress; +import java.util.Timer; +import java.util.TimerTask; import java.util.concurrent.TimeUnit; import static com.datastax.driver.core.CreateCCM.TestMode.PER_METHOD; @@ -86,4 +89,47 @@ public void should_fail_to_connect_without_credentials() throws InterruptedExcep } } + /** + * Ensures that authentication is possible even if the server is busy during + * SASL handshake. + * + * @jira_ticket JAVA-1429 + */ + @Test(groups = "short") + @CCMConfig(dirtiesContext = true) + public void should_connect_with_slow_server() throws InterruptedException { + Cluster cluster = Cluster.builder() + .addContactPoints(getContactPoints()) + .withPort(ccm().getBinaryPort()) + .withAuthProvider(new SlowAuthProvider()) + .withPoolingOptions(new PoolingOptions() + .setHeartbeatIntervalSeconds(1)) + .build(); + cluster.connect(); + } + + private class SlowAuthProvider extends PlainTextAuthProvider { + + public SlowAuthProvider() { + super("cassandra", "cassandra"); + } + + @Override + public Authenticator newAuthenticator(InetSocketAddress host, String authenticator) throws AuthenticationException { + simulateBusyServer(); + return super.newAuthenticator(host, authenticator); + } + + } + + private void simulateBusyServer() { + ccm().pause(1); + new Timer().schedule(new TimerTask() { + @Override + public void run() { + ccm().resume(1); + } + }, 2000); + } + } From 86454998a28bbf89d7c953759260407d271337b4 Mon Sep 17 00:00:00 2001 From: Olivier Michallat Date: Thu, 23 Mar 2017 09:11:28 -0700 Subject: [PATCH 074/512] JAVA-1310/JAVA-1316: Allow more customization of mapper behavior (#814) JAVA-1310: Make mapper's ignored properties configurable. JAVA-1316: Add strategy for resolving properties into CQL names. This is a squashed commit, including significant contributions from @adutra and @tolbertam. --- changelog/README.md | 2 + .../driver/core/AggregateMetadata.java | 8 +- .../datastax/driver/core/ColumnMetadata.java | 2 +- .../driver/core/FunctionMetadata.java | 8 +- .../datastax/driver/core/IndexMetadata.java | 8 +- .../driver/core/KeyspaceMetadata.java | 2 +- .../driver/core/MaterializedViewMetadata.java | 14 +- .../com/datastax/driver/core/Metadata.java | 34 +- .../datastax/driver/core/TableMetadata.java | 8 +- .../com/datastax/driver/core/TypeCodec.java | 8 +- .../com/datastax/driver/core/UserType.java | 8 +- .../core/querybuilder/BuiltStatement.java | 8 +- .../driver/core/querybuilder/Delete.java | 5 +- .../driver/core/querybuilder/Insert.java | 5 +- .../driver/core/querybuilder/Select.java | 9 +- .../driver/core/querybuilder/Truncate.java | 5 +- .../driver/core/querybuilder/Update.java | 5 +- .../datastax/driver/core/MetadataTest.java | 8 +- .../driver/mapping/AliasedMappedProperty.java | 27 + .../driver/mapping/AnnotationChecks.java | 45 +- .../driver/mapping/AnnotationParser.java | 97 +-- .../mapping/DefaultHierarchyScanStrategy.java | 72 +++ .../driver/mapping/DefaultMappedProperty.java | 184 ++++++ .../driver/mapping/DefaultNamingStrategy.java | 72 +++ .../driver/mapping/DefaultPropertyMapper.java | 542 +++++++++++++++++ .../datastax/driver/mapping/EntityMapper.java | 10 +- .../driver/mapping/HierarchyScanStrategy.java | 42 ++ ...appedClassesOnlyHierarchyScanStrategy.java | 35 ++ .../driver/mapping/MappedProperty.java | 158 +++++ .../driver/mapping/MappedUDTCodec.java | 56 +- .../com/datastax/driver/mapping/Mapper.java | 45 +- .../driver/mapping/MappingConfiguration.java | 76 +++ .../driver/mapping/MappingManager.java | 66 ++- .../driver/mapping/NamingConvention.java | 81 +++ .../driver/mapping/NamingConventions.java | 328 +++++++++++ .../driver/mapping/NamingStrategy.java | 47 ++ .../mapping/PropertyAccessStrategy.java | 61 ++ .../driver/mapping/PropertyMapper.java | 194 +----- .../mapping/PropertyTransienceStrategy.java | 56 ++ .../datastax/driver/mapping/QueryType.java | 26 +- .../driver/mapping/ReflectionUtils.java | 161 +---- .../com/datastax/driver/mapping/Result.java | 21 +- .../com/datastax/driver/mapping/Word.java | 49 ++ .../driver/mapping/annotations/Column.java | 14 +- .../driver/mapping/MapperGroovyTest.groovy | 10 +- .../mapping/MapperCaseSensitivityTest.java | 9 +- .../mapping/MapperInvalidAnnotationsTest.java | 3 + ...onfigurationHierarchyScanStrategyTest.java | 130 +++++ ...appingConfigurationNamingStrategyTest.java | 428 ++++++++++++++ ...appingConfigurationPropertyAccessTest.java | 139 +++++ ...ngConfigurationTransienceStrategyTest.java | 122 ++++ .../MappingConfigurationTransientTest.java | 112 ++++ .../driver/mapping/NamingConventionsTest.java | 550 ++++++++++++++++++ manual/object_mapper/using/README.md | 46 ++ upgrade_guide/README.md | 6 + 55 files changed, 3679 insertions(+), 588 deletions(-) create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultHierarchyScanStrategy.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultMappedProperty.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultNamingStrategy.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultPropertyMapper.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/HierarchyScanStrategy.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/MappedClassesOnlyHierarchyScanStrategy.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/MappedProperty.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/MappingConfiguration.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConvention.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConventions.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/NamingStrategy.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyAccessStrategy.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyTransienceStrategy.java create mode 100644 driver-mapping/src/main/java/com/datastax/driver/mapping/Word.java create mode 100644 driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationHierarchyScanStrategyTest.java create mode 100644 driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationNamingStrategyTest.java create mode 100644 driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationPropertyAccessTest.java create mode 100644 driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransienceStrategyTest.java create mode 100644 driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransientTest.java create mode 100644 driver-mapping/src/test/java/com/datastax/driver/mapping/NamingConventionsTest.java diff --git a/changelog/README.md b/changelog/README.md index 3e8880b9247..23a9529a030 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -19,6 +19,8 @@ - [bug] JAVA-1418: Make Guava version detection more reliable. - [new feature] JAVA-1174: Add ifNotExists option to mapper. - [improvement] JAVA-1414: Optimize Metadata.escapeId and Metadata.handleId. +- [improvement] JAVA-1310: Make mapper's ignored properties configurable. +- [improvement] JAVA-1316: Add strategy for resolving properties into CQL names. Merged from 3.1.x branch: diff --git a/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java index 635d2538bc0..39699e6456d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java @@ -195,21 +195,21 @@ public String toString() { private String asCQLQuery(boolean formatted) { StringBuilder sb = new StringBuilder("CREATE AGGREGATE ") - .append(Metadata.escapeId(keyspace.getName())) + .append(Metadata.quoteIfNecessary(keyspace.getName())) .append('.'); appendSignature(sb); TableMetadata.spaceOrNewLine(sb, formatted) .append("SFUNC ") - .append(Metadata.escapeId(stateFuncSimpleName)) + .append(Metadata.quoteIfNecessary(stateFuncSimpleName)) .append(" STYPE ") .append(stateType.asFunctionParameterString()); if (finalFuncSimpleName != null) TableMetadata.spaceOrNewLine(sb, formatted) .append("FINALFUNC ") - .append(Metadata.escapeId(finalFuncSimpleName)); + .append(Metadata.quoteIfNecessary(finalFuncSimpleName)); if (initCond != null) TableMetadata.spaceOrNewLine(sb, formatted) @@ -234,7 +234,7 @@ private String formatInitCond() { private void appendSignature(StringBuilder sb) { sb - .append(Metadata.escapeId(simpleName)) + .append(Metadata.quoteIfNecessary(simpleName)) .append('('); boolean first = true; for (DataType type : argumentTypes) { diff --git a/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java index c4eb68e1b0d..851f7fad13a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java @@ -121,7 +121,7 @@ public int hashCode() { @Override public String toString() { - String str = Metadata.escapeId(name) + ' ' + type; + String str = Metadata.quoteIfNecessary(name) + ' ' + type; return isStatic ? str + " static" : str; } diff --git a/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java index 523dfeb9718..397932a2dc2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java @@ -163,9 +163,9 @@ private String asCQLQuery(boolean formatted) { StringBuilder sb = new StringBuilder("CREATE FUNCTION "); sb - .append(Metadata.escapeId(keyspace.getName())) + .append(Metadata.quoteIfNecessary(keyspace.getName())) .append('.') - .append(Metadata.escapeId(simpleName)) + .append(Metadata.quoteIfNecessary(simpleName)) .append('('); boolean first = true; @@ -179,7 +179,7 @@ private String asCQLQuery(boolean formatted) { DataType type = entry.getValue(); sb .append(TableMetadata.spaces(4, formatted)) - .append(Metadata.escapeId(name)) + .append(Metadata.quoteIfNecessary(name)) .append(' ') .append(type.asFunctionParameterString()); } @@ -226,7 +226,7 @@ public KeyspaceMetadata getKeyspace() { public String getSignature() { StringBuilder sb = new StringBuilder(); sb - .append(Metadata.escapeId(simpleName)) + .append(Metadata.quoteIfNecessary(simpleName)) .append('('); boolean first = true; for (DataType type : arguments.values()) { diff --git a/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java index bf346b530b5..f77e70f89a7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java @@ -113,7 +113,7 @@ static IndexMetadata fromLegacy(ColumnMetadata column, ColumnMetadata.Raw raw) { } private static String targetFromLegacyOptions(ColumnMetadata column, Map options) { - String columnName = Metadata.escapeId(column.getName()); + String columnName = Metadata.quoteIfNecessary(column.getName()); if (options.containsKey(INDEX_KEYS_OPTION_NAME)) return String.format("keys(%s)", columnName); if (options.containsKey(INDEX_ENTRIES_OPTION_NAME)) @@ -202,9 +202,9 @@ public String getOption(String name) { * @return the 'CREATE INDEX' query corresponding to this index. */ public String asCQLQuery() { - String keyspaceName = Metadata.escapeId(table.getKeyspace().getName()); - String tableName = Metadata.escapeId(table.getName()); - String indexName = Metadata.escapeId(this.name); + String keyspaceName = Metadata.quoteIfNecessary(table.getKeyspace().getName()); + String tableName = Metadata.quoteIfNecessary(table.getName()); + String indexName = Metadata.quoteIfNecessary(this.name); return isCustomIndex() ? String.format("CREATE CUSTOM INDEX %s ON %s.%s (%s) USING '%s' %s;", indexName, keyspaceName, tableName, getTarget(), getIndexClassName(), getOptionsAsCql()) : String.format("CREATE INDEX %s ON %s.%s (%s);", indexName, keyspaceName, tableName, getTarget()); diff --git a/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java index e48e44ffdc0..9381502fd43 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java @@ -292,7 +292,7 @@ public String exportAsString() { public String asCQLQuery() { StringBuilder sb = new StringBuilder(); - sb.append("CREATE KEYSPACE ").append(Metadata.escapeId(name)).append(" WITH "); + sb.append("CREATE KEYSPACE ").append(Metadata.quoteIfNecessary(name)).append(" WITH "); sb.append("REPLICATION = { 'class' : '").append(replication.get("class")).append('\''); for (Map.Entry entry : replication.entrySet()) { if (entry.getKey().equals("class")) diff --git a/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java index 952541cb15e..9ce1e8971cc 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java @@ -155,9 +155,9 @@ public TableMetadata getBaseTable() { @Override protected String asCQLQuery(boolean formatted) { - String keyspaceName = Metadata.escapeId(keyspace.getName()); - String baseTableName = Metadata.escapeId(baseTable.getName()); - String viewName = Metadata.escapeId(name); + String keyspaceName = Metadata.quoteIfNecessary(keyspace.getName()); + String baseTableName = Metadata.quoteIfNecessary(baseTable.getName()); + String viewName = Metadata.quoteIfNecessary(name); StringBuilder sb = new StringBuilder(); sb.append("CREATE MATERIALIZED VIEW ") @@ -173,7 +173,7 @@ protected String asCQLQuery(boolean formatted) { Iterator it = columns.values().iterator(); while (it.hasNext()) { ColumnMetadata column = it.next(); - sb.append(spaces(4, formatted)).append(Metadata.escapeId(column.getName())); + sb.append(spaces(4, formatted)).append(Metadata.quoteIfNecessary(column.getName())); if (it.hasNext()) sb.append(","); sb.append(" "); newLine(sb, formatted); @@ -191,7 +191,7 @@ protected String asCQLQuery(boolean formatted) { // PK sb.append("PRIMARY KEY ("); if (partitionKey.size() == 1) { - sb.append(Metadata.escapeId(partitionKey.get(0).getName())); + sb.append(Metadata.quoteIfNecessary(partitionKey.get(0).getName())); } else { sb.append('('); boolean first = true; @@ -200,12 +200,12 @@ protected String asCQLQuery(boolean formatted) { first = false; else sb.append(", "); - sb.append(Metadata.escapeId(cm.getName())); + sb.append(Metadata.quoteIfNecessary(cm.getName())); } sb.append(')'); } for (ColumnMetadata cm : clusteringColumns) - sb.append(", ").append(Metadata.escapeId(cm.getName())); + sb.append(", ").append(Metadata.quoteIfNecessary(cm.getName())); sb.append(')'); appendOptions(sb, formatted); diff --git a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java index b6cbdfcc2cf..f31f2c5a209 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java @@ -148,13 +148,31 @@ private static boolean isAlphanumeric(String s) { return true; } - // Escape a CQL3 identifier based on its value as read from the schema - // tables. Because it comes from Cassandra, we could just always quote it, - // but to get a nicer output we don't do it if it's not necessary. - static String escapeId(String ident) { - return needsQuote(ident) - ? quote(ident) - : ident; + /** + * Quotes a CQL identifier if necessary. + *

    + * This is similar to {@link #quote(String)}, except that it won't quote the input string + * if it can safely be used as-is. For example: + *

      + *
    • {@code quoteIfNecessary("foo").equals("foo")} (no need to quote).
    • + *
    • {@code quoteIfNecessary("Foo").equals("\"Foo\"")} (identifier is mixed case so case + * sensitivity is required)
    • + *
    • {@code quoteIfNecessary("foo bar").equals("\"foo bar\"")} (identifier contains + * special characters)
    • + *
    • {@code quoteIfNecessary("table").equals("\"table\"")} (identifier is a reserved CQL + * keyword)
    • + *
    + * + * @param id the "internal" form of the identifier. That is, the identifier as it would + * appear in Cassandra system tables (such as {@code system_schema.tables}, + * {@code system_schema.columns}, etc.) + * @return the identifier as it would appear in a CQL query string. This is also how you need + * to pass it to public driver methods, such as {@link #getKeyspace(String)}. + */ + public static String quoteIfNecessary(String id) { + return needsQuote(id) + ? quote(id) + : id; } /** @@ -207,7 +225,7 @@ static String fullFunctionName(String simpleName, Collection argumentTypes) { // they appear in a schema change event (in targetSignature) if (argumentType instanceof UserType) { UserType userType = (UserType) argumentType; - String typeName = Metadata.escapeId(userType.getTypeName()); + String typeName = Metadata.quoteIfNecessary(userType.getTypeName()); sb.append(typeName); } else { sb.append(argumentType); diff --git a/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java index 3ff0cbdeadd..99cb877c69e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java @@ -398,7 +398,7 @@ public String exportAsString() { @Override protected String asCQLQuery(boolean formatted) { StringBuilder sb = new StringBuilder(); - sb.append("CREATE TABLE ").append(Metadata.escapeId(keyspace.getName())).append('.').append(Metadata.escapeId(name)).append(" ("); + sb.append("CREATE TABLE ").append(Metadata.quoteIfNecessary(keyspace.getName())).append('.').append(Metadata.quoteIfNecessary(name)).append(" ("); newLine(sb, formatted); for (ColumnMetadata cm : columns.values()) newLine(sb.append(spaces(4, formatted)).append(cm).append(',').append(spaces(1, !formatted)), formatted); @@ -406,7 +406,7 @@ protected String asCQLQuery(boolean formatted) { // PK sb.append(spaces(4, formatted)).append("PRIMARY KEY ("); if (partitionKey.size() == 1) { - sb.append(Metadata.escapeId(partitionKey.get(0).getName())); + sb.append(Metadata.quoteIfNecessary(partitionKey.get(0).getName())); } else { sb.append('('); boolean first = true; @@ -415,12 +415,12 @@ protected String asCQLQuery(boolean formatted) { first = false; else sb.append(", "); - sb.append(Metadata.escapeId(cm.getName())); + sb.append(Metadata.quoteIfNecessary(cm.getName())); } sb.append(')'); } for (ColumnMetadata cm : clusteringColumns) - sb.append(", ").append(Metadata.escapeId(cm.getName())); + sb.append(", ").append(Metadata.quoteIfNecessary(cm.getName())); sb.append(')'); newLine(sb, formatted); // end PK diff --git a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java index 2318b72167d..9a10702b7f6 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java @@ -2132,7 +2132,7 @@ public ByteBuffer serialize(T value, ProtocolVersion protocolVersion) { ByteBuffer[] elements = new ByteBuffer[length]; int i = 0; for (UserType.Field field : definition) { - elements[i] = serializeField(value, Metadata.escapeId(field.getName()), protocolVersion); + elements[i] = serializeField(value, Metadata.quoteIfNecessary(field.getName()), protocolVersion); size += 4 + (elements[i] == null ? 0 : elements[i].remaining()); i++; } @@ -2161,7 +2161,7 @@ public T deserialize(ByteBuffer bytes, ProtocolVersion protocolVersion) { break; int n = input.getInt(); ByteBuffer element = n < 0 ? null : CodecUtils.readBytes(input, n); - value = deserializeAndSetField(element, value, Metadata.escapeId(field.getName()), protocolVersion); + value = deserializeAndSetField(element, value, Metadata.quoteIfNecessary(field.getName()), protocolVersion); } return value; } catch (BufferUnderflowException e) { @@ -2178,9 +2178,9 @@ public String format(T value) { for (UserType.Field field : definition) { if (i > 0) sb.append(","); - sb.append(Metadata.escapeId(field.getName())); + sb.append(Metadata.quoteIfNecessary(field.getName())); sb.append(":"); - sb.append(formatField(value, Metadata.escapeId(field.getName()))); + sb.append(formatField(value, Metadata.quoteIfNecessary(field.getName()))); i += 1; } sb.append("}"); diff --git a/driver-core/src/main/java/com/datastax/driver/core/UserType.java b/driver-core/src/main/java/com/datastax/driver/core/UserType.java index feb7026eb00..f590fdda82e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/UserType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/UserType.java @@ -277,7 +277,7 @@ void setCodecRegistry(CodecRegistry codecRegistry) { private String asCQLQuery(boolean formatted) { StringBuilder sb = new StringBuilder(); - sb.append("CREATE TYPE ").append(Metadata.escapeId(keyspace)).append('.').append(Metadata.escapeId(typeName)).append(" ("); + sb.append("CREATE TYPE ").append(Metadata.quoteIfNecessary(keyspace)).append('.').append(Metadata.quoteIfNecessary(typeName)).append(" ("); TableMetadata.newLine(sb, formatted); for (int i = 0; i < byIdx.length; i++) { sb.append(TableMetadata.spaces(4, formatted)).append(byIdx[i]); @@ -291,7 +291,7 @@ private String asCQLQuery(boolean formatted) { @Override public String toString() { - String str = Metadata.escapeId(getKeyspace()) + "." + Metadata.escapeId(getTypeName()); + String str = Metadata.quoteIfNecessary(getKeyspace()) + "." + Metadata.quoteIfNecessary(getTypeName()); return isFrozen() ? "frozen<" + str + ">" : str; @@ -299,7 +299,7 @@ public String toString() { @Override public String asFunctionParameterString() { - return Metadata.escapeId(getTypeName()); + return Metadata.quoteIfNecessary(getTypeName()); } /** @@ -349,7 +349,7 @@ public final boolean equals(Object o) { @Override public String toString() { - return Metadata.escapeId(name) + ' ' + type; + return Metadata.quoteIfNecessary(name) + ' ' + type; } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BuiltStatement.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BuiltStatement.java index 29af5da4652..7658f0cb170 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BuiltStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BuiltStatement.java @@ -99,10 +99,12 @@ public abstract class BuiltStatement extends RegularStatement { this.keyspace = keyspace; } - // Same as Metadata.escapeId, but we don't have access to it here. + /** + * @deprecated preserved for backward compatibility, use {@link Metadata#quoteIfNecessary(String)} instead. + */ + @Deprecated protected static String escapeId(String ident) { - // we don't need to escape if it's lowercase and match non-quoted CQL3 ids. - return lowercaseAlphanumeric.matcher(ident).matches() ? ident : Metadata.quote(ident); + return Metadata.quoteIfNecessary(ident); } @Override diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java index 82bb19b93c3..5ce9c788e84 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java @@ -17,6 +17,7 @@ import com.datastax.driver.core.CodecRegistry; import com.datastax.driver.core.ColumnMetadata; +import com.datastax.driver.core.Metadata; import com.datastax.driver.core.TableMetadata; import java.util.ArrayList; @@ -40,8 +41,8 @@ public class Delete extends BuiltStatement { } Delete(TableMetadata table, List columns) { - this(escapeId(table.getKeyspace().getName()), - escapeId(table.getName()), + this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), + Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey(), columns); diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java index 4070aac70f5..b9c03737ffd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java @@ -17,6 +17,7 @@ import com.datastax.driver.core.CodecRegistry; import com.datastax.driver.core.ColumnMetadata; +import com.datastax.driver.core.Metadata; import com.datastax.driver.core.TableMetadata; import java.util.ArrayList; @@ -42,8 +43,8 @@ public class Insert extends BuiltStatement { } Insert(TableMetadata table) { - this(escapeId(table.getKeyspace().getName()), - escapeId(table.getName()), + this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), + Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java index cc64e336e96..f349db80097 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java @@ -15,10 +15,7 @@ */ package com.datastax.driver.core.querybuilder; -import com.datastax.driver.core.CodecRegistry; -import com.datastax.driver.core.ColumnMetadata; -import com.datastax.driver.core.DataType; -import com.datastax.driver.core.TableMetadata; +import com.datastax.driver.core.*; import java.util.ArrayList; import java.util.Arrays; @@ -47,8 +44,8 @@ public class Select extends BuiltStatement { } Select(TableMetadata table, List columnNames, boolean isDistinct, boolean isJson) { - this(escapeId(table.getKeyspace().getName()), - escapeId(table.getName()), + this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), + Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey(), columnNames, diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Truncate.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Truncate.java index caf25699135..e352d750e10 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Truncate.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Truncate.java @@ -17,6 +17,7 @@ import com.datastax.driver.core.CodecRegistry; import com.datastax.driver.core.ColumnMetadata; +import com.datastax.driver.core.Metadata; import com.datastax.driver.core.TableMetadata; import java.util.Arrays; @@ -34,8 +35,8 @@ public class Truncate extends BuiltStatement { } Truncate(TableMetadata table) { - this(escapeId(table.getKeyspace().getName()), - escapeId(table.getName()), + this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), + Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Update.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Update.java index 18083fd050f..8567566ec4d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Update.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Update.java @@ -17,6 +17,7 @@ import com.datastax.driver.core.CodecRegistry; import com.datastax.driver.core.ColumnMetadata; +import com.datastax.driver.core.Metadata; import com.datastax.driver.core.TableMetadata; import com.datastax.driver.core.querybuilder.Assignment.CounterAssignment; @@ -41,8 +42,8 @@ public class Update extends BuiltStatement { } Update(TableMetadata table) { - this(escapeId(table.getKeyspace().getName()), - escapeId(table.getName()), + this(Metadata.quoteIfNecessary(table.getKeyspace().getName()), + Metadata.quoteIfNecessary(table.getName()), Arrays.asList(new Object[table.getPartitionKey().size()]), table.getPartitionKey()); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java index 8b793fc601c..d7114cd4299 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java @@ -147,18 +147,18 @@ public void handleId_should_preserve_unquoted_non_alphanumeric_identifiers() { @Test(groups = "unit") public void escapeId_should_not_quote_lowercase_identifiers() { String id = "this_does_not_need_quoting_0123456789abcdefghijklmnopqrstuvwxyz"; - assertThat(Metadata.escapeId(id)).isEqualTo(id); + assertThat(Metadata.quoteIfNecessary(id)).isEqualTo(id); } @Test(groups = "unit") public void escapeId_should_quote_non_lowercase_identifiers() { - assertThat(Metadata.escapeId("This_Needs_Quoting_1234")).isEqualTo("\"This_Needs_Quoting_1234\""); - assertThat(Metadata.escapeId("This Needs Quoting 1234!!")).isEqualTo("\"This Needs Quoting 1234!!\""); + assertThat(Metadata.quoteIfNecessary("This_Needs_Quoting_1234")).isEqualTo("\"This_Needs_Quoting_1234\""); + assertThat(Metadata.quoteIfNecessary("This Needs Quoting 1234!!")).isEqualTo("\"This Needs Quoting 1234!!\""); } @Test(groups = "unit") public void escapeId_should_quote_reserved_cql_keywords() { - assertThat(Metadata.escapeId("columnfamily")).isEqualTo("\"columnfamily\""); + assertThat(Metadata.quoteIfNecessary("columnfamily")).isEqualTo("\"columnfamily\""); } } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java new file mode 100644 index 00000000000..16e6ecada3f --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +class AliasedMappedProperty { + + final MappedProperty mappedProperty; + final String alias; + + AliasedMappedProperty(MappedProperty mappedProperty, String alias) { + this.mappedProperty = mappedProperty; + this.alias = alias; + } +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java index 014621c3f3c..ffc30f97c18 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java @@ -15,15 +15,10 @@ */ package com.datastax.driver.mapping; -import com.datastax.driver.mapping.annotations.Column; -import com.datastax.driver.mapping.annotations.Computed; -import com.datastax.driver.mapping.annotations.Table; +import com.datastax.driver.mapping.annotations.*; import java.lang.annotation.Annotation; -import java.util.Collection; -import java.util.Collections; -import java.util.HashSet; -import java.util.List; +import java.util.*; /** * Various checks on mapping annotations. @@ -62,15 +57,15 @@ private static void validateAnnotations(Class clazz, Class> allowed) { - Class invalid = validateAnnotations(property.getAnnotations(), allowed); + static void validateAnnotations(String propertyName, Map, Annotation> annotations, Collection> allowed) { + Class invalid = validateAnnotations(annotations.values(), allowed); if (invalid != null) { throw new IllegalArgumentException(String.format("Annotation @%s is not allowed on property '%s'", invalid.getSimpleName(), - property)); + propertyName)); } - checkValidPrimaryKey(property); - checkValidComputed(property); + checkValidPrimaryKey(propertyName, annotations); + checkValidComputed(propertyName, annotations); } // Returns the offending annotation if there is one @@ -83,30 +78,30 @@ private static Class validateAnnotations(Collection, Annotation> annotations) { + if (annotations.containsKey(PartitionKey.class) && annotations.containsKey(ClusteringColumn.class)) + throw new IllegalArgumentException(String.format("Property '%s' cannot be annotated with both @PartitionKey and @ClusteringColumn", propertyName)); } - private static void checkValidComputed(PropertyMapper property) { - if (property.isComputed()) { - Computed computed = property.annotation(Computed.class); + private static void checkValidComputed(String propertyName, Map, Annotation> annotations) { + if (annotations.containsKey(Computed.class)) { + Computed computed = (Computed) annotations.get(Computed.class); if (computed.value().isEmpty()) { - throw new IllegalArgumentException(String.format("Property '%s': attribute 'value' of annotation @Computed is mandatory for computed properties", property)); + throw new IllegalArgumentException(String.format("Property '%s': attribute 'value' of annotation @Computed is mandatory for computed properties", propertyName)); } - if (property.hasAnnotation(Column.class)) { - throw new IllegalArgumentException(String.format("Property '%s' cannot be annotated with both @Column and @Computed", property)); + if (annotations.containsKey(Column.class)) { + throw new IllegalArgumentException(String.format("Property '%s' cannot be annotated with both @Column and @Computed", propertyName)); } } } - static void validateOrder(List properties, String annotation) { + static void validateOrder(List> properties, String annotation) { for (int i = 0; i < properties.size(); i++) { - PropertyMapper property = properties.get(i); - int pos = property.position; + AliasedMappedProperty property = properties.get(i); + int pos = property.mappedProperty.getPosition(); if (pos != i) throw new IllegalArgumentException(String.format("Invalid ordering value %d for annotation %s of property '%s', was expecting %d", - pos, annotation, property, i)); + pos, annotation, property.mappedProperty.getPropertyName(), i)); } } } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java index 7ff0a92a2e9..b8e0c92b670 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java @@ -19,10 +19,8 @@ import com.datastax.driver.mapping.MethodMapper.ParamMapper; import com.datastax.driver.mapping.annotations.*; import com.google.common.base.Strings; -import com.google.common.collect.ImmutableSet; import com.google.common.reflect.TypeToken; -import java.beans.PropertyDescriptor; import java.lang.annotation.Annotation; import java.lang.reflect.Method; import java.lang.reflect.ParameterizedType; @@ -38,34 +36,10 @@ */ class AnnotationParser { - /** - * Annotations allowed on a property that maps to a table column. - */ - @SuppressWarnings("unchecked") - private static final Set> VALID_COLUMN_ANNOTATIONS = ImmutableSet.of( - Column.class, - Computed.class, - ClusteringColumn.class, - Frozen.class, - FrozenKey.class, - FrozenValue.class, - PartitionKey.class, - Transient.class); - - /** - * Annotations allowed on a property that maps to a UDT field. - */ - private static final Set> VALID_FIELD_ANNOTATIONS = ImmutableSet.of( - Field.class, - Frozen.class, - FrozenKey.class, - FrozenValue.class, - Transient.class); - - private static final Comparator POSITION_COMPARATOR = new Comparator() { + private static final Comparator> POSITION_COMPARATOR = new Comparator>() { @Override - public int compare(PropertyMapper o1, PropertyMapper o2) { - return o1.position - o2.position; + public int compare(AliasedMappedProperty o1, AliasedMappedProperty o2) { + return o1.mappedProperty.getPosition() - o2.mappedProperty.getPosition(); } }; @@ -104,45 +78,38 @@ static EntityMapper parseEntity(final Class entityClass, MappingManage EntityMapper mapper = new EntityMapper(entityClass, ksName, tableName, writeConsistency, readConsistency); - List pks = new ArrayList(); - List ccs = new ArrayList(); - List rgs = new ArrayList(); + List> pks = new ArrayList>(); + List> ccs = new ArrayList>(); + List> rgs = new ArrayList>(); - Map fieldsAndProperties = ReflectionUtils.scanFieldsAndProperties(entityClass); + MappingConfiguration configuration = mappingManager.getConfiguration(); + Set> properties = configuration.getPropertyMapper().mapTable(entityClass); AtomicInteger columnCounter = mappingManager.isCassandraV1 ? null : new AtomicInteger(0); - for (Map.Entry entry : fieldsAndProperties.entrySet()) { + for (MappedProperty mappedProperty : properties) { - String propertyName = entry.getKey(); - java.lang.reflect.Field field = (java.lang.reflect.Field) entry.getValue()[0]; - PropertyDescriptor property = (PropertyDescriptor) entry.getValue()[1]; String alias = (columnCounter != null) ? "col" + columnCounter.incrementAndGet() : null; - PropertyMapper propertyMapper = new PropertyMapper(entityClass, propertyName, alias, field, property); + AliasedMappedProperty aliasedMappedProperty = new AliasedMappedProperty(mappedProperty, alias); - if (mappingManager.isCassandraV1 && propertyMapper.isComputed()) + if (mappingManager.isCassandraV1 && mappedProperty.isComputed()) throw new UnsupportedOperationException("Computed properties are not supported with native protocol v1"); - AnnotationChecks.validateAnnotations(propertyMapper, VALID_COLUMN_ANNOTATIONS); - - if (propertyMapper.isTransient()) - continue; - - if (!propertyMapper.isComputed() && tableMetadata.getColumn(propertyMapper.columnName) == null) + if (!mappedProperty.isComputed() && tableMetadata.getColumn(mappedProperty.getMappedName()) == null) throw new IllegalArgumentException(String.format("Column %s does not exist in table %s.%s", - propertyMapper.columnName, ksName, tableName)); + mappedProperty.getMappedName(), ksName, tableName)); - if (propertyMapper.isPartitionKey()) - pks.add(propertyMapper); - else if (propertyMapper.isClusteringColumn()) - ccs.add(propertyMapper); + if (mappedProperty.isPartitionKey()) + pks.add(aliasedMappedProperty); + else if (mappedProperty.isClusteringColumn()) + ccs.add(aliasedMappedProperty); else - rgs.add(propertyMapper); + rgs.add(aliasedMappedProperty); // if the property is of a UDT type, parse it now - for (Class udt : TypeMappings.findUDTs(propertyMapper.javaType.getType())) + for (Class udt : TypeMappings.findUDTs(mappedProperty.getPropertyType().getType())) mappingManager.getUDTCodec(udt); } @@ -180,31 +147,23 @@ static MappedUDTCodec parseUDT(Class udtClass, MappingManager mappingM if (userType == null) throw new IllegalArgumentException(String.format("User type %s does not exist in keyspace %s", udtName, ksName)); - Map propertyMappers = new HashMap(); - - Map fieldsAndProperties = ReflectionUtils.scanFieldsAndProperties(udtClass); + Map> propertyMappers = new HashMap>(); - for (Map.Entry entry : fieldsAndProperties.entrySet()) { + MappingConfiguration configuration = mappingManager.getConfiguration(); + Set> properties = configuration.getPropertyMapper().mapUdt(udtClass); - String propertyName = entry.getKey(); - java.lang.reflect.Field field = (java.lang.reflect.Field) entry.getValue()[0]; - PropertyDescriptor property = (PropertyDescriptor) entry.getValue()[1]; + for (MappedProperty mappedProperty : properties) { - PropertyMapper propertyMapper = new PropertyMapper(udtClass, propertyName, null, field, property); - - AnnotationChecks.validateAnnotations(propertyMapper, VALID_FIELD_ANNOTATIONS); - - if (propertyMapper.isTransient()) - continue; + AliasedMappedProperty aliasedMappedProperty = new AliasedMappedProperty(mappedProperty, null); - if (!userType.contains(propertyMapper.columnName)) + if (!userType.contains(mappedProperty.getMappedName())) throw new IllegalArgumentException(String.format("Field %s does not exist in type %s.%s", - propertyMapper.columnName, ksName, userType.getTypeName())); + mappedProperty.getMappedName(), ksName, userType.getTypeName())); - for (Class fieldUdt : TypeMappings.findUDTs(propertyMapper.javaType.getType())) + for (Class fieldUdt : TypeMappings.findUDTs(mappedProperty.getPropertyType().getType())) mappingManager.getUDTCodec(fieldUdt); - propertyMappers.put(propertyMapper.columnName, propertyMapper); + propertyMappers.put(mappedProperty.getMappedName(), aliasedMappedProperty); } return new MappedUDTCodec(userType, udtClass, propertyMappers, mappingManager); diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultHierarchyScanStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultHierarchyScanStrategy.java new file mode 100644 index 00000000000..02bc8c20cc9 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultHierarchyScanStrategy.java @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import java.util.ArrayList; +import java.util.List; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * The default {@link HierarchyScanStrategy}. + *

    + * This strategy assumes that there exists a common ancestor + * for all mapped classes in the application, and allows all its + * descendants (optionally including itself) to be scanned for annotations. + */ +public class DefaultHierarchyScanStrategy implements HierarchyScanStrategy { + + private final Class highestAncestor; + + private final boolean included; + + /** + * Creates a new instance with defaults: + * the common ancestor is {@link Object} excluded, which implies + * that every ancestor of a mapped class, except {@code Object} itself, + * will be scanned for annotations. + */ + public DefaultHierarchyScanStrategy() { + this(Object.class, false); + } + + /** + * Creates a new instance with the given highest common ancestor. + * + * @param highestAncestor The highest ancestor class to consider; cannot be {@code null}. + * @param included Whether or not to include the highest ancestor itself. + */ + public DefaultHierarchyScanStrategy(Class highestAncestor, boolean included) { + checkNotNull(highestAncestor); + this.highestAncestor = highestAncestor; + this.included = included; + } + + @Override + public List> filterClassHierarchy(Class mappedClass) { + List> classesToScan = new ArrayList>(); + Class highestAncestor = this.highestAncestor; + for (Class clazz = mappedClass; clazz != null; clazz = clazz.getSuperclass()) { + if (!clazz.equals(highestAncestor) || included) { + classesToScan.add(clazz); + } + if (clazz.equals(highestAncestor)) { + break; + } + } + return classesToScan; + } +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultMappedProperty.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultMappedProperty.java new file mode 100644 index 00000000000..5b3c4f68f4e --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultMappedProperty.java @@ -0,0 +1,184 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.TypeCodec; +import com.datastax.driver.mapping.annotations.*; +import com.google.common.reflect.TypeToken; + +import java.lang.annotation.Annotation; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.Map; + +import static com.google.common.base.Preconditions.checkArgument; +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * Default implementation of {@link MappedProperty}. + */ +class DefaultMappedProperty implements MappedProperty { + + static DefaultMappedProperty create(Class mappedClass, String propertyName, String mappedName, Field field, Method getter, Method setter, Map, Annotation> annotations) { + @SuppressWarnings("unchecked") + TypeToken propertyType = (TypeToken) inferType(field, getter); + boolean partitionKey = annotations.containsKey(PartitionKey.class); + boolean clusteringColumn = annotations.containsKey(ClusteringColumn.class); + boolean computed = annotations.containsKey(Computed.class); + int position = inferPosition(annotations); + @SuppressWarnings("unchecked") + Class> codecClass = (Class>) getCustomCodecClass(annotations); + return new DefaultMappedProperty( + mappedClass, propertyName, mappedName, propertyType, + partitionKey, clusteringColumn, computed, position, codecClass, field, getter, setter); + + } + + private final Class mappedClass; + private final String propertyName; + private final TypeToken propertyType; + private final String mappedName; + private final boolean partitionKey; + private final boolean clusteringColumn; + private final boolean computed; + private final int position; + private final TypeCodec customCodec; + private final Field field; + private final Method getter; + private final Method setter; + + private DefaultMappedProperty( + Class mappedClass, String propertyName, String mappedName, TypeToken propertyType, + boolean partitionKey, boolean clusteringColumn, boolean computed, int position, + Class> codecClass, Field field, Method getter, Method setter) { + checkArgument(propertyName != null && !propertyName.isEmpty()); + checkArgument(mappedName != null && !mappedName.isEmpty()); + checkNotNull(propertyType); + this.mappedClass = mappedClass; + this.propertyName = propertyName; + this.mappedName = mappedName; + this.propertyType = propertyType; + this.partitionKey = partitionKey; + this.clusteringColumn = clusteringColumn; + this.computed = computed; + this.position = position; + this.customCodec = codecClass == null || codecClass.equals(Defaults.NoCodec.class) ? null : ReflectionUtils.newInstance(codecClass); + this.field = field; + this.getter = getter; + this.setter = setter; + } + + @Override + public String getPropertyName() { + return propertyName; + } + + @Override + public TypeToken getPropertyType() { + return propertyType; + } + + @Override + public String getMappedName() { + return mappedName; + } + + @Override + public int getPosition() { + return position; + } + + @Override + public TypeCodec getCustomCodec() { + return customCodec; + } + + @Override + public boolean isComputed() { + return computed; + } + + @Override + public boolean isPartitionKey() { + return partitionKey; + } + + @Override + public boolean isClusteringColumn() { + return clusteringColumn; + } + + @SuppressWarnings("unchecked") + @Override + public T getValue(Object entity) { + try { + // try getter first, if available, otherwise direct field access + if (getter != null && getter.isAccessible()) + return (T) getter.invoke(entity); + else + return (T) checkNotNull(field).get(entity); + } catch (Exception e) { + throw new IllegalArgumentException("Unable to read property '" + getPropertyName() + "' in " + entity.getClass(), e); + } + } + + @Override + public void setValue(Object entity, T value) { + try { + // try setter first, if available, otherwise direct field access + if (setter != null && setter.isAccessible()) + setter.invoke(entity, value); + else + checkNotNull(field).set(entity, value); + } catch (Exception e) { + throw new IllegalArgumentException("Unable to write property '" + getPropertyName() + "' in " + entity.getClass(), e); + } + } + + @Override + public String toString() { + return mappedClass.getSimpleName() + "." + getPropertyName(); + } + + private static TypeToken inferType(Field field, Method getter) { + if (getter != null) + return TypeToken.of(getter.getGenericReturnType()); + else + return TypeToken.of(checkNotNull(field).getGenericType()); + } + + private static int inferPosition(Map, Annotation> annotations) { + if (annotations.containsKey(PartitionKey.class)) { + return ((PartitionKey) annotations.get(PartitionKey.class)).value(); + } + if (annotations.containsKey(ClusteringColumn.class)) { + return ((ClusteringColumn) annotations.get(ClusteringColumn.class)).value(); + } + return -1; + } + + private static Class> getCustomCodecClass(Map, Annotation> annotations) { + Column column = (Column) annotations.get(Column.class); + if (column != null) + return column.codec(); + com.datastax.driver.mapping.annotations.Field udtField = + (com.datastax.driver.mapping.annotations.Field) annotations.get(com.datastax.driver.mapping.annotations.Field.class); + if (udtField != null) + return udtField.codec(); + return null; + } + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultNamingStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultNamingStrategy.java new file mode 100644 index 00000000000..088e0440310 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultNamingStrategy.java @@ -0,0 +1,72 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import java.util.List; + +/** + * A naming strategy that builds upon two naming conventions for the Java and Cassandra side. + *

    + * To infer a Cassandra name, the strategy will {@link NamingConvention#split(String) split} + * the Java name according to the Java convention, and then + * {@link NamingConvention#join(List) join} the resulting tokens according to the Cassandra + * convention. For example, a possible implementation might: + *

      + *
    • trim a prefix and tokenize on camel case: split("mUserName") = "user, name"
    • + *
    • join with a separator: join("user", "name") => "user_name"
    • + *
    + */ +public class DefaultNamingStrategy implements NamingStrategy { + + private NamingConvention javaConvention; + + private NamingConvention cassandraConvention; + + /** + * Builds a new instance with the default conventions, namely + * {@link NamingConventions#LOWER_CAMEL_CASE lower camel case} + * for the Java convention, and + * {@link NamingConventions#LOWER_CASE lower case} + * for the Cassandra convention. + *

    + * For example, a "userName" Java property will be mapped to a "username" column. + */ + public DefaultNamingStrategy() { + this(NamingConventions.LOWER_CAMEL_CASE, NamingConventions.LOWER_CASE); + } + + /** + * Builds a new instance. + * + * @param javaConvention the naming convention that will be used to tokenize the Java + * property names. + * @param cassandraConvention the naming convention that will be used to build the Cassandra + * names from the Java tokens. + */ + public DefaultNamingStrategy(NamingConvention javaConvention, NamingConvention cassandraConvention) { + if (javaConvention == null || cassandraConvention == null) { + throw new IllegalArgumentException("input/output NamingConvention cannot be null"); + } + this.javaConvention = javaConvention; + this.cassandraConvention = cassandraConvention; + } + + @Override + public String toCassandraName(String javaPropertyName) { + return cassandraConvention.join(javaConvention.split(javaPropertyName)); + } + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultPropertyMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultPropertyMapper.java new file mode 100644 index 00000000000..b973f2f2224 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultPropertyMapper.java @@ -0,0 +1,542 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.Metadata; +import com.datastax.driver.mapping.annotations.*; +import com.google.common.base.Throwables; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Sets; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +import java.beans.BeanInfo; +import java.beans.IntrospectionException; +import java.beans.Introspector; +import java.beans.PropertyDescriptor; +import java.lang.annotation.Annotation; +import java.lang.reflect.AccessibleObject; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.util.*; + +import static com.google.common.base.Preconditions.checkNotNull; + +/** + * The default {@link PropertyMapper} used by the mapper. + *

    + * This mapper can be configured to scan for fields, getters and setters, or both. + * The default is to scan for both. + *

    + * This mapper can also be configured to skip transient properties. + * By default, all properties will be mapped (non-transient), + * unless explicitly marked with {@link Transient @Transient}. + *

    + * This mapper recognizes standard getter and setter methods + * (as defined by the Java Beans specification), + * and also "relaxed" setter methods, i.e., setter methods + * whose return type are not {@code void}. + * + * @see DefaultMappedProperty + */ +public class DefaultPropertyMapper implements PropertyMapper { + + private static final Logger LOGGER = LoggerFactory.getLogger(DefaultPropertyMapper.class); + + private static final HashSet DEFAULT_TRANSIENT_PROPERTY_NAMES = Sets.newHashSet( + "class", + // JAVA-1279: exclude Groovy's metaClass property + "metaClass" + ); + + private static final Set> NON_TRANSIENT_ANNOTATIONS = ImmutableSet.>of( + Column.class, + PartitionKey.class, + ClusteringColumn.class, + com.datastax.driver.mapping.annotations.Field.class, + Computed.class, + Frozen.class, + FrozenKey.class, + FrozenValue.class + ); + + /** + * Annotations allowed on a property that maps to a table column. + */ + private static final Set> VALID_COLUMN_ANNOTATIONS = ImmutableSet.>builder() + .add(Column.class) + .add(Computed.class) + .add(ClusteringColumn.class) + .add(Frozen.class) + .add(FrozenKey.class) + .add(FrozenValue.class) + .add(PartitionKey.class) + .add(Transient.class) + .build(); + + /** + * Annotations allowed on a property that maps to a UDT field. + */ + private static final Set> VALID_FIELD_ANNOTATIONS = ImmutableSet.of( + com.datastax.driver.mapping.annotations.Field.class, + Frozen.class, + FrozenKey.class, + FrozenValue.class, + Transient.class); + + private PropertyAccessStrategy propertyAccessStrategy = PropertyAccessStrategy.BOTH; + + private PropertyTransienceStrategy propertyTransienceStrategy = PropertyTransienceStrategy.OPT_OUT; + + private HierarchyScanStrategy hierarchyScanStrategy = new DefaultHierarchyScanStrategy(); + + private NamingStrategy namingStrategy = new DefaultNamingStrategy(); + + private Set transientPropertyNames = new HashSet(DEFAULT_TRANSIENT_PROPERTY_NAMES); + + /** + * Sets the {@link PropertyAccessStrategy property access strategy} to use. + * The default is {@link PropertyAccessStrategy#BOTH}. + * + * @param propertyAccessStrategy the {@link PropertyAccessStrategy property access strategy} to use; may not be {@code null}. + * @return this {@link DefaultPropertyMapper} instance (to allow for fluent builder pattern). + */ + public DefaultPropertyMapper setPropertyAccessStrategy(PropertyAccessStrategy propertyAccessStrategy) { + this.propertyAccessStrategy = checkNotNull(propertyAccessStrategy); + return this; + } + + /** + * Sets the {@link PropertyTransienceStrategy property transience strategy} to use. + * The default is {@link PropertyTransienceStrategy#OPT_OUT}. + * + * @param propertyTransienceStrategy the {@link PropertyTransienceStrategy property transience strategy} to use; may not be {@code null}. + * @return this {@link DefaultPropertyMapper} instance (to allow for fluent builder pattern). + */ + public DefaultPropertyMapper setPropertyTransienceStrategy(PropertyTransienceStrategy propertyTransienceStrategy) { + this.propertyTransienceStrategy = checkNotNull(propertyTransienceStrategy); + return this; + } + + /** + * Sets the {@link HierarchyScanStrategy hierarchy scan strategy} to use. + * The default is {@link DefaultHierarchyScanStrategy}. + * + * @param hierarchyScanStrategy the {@link HierarchyScanStrategy hierarchy scan strategy} to use; may not be {@code null}. + * @return this {@link DefaultPropertyMapper} instance (to allow for fluent builder pattern). + */ + public DefaultPropertyMapper setHierarchyScanStrategy(HierarchyScanStrategy hierarchyScanStrategy) { + this.hierarchyScanStrategy = checkNotNull(hierarchyScanStrategy); + return this; + } + + /** + * Sets the {@link NamingStrategy naming strategy} to use. + * The default is {@link DefaultNamingStrategy}. + * + * @param namingStrategy the {@link NamingStrategy naming strategy} to use; may not be {@code null}. + * @return this {@link DefaultPropertyMapper} instance (to allow for fluent builder pattern). + */ + public DefaultPropertyMapper setNamingStrategy(NamingStrategy namingStrategy) { + this.namingStrategy = checkNotNull(namingStrategy); + return this; + } + + /** + * Sets transient property names. This + * will completely replace any names already configured for this object. + *

    + * The default set comprises the following property names: + * {@code class} and {@code metaClass}. + * These properties pertain to the {@link Object} class – + * {@code metaClass} being specific to the Groovy language. + *

    + * Property names provided here will always be considered transient; + * if a more fine-grained tuning is required, it is also possible + * to use the {@link Transient @Transient} annotation + * on a specific property. + *

    + * Subclasses can also override {@link #isTransient(String, Field, Method, Method, Map)} to gain + * complete control over which properties should be considered transient. + * + * @param transientPropertyNames a set of property names to exclude from mapping; may not be {@code null}. This + * will completely replace any names already configured for this object. + */ + public DefaultPropertyMapper setTransientPropertyNames(Set transientPropertyNames) { + this.transientPropertyNames = checkNotNull(transientPropertyNames); + return this; + } + + /** + * Adds new values to the existing set of transient property names. + *

    + * The default set comprises the following property names: + * {@code class} and {@code metaClass}. + * These properties pertain to the {@link Object} class – + * {@code metaClass} being specific to the Groovy language. + *

    + * Property names provided here will always be considered transient; + * if a more fine-grained tuning is required, it is also possible + * to use the {@link Transient @Transient} annotation + * on a specific property. + *

    + * Subclasses can also override {@link #isTransient(String, Field, Method, Method, Map)} to gain + * complete control over which properties should be considered transient. + * + * @param transientPropertyNames the values to add; may not be {@code null}. + */ + public DefaultPropertyMapper addTransientPropertyNames(String... transientPropertyNames) { + return addTransientPropertyNames(Arrays.asList(checkNotNull(transientPropertyNames))); + } + + /** + * Adds new values to the existing set of transient property names. + *

    + * The default set comprises the following property names: + * {@code class} and {@code metaClass}. + * These properties pertain to the {@link Object} class – + * {@code metaClass} being specific to the Groovy language. + *

    + * Property names provided here will always be considered transient; + * if a more fine-grained tuning is required, it is also possible + * to use the {@link Transient @Transient} annotation + * on a specific property. + *

    + * Subclasses can also override {@link #isTransient(String, Field, Method, Method, Map)} to gain + * complete control over which properties should be considered transient. + * + * @param transientPropertyNames the values to add; may not be {@code null}. + */ + public DefaultPropertyMapper addTransientPropertyNames(Collection transientPropertyNames) { + this.transientPropertyNames.addAll(checkNotNull(transientPropertyNames)); + return this; + } + + @Override + public Set> mapTable(Class tableClass) { + return mapTableOrUdt(tableClass, VALID_COLUMN_ANNOTATIONS); + } + + @Override + public Set> mapUdt(Class udtClass) { + return mapTableOrUdt(udtClass, VALID_FIELD_ANNOTATIONS); + } + + private Set> mapTableOrUdt(Class entityClass, Collection> allowed) { + Map fieldsGettersAndSetters = new HashMap(); + List> classHierarchy = hierarchyScanStrategy.filterClassHierarchy(entityClass); + if (propertyAccessStrategy.isFieldScanAllowed()) { + Map fields = scanFields(classHierarchy); + for (Map.Entry entry : fields.entrySet()) { + String propertyName = entry.getKey(); + Field field = tryMakeAccessible(entry.getValue()); + fieldsGettersAndSetters.put(propertyName, new Object[]{field, null, null}); + } + } + if (propertyAccessStrategy.isGetterSetterScanAllowed()) { + Map properties = scanProperties(classHierarchy); + for (Map.Entry entry : properties.entrySet()) { + PropertyDescriptor property = entry.getValue(); + Method getter = tryMakeAccessible(locateGetter(entityClass, property)); + Method setter = tryMakeAccessible(locateSetter(entityClass, property)); + Object[] value = fieldsGettersAndSetters.get(entry.getKey()); + if (value != null) { + value[1] = getter; + value[2] = setter; + } else if (getter != null || setter != null) { + fieldsGettersAndSetters.put(entry.getKey(), new Object[]{null, getter, setter}); + } + } + } + Set> mappedProperties = new HashSet>(fieldsGettersAndSetters.size()); + for (Map.Entry entry : fieldsGettersAndSetters.entrySet()) { + String propertyName = entry.getKey(); + Field field = (Field) entry.getValue()[0]; + Method getter = (Method) entry.getValue()[1]; + Method setter = (Method) entry.getValue()[2]; + Map, Annotation> annotations = scanPropertyAnnotations(field, getter); + AnnotationChecks.validateAnnotations(propertyName, annotations, allowed); + if (isTransient(propertyName, field, getter, setter, annotations)) { + LOGGER.debug(String.format("Property '%s' is transient and will not be mapped", propertyName)); + continue; + } + if (!annotations.containsKey(Computed.class) && field == null && getter == null) { + throw new IllegalArgumentException(String.format("Property '%s' is not readable", propertyName)); + } + if (field == null && setter == null) { + throw new IllegalArgumentException(String.format("Property '%s' is not writable", propertyName)); + } + String mappedName = inferMappedName(entityClass, propertyName, annotations); + MappedProperty property = createMappedProperty(entityClass, propertyName, mappedName, field, getter, setter, annotations); + mappedProperties.add(property); + } + return mappedProperties; + } + + /** + * Returns {@code true} if the given property is transient, + * {@code false} otherwise. + *

    + * If this method returns {@code true} the given property will not be mapped. + * The implementation provided here relies on the + * {@link #setPropertyTransienceStrategy(PropertyTransienceStrategy) transience strategy} + * and the {@link #setTransientPropertyNames(Set) transient property names} + * configured on this mapper. + *

    + * Subclasses may override this method to take full control of which properties + * should be mapped and which should be considered transient. + * + * @param propertyName the property name; may not be {@code null}. + * @param field the property field; may be {@code null}. + * @param getter the getter method for this property; may be {@code null}. + * @param setter the setter method for this property; may be {@code null}. + * @param annotations the annotations found on this property; may be empty but never {@code null}. + * @return {@code true} if the given property is transient (i.e., non-mapped), {@code false} otherwise. + */ + @SuppressWarnings("unused") + protected boolean isTransient(String propertyName, Field field, Method getter, Method setter, Map, Annotation> annotations) { + if (propertyTransienceStrategy == PropertyTransienceStrategy.OPT_OUT) + return annotations.containsKey(Transient.class) + || (transientPropertyNames.contains(propertyName) + && Collections.disjoint(annotations.keySet(), NON_TRANSIENT_ANNOTATIONS)); + else + return Collections.disjoint(annotations.keySet(), NON_TRANSIENT_ANNOTATIONS); + } + + /** + * Locates a getter method for the given mapped class and given property. + *

    + * Most users should rely on the implementation provided here. + * It is however possible to return any non-standard method, as long as it does + * not take parameters, and its return type is assignable to (and covariant with) the property's type. + * This might be particularly useful for boolean properties whose names are verbs, e.g. "{@code hasAccount}": + * one could then return the non-standard method {@code boolean hasAccount()} as its getter. + *

    + * This method is never called if {@link PropertyAccessStrategy#isGetterSetterScanAllowed()} returns {@code false}. + * Besides, implementors are free to return {@code null} if access to the property through reflection is not required + * (in which case, they will likely have to provide a custom implementation of {@link MappedProperty}). + * + * @param mappedClass The mapped class; this is necessarily a class annotated with + * either {@link Table @Table} or + * {@link UDT @UDT}. + * @param property The property to locate a getter for; never {@code null}. + * @return The getter method for the given base class and given property, or {@code null} if no getter was found, or reflection is not required. + */ + protected Method locateGetter(@SuppressWarnings("unused") Class mappedClass, PropertyDescriptor property) { + return property.getReadMethod(); + } + + /** + * Locates a setter method for the given mapped class and given property. + *

    + * Most users should rely on the implementation provided here. + * It is however possible to return any non-standard method, as long as it accepts one single parameter type + * that is contravariant with the property's type. + *

    + * This method is never called if {@link PropertyAccessStrategy#isGetterSetterScanAllowed()} returns {@code false}. + * Besides, implementors are free to return {@code null} if access to the property through reflection is not required + * (in which case, they will likely have to provide a custom implementation of {@link MappedProperty}). + * + * @param mappedClass The mapped class; this is necessarily a class annotated with + * either {@link Table @Table} or + * {@link UDT @UDT}. + * @param property The property to locate a setter for; never {@code null}. + * @return The setter method for the given base class and given property, or {@code null} if no setter was found, or reflection is not required. + */ + protected Method locateSetter(Class mappedClass, PropertyDescriptor property) { + Method setter = property.getWriteMethod(); + if (setter == null) { + // JAVA-984: look for a "relaxed" setter, ie. a setter whose return type may be anything + String propertyName = property.getName(); + String setterName = "set" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); + try { + Method m = mappedClass.getMethod(setterName, property.getPropertyType()); + if (!Modifier.isStatic(m.getModifiers())) + setter = m; + } catch (NoSuchMethodException ignored) { + } + } + return setter; + } + + /** + * Infers the Cassandra object name corresponding to given the property name. + *

    + * Most users should rely on the implementation provided here. + * It relies on annotation values and ultimately resorts to the + * {@link NamingStrategy} configured on this mapper. + *

    + * Subclasses may override this method if they need full control + * over generating Cassandra object names. + * + * @param mappedClass The mapped class; this is necessarily a class annotated with + * either {@link Table @Table} or + * {@link UDT @UDT}. + * @param propertyName The property name; may not be {@code null} nor empty. + * @param annotations The property annotations (found on its field and getter method); may not be {@code null} but can be empty. + * @return The inferred Cassandra object name. + */ + protected String inferMappedName(@SuppressWarnings("unused") Class mappedClass, String propertyName, Map, Annotation> annotations) { + if (annotations.containsKey(Computed.class)) { + String expression = ((Computed) annotations.get(Computed.class)).value(); + if (expression.isEmpty()) + throw new IllegalArgumentException(String.format("Property '%s': attribute 'value' of annotation @Computed is mandatory for computed properties", propertyName)); + return expression; + } + + // If a name is explicitly provided with @Column or @Field, use it + boolean caseSensitive = false; + String mappedName = null; + if (annotations.containsKey(Column.class)) { + Column column = (Column) annotations.get(Column.class); + caseSensitive = column.caseSensitive(); + if (!column.name().isEmpty()) + mappedName = column.name(); + } else if (annotations.containsKey(com.datastax.driver.mapping.annotations.Field.class)) { + com.datastax.driver.mapping.annotations.Field udtMappedField = + (com.datastax.driver.mapping.annotations.Field) annotations.get(com.datastax.driver.mapping.annotations.Field.class); + caseSensitive = udtMappedField.caseSensitive(); + if (!udtMappedField.name().isEmpty()) + mappedName = udtMappedField.name(); + } + if (mappedName != null) { + return caseSensitive ? Metadata.quote(mappedName) : mappedName.toLowerCase(); + } + + // Otherwise delegate to the naming strategy + mappedName = namingStrategy.toCassandraName(propertyName); + if (mappedName == null || mappedName.isEmpty()) + throw new IllegalArgumentException(String.format("Property '%s': could not infer mapped name", propertyName)); + return Metadata.quoteIfNecessary(mappedName); + } + + /** + * Creates a {@link MappedProperty} instance. + *

    + * Instances returned by the implementation below will use the Java reflection API to read and write values. + * Subclasses may override this method if they are capable of accessing + * properties without incurring the cost of reflection. + * + * @param mappedClass The mapped class; this is necessarily a class annotated with + * either {@link Table @Table} or + * {@link UDT @UDT}. + * @param propertyName The property name; may not be {@code null} nor empty. + * @param mappedName The mapped name; may not be {@code null} nor empty. + * @param field The property field; may be {@code null}. + * @param getter The property getter method; may be {@code null}. + * @param setter The property setter method; may be {@code null}. + * @param annotations The property annotations (found on its field and getter method); may not be {@code null} but can be empty. + * @return a newly-allocated {@link MappedProperty} instance. + */ + protected MappedProperty createMappedProperty(Class mappedClass, String propertyName, String mappedName, Field field, Method getter, Method setter, Map, Annotation> annotations) { + return DefaultMappedProperty.create(mappedClass, propertyName, mappedName, field, getter, setter, annotations); + } + + private static Map scanFields(List> classHierarchy) { + HashMap fields = new HashMap(); + for (Class clazz : classHierarchy) { + for (Field field : clazz.getDeclaredFields()) { + if (field.isSynthetic() || Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())) + continue; + // never override a more specific field masking another one declared in a superclass + if (!fields.containsKey(field.getName())) + fields.put(field.getName(), field); + } + } + return fields; + } + + private static Map scanProperties(List> classHierarchy) { + Map properties = new HashMap(); + for (Class clazz : classHierarchy) { + // each time extract only current class properties + BeanInfo beanInfo; + try { + beanInfo = Introspector.getBeanInfo(clazz, clazz.getSuperclass()); + } catch (IntrospectionException e) { + throw Throwables.propagate(e); + } + for (PropertyDescriptor property : beanInfo.getPropertyDescriptors()) { + if (!properties.containsKey(property.getName())) { + properties.put(property.getName(), property); + } + } + } + return properties; + } + + private static Map, Annotation> scanPropertyAnnotations(Field field, Method getter) { + Map, Annotation> annotations = new HashMap, Annotation>(); + // annotations on getters should have precedence over annotations on fields + if (field != null) + scanFieldAnnotations(field, annotations); + if (getter != null) + scanMethodAnnotations(getter, annotations); + return annotations; + } + + private static Map, Annotation> scanFieldAnnotations(Field field, Map, Annotation> annotations) { + for (Annotation annotation : field.getAnnotations()) { + annotations.put(annotation.annotationType(), annotation); + } + return annotations; + } + + private static Map, Annotation> scanMethodAnnotations(Method method, Map, Annotation> annotations) { + // 1. direct method annotations + for (Annotation annotation : method.getAnnotations()) { + annotations.put(annotation.annotationType(), annotation); + } + // 2. Class hierarchy: check for annotations in overridden methods in superclasses + Class getterClass = method.getDeclaringClass(); + for (Class clazz = getterClass.getSuperclass(); clazz != null && !clazz.equals(Object.class); clazz = clazz.getSuperclass()) { + maybeAddOverriddenMethodAnnotations(annotations, method, clazz); + } + // 3. Interfaces: check for annotations in implemented interfaces + for (Class clazz = getterClass; !clazz.equals(Object.class); clazz = clazz.getSuperclass()) { + for (Class itf : clazz.getInterfaces()) { + maybeAddOverriddenMethodAnnotations(annotations, method, itf); + } + } + return annotations; + } + + private static void maybeAddOverriddenMethodAnnotations(Map, Annotation> annotations, Method getter, Class clazz) { + try { + Method overriddenGetter = clazz.getDeclaredMethod(getter.getName(), (Class[]) getter.getParameterTypes()); + for (Annotation annotation : overriddenGetter.getAnnotations()) { + // do not override a more specific version of the annotation type being scanned + if (!annotations.containsKey(annotation.annotationType())) + annotations.put(annotation.annotationType(), annotation); + } + } catch (NoSuchMethodException e) { + //ok + } + } + + private static T tryMakeAccessible(T object) { + if (object != null && !object.isAccessible()) { + try { + object.setAccessible(true); + } catch (SecurityException e) { + // ok + } + } + return object; + } + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java index 89bf4bd8797..b494763e56f 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java @@ -29,10 +29,10 @@ class EntityMapper { final ConsistencyLevel writeConsistency; final ConsistencyLevel readConsistency; - final List partitionKeys = new ArrayList(); - final List clusteringColumns = new ArrayList(); + final List> partitionKeys = new ArrayList>(); + final List> clusteringColumns = new ArrayList>(); - final List allColumns = new ArrayList(); + final List> allColumns = new ArrayList>(); EntityMapper(Class entityClass, String keyspace, String table, ConsistencyLevel writeConsistency, ConsistencyLevel readConsistency) { this.entityClass = entityClass; @@ -46,11 +46,11 @@ int primaryKeySize() { return partitionKeys.size() + clusteringColumns.size(); } - PropertyMapper getPrimaryKeyColumn(int i) { + AliasedMappedProperty getPrimaryKeyColumn(int i) { return i < partitionKeys.size() ? partitionKeys.get(i) : clusteringColumns.get(i - partitionKeys.size()); } - void addColumns(List pks, List ccs, List rgs) { + void addColumns(List> pks, List> ccs, List> rgs) { partitionKeys.addAll(pks); clusteringColumns.addAll(ccs); allColumns.addAll(pks); diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/HierarchyScanStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/HierarchyScanStrategy.java new file mode 100644 index 00000000000..b3ec589b14e --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/HierarchyScanStrategy.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import java.util.List; + +/** + * A strategy to determine which ancestors of mapped classes should be scanned for mapped properties. + */ +public interface HierarchyScanStrategy { + + /** + * Computes the ancestors of the given base class, optionally + * filtering out any ancestor that should not be scanned. + *

    + * Implementors should always include {@code mappedClass} + * in the returned list. + * + * @param mappedClass The mapped class; this is necessarily a class annotated with + * either {@link com.datastax.driver.mapping.annotations.Table @Table} or + * {@link com.datastax.driver.mapping.annotations.UDT @UDT}. + * @return the list of classes that should be scanned, + * including {@code mappedClass} itself and its ancestors, + * ordered from the lowest (closest to {@code mappedClass}) + * to the highest (or farthest from {@code mappedClass}). + */ + List> filterClassHierarchy(Class mappedClass); + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedClassesOnlyHierarchyScanStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedClassesOnlyHierarchyScanStrategy.java new file mode 100644 index 00000000000..5a80a86d6d4 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedClassesOnlyHierarchyScanStrategy.java @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import java.util.Collections; +import java.util.List; + +/** + * A {@link HierarchyScanStrategy} that excludes all ancestors of mapped classes, thus + * restricting class scan to the mapped classes themselves. + *

    + * This strategy can be used instead of {@link DefaultHierarchyScanStrategy} to + * achieve pre-JAVA-541 + * behavior. + */ +public class MappedClassesOnlyHierarchyScanStrategy implements HierarchyScanStrategy { + + @Override + public List> filterClassHierarchy(Class mappedClass) { + return Collections.>singletonList(mappedClass); + } +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedProperty.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedProperty.java new file mode 100644 index 00000000000..ed424f2ed4e --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedProperty.java @@ -0,0 +1,158 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.TypeCodec; +import com.google.common.reflect.TypeToken; + +/** + * A Java property that is mapped to either a table column, + * a user-defined type (UDT) field, or + * a CQL expression such as {@code "ttl(col1)"}. + */ +public interface MappedProperty { + + /** + * Returns this property's name. + * + * @return this property's name; may not be {@code null}. + */ + String getPropertyName(); + + /** + * Returns the name of the table column or + * UDT field that this property maps to. + *

    + * Note that case-sensitive identifiers should + * be quoted with {@link com.datastax.driver.core.Metadata#quote} + *

    + * In case of a {@link #isComputed() computed} property, + * this method should return the CQL expression to compute + * the property value, e.g. {@code "ttl(col1)"}. + * + * @return the name of the table column or + * UDT field that this property maps to, or the CQL expression + * in case of computed properties; may not be {@code null}. + */ + String getMappedName(); + + /** + * Returns this property's type. + * + * @return this property's type; may not be {@code null}. + */ + TypeToken getPropertyType(); + + /** + * Returns the {@link TypeCodec codec} to use + * to serialize and deserialize this property. + *

    + * If this method returns {@code null}, then a default codec + * for the property's {@link #getPropertyType() type} + * will be used. + * + * @return {@link TypeCodec codec} to use + * to serialize and deserialize this property. + */ + TypeCodec getCustomCodec(); + + /** + * Returns {@code true} if this property is + * part of the table's partition key, + * {@code false} otherwise. + *

    + * This method has no effect if this property + * is mapped to a UDT field or a CQL expression. + * + * @return {@code true} if this property is + * part of the table's partition key, + * {@code false} otherwise. + * @see com.datastax.driver.mapping.annotations.PartitionKey + */ + boolean isPartitionKey(); + + /** + * Returns {@code true} if this property is + * a clustering column, + * {@code false} otherwise. + *

    + * This method has no effect if this property + * is mapped to a UDT field or a CQL expression. + * + * @return {@code true} if this property is + * a clustering column, + * {@code false} otherwise. + * @see com.datastax.driver.mapping.annotations.ClusteringColumn + */ + boolean isClusteringColumn(); + + /** + * Returns this property's zero-based position + * among partition key columns or clustering columns. + *

    + * For example, assuming the following primary key definition: + * {@code PRIMARY KEY ((col1, col2), col3, col4)}, + * {@code col1} has position 0 (i.e. first partition key column), + * {@code col2} has position 1 (i.e. second partition key column), + * {@code col3} has position 0 (i.e. first clustering key column), + * {@code col4} has position 1 (i.e. second clustering key column), + *

    + * This method has no effect if this property + * is not part of the primary key, or if it is + * mapped to a UDT field or a CQL expression. + * Implementors are encouraged to return {@code -1} in these + * situations. + * + * @return this property's zero-based position + * among partition key columns or clustering columns. + */ + int getPosition(); + + /** + * Returns {@code true} if this property is computed, + * i.e. if it represents the result of a CQL expression + * such as {@code "ttl(col1)"}, + * {@code false} otherwise. + *

    + * Computed properties are not allowed with protocol v1. + *

    + * Also note that computed properties are read-only. + * + * @return {@code true} if this property is computed, + * {@code false} otherwise. + * @see com.datastax.driver.mapping.annotations.Computed + */ + boolean isComputed(); + + /** + * Reads the current value of this property in the given {@code entity}. + * + * @param entity The instance to read the property from; may not be {@code null}. + * @return The property value. + * @throws IllegalArgumentException if the property cannot be read. + */ + T getValue(Object entity); + + /** + * Writes the given value to this property in the given {@code entity}. + * + * @param entity The instance to write the property to; may not be {@code null}. + * @param value The property value. + * @throws IllegalArgumentException if the property cannot be written. + */ + void setValue(Object entity, T value); + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java index 1d16fed5313..4730683a946 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java @@ -29,10 +29,10 @@ class MappedUDTCodec extends TypeCodec.AbstractUDTCodec { private final UserType cqlUserType; private final Class udtClass; - private final Map columnMappers; + private final Map> columnMappers; private final CodecRegistry codecRegistry; - MappedUDTCodec(UserType cqlUserType, Class udtClass, Map columnMappers, MappingManager mappingManager) { + MappedUDTCodec(UserType cqlUserType, Class udtClass, Map> columnMappers, MappingManager mappingManager) { super(cqlUserType, udtClass); this.cqlUserType = cqlUserType; this.udtClass = udtClass; @@ -51,52 +51,64 @@ Class getUdtClass() { @Override protected ByteBuffer serializeField(T source, String fieldName, ProtocolVersion protocolVersion) { - PropertyMapper propertyMapper = columnMappers.get(fieldName); + @SuppressWarnings("unchecked") + AliasedMappedProperty aliasedMappedProperty = (AliasedMappedProperty) columnMappers.get(fieldName); - if (propertyMapper == null) + if (aliasedMappedProperty == null) return null; - Object value = propertyMapper.getValue(source); + Object value = aliasedMappedProperty.mappedProperty.getValue(source); - TypeCodec codec = propertyMapper.customCodec; + TypeCodec codec = aliasedMappedProperty.mappedProperty.getCustomCodec(); if (codec == null) - codec = codecRegistry.codecFor(cqlUserType.getFieldType(propertyMapper.columnName), propertyMapper.javaType); + codec = codecRegistry.codecFor(cqlUserType.getFieldType( + aliasedMappedProperty.mappedProperty.getMappedName()), + aliasedMappedProperty.mappedProperty.getPropertyType()); return codec.serialize(value, protocolVersion); } @Override protected T deserializeAndSetField(ByteBuffer input, T target, String fieldName, ProtocolVersion protocolVersion) { - PropertyMapper propertyMapper = columnMappers.get(fieldName); - if (propertyMapper != null) { - TypeCodec codec = propertyMapper.customCodec; + @SuppressWarnings("unchecked") + AliasedMappedProperty aliasedMappedProperty = (AliasedMappedProperty) columnMappers.get(fieldName); + if (aliasedMappedProperty != null) { + TypeCodec codec = aliasedMappedProperty.mappedProperty.getCustomCodec(); if (codec == null) - codec = codecRegistry.codecFor(cqlUserType.getFieldType(propertyMapper.columnName), propertyMapper.javaType); - propertyMapper.setValue(target, codec.deserialize(input, protocolVersion)); + codec = codecRegistry.codecFor(cqlUserType.getFieldType( + aliasedMappedProperty.mappedProperty.getMappedName()), + aliasedMappedProperty.mappedProperty.getPropertyType()); + aliasedMappedProperty.mappedProperty.setValue(target, codec.deserialize(input, protocolVersion)); } return target; } @Override protected String formatField(T source, String fieldName) { - PropertyMapper propertyMapper = columnMappers.get(fieldName); - if (propertyMapper == null) + @SuppressWarnings("unchecked") + AliasedMappedProperty aliasedMappedProperty = (AliasedMappedProperty) columnMappers.get(fieldName); + if (aliasedMappedProperty == null) return null; - Object value = propertyMapper.getValue(source); - TypeCodec codec = propertyMapper.customCodec; + Object value = aliasedMappedProperty.mappedProperty.getValue(source); + TypeCodec codec = aliasedMappedProperty.mappedProperty.getCustomCodec(); if (codec == null) - codec = codecRegistry.codecFor(cqlUserType.getFieldType(propertyMapper.columnName), propertyMapper.javaType); + codec = codecRegistry.codecFor(cqlUserType.getFieldType( + aliasedMappedProperty.mappedProperty.getMappedName()), + aliasedMappedProperty.mappedProperty.getPropertyType()); return codec.format(value); } @Override protected T parseAndSetField(String input, T target, String fieldName) { - PropertyMapper propertyMapper = columnMappers.get(fieldName); - if (propertyMapper != null) { - TypeCodec codec = propertyMapper.customCodec; + @SuppressWarnings("unchecked") + AliasedMappedProperty aliasedMappedProperty = (AliasedMappedProperty) columnMappers.get(fieldName); + if (aliasedMappedProperty != null) { + TypeCodec codec = aliasedMappedProperty.mappedProperty.getCustomCodec(); if (codec == null) - codec = codecRegistry.codecFor(cqlUserType.getFieldType(propertyMapper.columnName), propertyMapper.javaType); - propertyMapper.setValue(target, codec.parse(input)); + codec = codecRegistry.codecFor(cqlUserType.getFieldType( + aliasedMappedProperty.mappedProperty.getMappedName()), + aliasedMappedProperty.mappedProperty.getPropertyType()); + aliasedMappedProperty.mappedProperty.setValue(target, codec.parse(input)); } return target; } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java index 17273f9e927..c3286f761f9 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java @@ -105,7 +105,7 @@ Session session() { return manager.getSession(); } - ListenableFuture getPreparedQueryAsync(QueryType type, Set columns, EnumMap options) { + ListenableFuture getPreparedQueryAsync(QueryType type, Set columns, EnumMap options) { final MapperQueryKey pqk = new MapperQueryKey(type, columns, options); ListenableFuture existingFuture = preparedQueries.get(pqk); @@ -142,7 +142,7 @@ public void onFailure(Throwable t) { } ListenableFuture getPreparedQueryAsync(QueryType type, EnumMap options) { - return getPreparedQueryAsync(type, Collections.emptySet(), options); + return getPreparedQueryAsync(type, Collections.emptySet(), options); } Class getMappedClass() { @@ -216,12 +216,12 @@ public Statement saveQuery(T entity, Option... options) { } private ListenableFuture saveQueryAsync(T entity, final EnumMap options) { - final Map values = new HashMap(); + final Map values = new HashMap(); boolean saveNullFields = shouldSaveNullFields(options); - for (PropertyMapper col : mapper.allColumns) { - Object value = col.getValue(entity); - if (!col.isComputed() && (saveNullFields || value != null)) { + for (AliasedMappedProperty col : mapper.allColumns) { + Object value = col.mappedProperty.getValue(entity); + if (!col.mappedProperty.isComputed() && (saveNullFields || value != null)) { values.put(col, value); } } @@ -231,8 +231,8 @@ private ListenableFuture saveQueryAsync(T entity, final EnumMap< public BoundStatement apply(PreparedStatement input) { BoundStatement bs = input.bind(); int i = 0; - for (Map.Entry entry : values.entrySet()) { - PropertyMapper mapper = entry.getKey(); + for (Map.Entry entry : values.entrySet()) { + AliasedMappedProperty mapper = entry.getKey(); Object value = entry.getValue(); setObject(bs, i++, value, mapper); } @@ -255,12 +255,12 @@ private static boolean shouldSaveNullFields(EnumMap options return option == null || option.saveNullFields; } - private static void setObject(BoundStatement bs, int i, Object value, PropertyMapper mapper) { - TypeCodec customCodec = mapper.customCodec; + private static void setObject(BoundStatement bs, int i, T value, AliasedMappedProperty mapper) { + TypeCodec customCodec = mapper.mappedProperty.getCustomCodec(); if (customCodec != null) bs.set(i, value, customCodec); else - bs.set(i, value, mapper.javaType); + bs.set(i, value, mapper.mappedProperty.getPropertyType()); } /** @@ -393,9 +393,12 @@ public BoundStatement apply(PreparedStatement input) { BoundStatement bs = new MapperBoundStatement(input); int i = 0; for (Object value : primaryKeys) { - PropertyMapper column = mapper.getPrimaryKeyColumn(i); + @SuppressWarnings("unchecked") + AliasedMappedProperty column = (AliasedMappedProperty) mapper.getPrimaryKeyColumn(i); if (value == null) { - throw new IllegalArgumentException(String.format("Invalid null value for PRIMARY KEY column %s (argument %d)", column.columnName, i)); + throw new IllegalArgumentException( + String.format("Invalid null value for PRIMARY KEY column %s (argument %d)", + column.mappedProperty.getMappedName(), i)); } setObject(bs, i++, value, column); } @@ -559,7 +562,7 @@ public Statement deleteQuery(Object... objects) { private ListenableFuture deleteQueryAsync(T entity, EnumMap options) { List pks = new ArrayList(); for (int i = 0; i < mapper.primaryKeySize(); i++) { - pks.add(mapper.getPrimaryKeyColumn(i).getValue(entity)); + pks.add(mapper.getPrimaryKeyColumn(i).mappedProperty.getValue(entity)); } return deleteQueryAsync(pks, options); } @@ -598,9 +601,11 @@ public BoundStatement apply(PreparedStatement input) { int columnNumber = 0; for (Object value : primaryKey) { - PropertyMapper column = mapper.getPrimaryKeyColumn(columnNumber); + @SuppressWarnings("unchecked") + AliasedMappedProperty column = (AliasedMappedProperty) mapper.getPrimaryKeyColumn(columnNumber); if (value == null) { - throw new IllegalArgumentException(String.format("Invalid null value for PRIMARY KEY column %s (argument %d)", column.columnName, i)); + throw new IllegalArgumentException(String.format("Invalid null value for PRIMARY KEY column %s (argument %d)", + column.mappedProperty.getMappedName(), i)); } setObject(bs, i++, value, column); columnNumber++; @@ -1292,14 +1297,14 @@ public int hashCode() { private static class MapperQueryKey { private final QueryType queryType; private final Set optionKeys; - private final Set columns; + private final Set columns; - MapperQueryKey(QueryType queryType, Set propertyMappers, EnumMap allOptions) { + MapperQueryKey(QueryType queryType, Set aliasedMappedProperties, EnumMap allOptions) { Preconditions.checkNotNull(queryType); Preconditions.checkNotNull(allOptions); - Preconditions.checkNotNull(propertyMappers); + Preconditions.checkNotNull(aliasedMappedProperties); this.queryType = queryType; - this.columns = propertyMappers; + this.columns = aliasedMappedProperties; ImmutableSet.Builder optionKeysBuilder = ImmutableSet.builder(); for (Option option : allOptions.values()) { if (option.modifiesQueryString()) { diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingConfiguration.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingConfiguration.java new file mode 100644 index 00000000000..76b75410987 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingConfiguration.java @@ -0,0 +1,76 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +/** + * The configuration to use for the mappers. + */ +public class MappingConfiguration { + + /** + * Returns a new {@link Builder} instance. + * + * @return a new {@link Builder} instance. + */ + public static MappingConfiguration.Builder builder() { + return new MappingConfiguration.Builder(); + } + + /** + * Builder for {@link MappingConfiguration} instances. + */ + public static class Builder { + + private PropertyMapper propertyMapper = new DefaultPropertyMapper(); + + /** + * Sets the {@link PropertyMapper property access strategy} to use. + * + * @param propertyMapper the {@link PropertyMapper property access strategy} to use. + * @return this {@link Builder} instance (to allow for fluent builder pattern). + */ + public Builder withPropertyMapper(PropertyMapper propertyMapper) { + this.propertyMapper = propertyMapper; + return this; + } + + /** + * Builds a new instance of {@link MappingConfiguration} with this builder's + * settings. + * + * @return a new instance of {@link MappingConfiguration} + */ + public MappingConfiguration build() { + return new MappingConfiguration(propertyMapper); + } + } + + private final PropertyMapper propertyMapper; + + private MappingConfiguration(PropertyMapper propertyMapper) { + this.propertyMapper = propertyMapper; + } + + /** + * Returns the {@link PropertyMapper}. + * + * @return the {@link PropertyMapper}. + */ + public PropertyMapper getPropertyMapper() { + return propertyMapper; + } + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java index bfaa5e96c55..56faabaf5a4 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java @@ -22,7 +22,9 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.util.*; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; import java.util.concurrent.ConcurrentHashMap; /** @@ -33,6 +35,7 @@ public class MappingManager { private static final Logger LOGGER = LoggerFactory.getLogger(MappingManager.class); private final Session session; + private final MappingConfiguration configuration; final boolean isCassandraV1; private final ConcurrentHashMap, Mapper> mappers = new ConcurrentHashMap, Mapper>(); @@ -41,7 +44,8 @@ public class MappingManager { /** - * Creates a new {@code MappingManager} using the provided {@code Session}. + * Creates a new {@code MappingManager} using the provided {@code Session} with default + * {@code MapperConfiguration}. *

    * Note that this constructor forces the initialization of the session (see * {@link #MappingManager(Session, ProtocolVersion)} if that is a problem for you). @@ -58,7 +62,8 @@ private static ProtocolVersion getProtocolVersion(Session session) { } /** - * Creates a new {@code MappingManager} using the provided {@code Session}. + * Creates a new {@code MappingManager} using the provided {@code Session} with default + * {@code MapperConfiguration}. *

    * This constructor is only provided for backward compatibility: before 2.1.7, {@code MappingManager} could be * built from an uninitialized session; since 2.1.7, the mapper needs to know the active protocol version to @@ -70,7 +75,39 @@ private static ProtocolVersion getProtocolVersion(Session session) { * @since 2.1.7 */ public MappingManager(Session session, ProtocolVersion protocolVersion) { + this(session, MappingConfiguration.builder().build(), protocolVersion); + } + + /** + * Creates a new {@code MappingManager} using the provided {@code Session} with custom configuration + * to be inherited to each instantiated mapper. + *

    + * Note that this constructor forces the initialization of the session (see + * {@link #MappingManager(Session, ProtocolVersion)} if that is a problem for you). + * + * @param session the {@code Session} to use. + * @param configuration the {@code MapperConfiguration} to use be used as default for instantiated mappers. + */ + public MappingManager(Session session, MappingConfiguration configuration) { + this(session, configuration, getProtocolVersion(session)); + } + + /** + * Creates a new {@code MappingManager} using the provided {@code Session} with default + * {@code MapperConfiguration}. + *

    + * This constructor is only provided for backward compatibility: before 2.1.7, {@code MappingManager} could be + * built from an uninitialized session; since 2.1.7, the mapper needs to know the active protocol version to + * adapt its internal requests, so {@link #MappingManager(Session)} will now initialize the session if needed. + * If you rely on the session not being initialized, use this constructor and provide the version manually. + * + * @param session the {@code Session} to use. + * @param configuration the {@code MapperConfiguration} to use be used as default for instantiated mappers. + * @param protocolVersion the protocol version that will be used with this session. + */ + public MappingManager(Session session, MappingConfiguration configuration, ProtocolVersion protocolVersion) { this.session = session; + this.configuration = configuration; // This is not strictly correct because we could connect to C* 2.0 with the v1 protocol. // But mappers need to make a decision early so that generated queries are compatible, and we don't know in advance // which nodes might join the cluster later. @@ -125,23 +162,23 @@ public void onUserTypeRemoved(UserType type) { @Override public void onUserTypeChanged(UserType current, UserType previous) { synchronized (udtCodecs) { - Set> udtClasses = new HashSet>(); + Set> deletedCodecs = new HashSet>(); Iterator> it = udtCodecs.values().iterator(); while (it.hasNext()) { MappedUDTCodec codec = it.next(); if (previous.equals(codec.getCqlType())) { LOGGER.warn("User type {} has been altered; existing mappers for @UDT annotated {} might not work properly anymore", previous, codec.getUdtClass()); - udtClasses.add(codec.getUdtClass()); + deletedCodecs.add(codec); it.remove(); } } - for (Class udtClass : udtClasses) { + for (MappedUDTCodec deletedCodec : deletedCodecs) { // try to register an updated version of the previous codec try { - getUDTCodec(udtClass); + getUDTCodec(deletedCodec.getUdtClass()); } catch (Exception e) { - LOGGER.error("Could not update mapping for @UDT annotated " + udtClass, e); + LOGGER.error("Could not update mapping for @UDT annotated " + deletedCodec.getUdtClass(), e); } } } @@ -151,9 +188,9 @@ public void onUserTypeChanged(UserType current, UserType previous) { } /** - * The underlying {@code Session} used by this manager. + * The underlying {@link Session} used by this manager. *

    - * Note that you can get obtain the {@code Cluster} object corresponding + * Note that you can get obtain the {@link Cluster} object corresponding * to that session using {@code getSession().getCluster()}. *

    * It is inadvisable to close the returned Session while this manager and @@ -165,6 +202,15 @@ public Session getSession() { return session; } + /** + * Returns the {@link MappingConfiguration configuration} used by this manager. + * + * @return the {@link MappingConfiguration configuration} used by this manager. + */ + public MappingConfiguration getConfiguration() { + return configuration; + } + /** * Creates a {@code Mapper} for the provided class (that must be annotated by a * {@link Table} annotation). diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConvention.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConvention.java new file mode 100644 index 00000000000..89d221ccac0 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConvention.java @@ -0,0 +1,81 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import java.util.List; + +/** + * Represent a naming convention (e.g. snake_case, camelCase, etc...) to be used when + * auto-translating java property names to cassandra column names and vice versa. + *

    + * This interface may be implemented to define custom naming convention. + */ +public interface NamingConvention { + + /** + * Receive a property name value and returns an ordered list of Word objects. + * Each word contains a String value and a boolean indicating whether or not + * the value is an abbreviation (In most cases could not be determined). + * Quick examples: + *

      + *
    • Let's consider lowerCamelCase convention and input = "myXMLParser", + * then the output should be: + * [ + * word{value = "my", isAbbreviation = false}, + * word{value = "xml", isAbbreviation = true}, + * word{value = "parser", isAbbreviation = false} + * ]
    • + *
    • Let's consider lower_snake_case convention and input = "myXMLParser", + * then the output may be (since there's no trivial way to determine xml + * to an abbreviation): + * [ + * word{value = "my", isAbbreviation = false}, + * word{value = "xml", isAbbreviation = false}, + * word{value = "parser", isAbbreviation = false} + * ]
    • + *
    + * + * @param input value to split + * @return an ordered list of split Word objects + */ + List split(String input); + + /** + * Receive an ordered list of Word objects and returns a result property name. + * Quick examples: + *
      + *
    • Let's consider lowerCamelCase convention with upperCaseAbbreviations set + * to false, and input = [ + * word{value = "my", isAbbreviation = false}, + * word{value = "xml", isAbbreviation = true}, + * word{value = "parser", isAbbreviation = false} + * ] + * then the output should be "myXmlParser".
    • + *
    • Let's consider upperCamelCase convention with upperCaseAbbreviations set + * to true, and input = [ + * word{value = "my", isAbbreviation = false}, + * word{value = "xml", isAbbreviation = true}, + * word{value = "parser", isAbbreviation = false} + * ] + * then the output should be "MyXMLParser".
    • + *
    + * + * @param input list to translate + * @return the result property name + */ + String join(List input); + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConventions.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConventions.java new file mode 100644 index 00000000000..e0b0dde6cb8 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConventions.java @@ -0,0 +1,328 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import java.util.Arrays; +import java.util.Comparator; +import java.util.LinkedList; +import java.util.List; +import java.util.regex.Pattern; + +/** + * Implementations of industry common naming conventions. + */ +public class NamingConventions { + + /** + * Represents a naming convention where all letters are lower cased, + * and words are not separated by any special character. E.g. "myxmlparser". + */ + public static final NamingConvention LOWER_CASE = new SingleWordNamingConvention(false); + + /** + * Represents a naming convention where all letters are upper cased, + * and words are not separated by any special character. E.g. "MYXMLPARSER". + */ + public static final NamingConvention UPPER_CASE = new SingleWordNamingConvention(true); + + /** + * Represents snake case naming convention, meaning all letters are lower cased, + * and words are separated by an underscore ("_"). E.g. "my_xml_parser". + */ + public static final NamingConvention LOWER_SNAKE_CASE = new CharDelimitedNamingConvention("_", false); + + /** + * Represents snake case naming convention, meaning all letters are upper cased, + * and words are separated by an underscore ("_"). E.g. "MY_XML_PARSER". + */ + public static final NamingConvention UPPER_SNAKE_CASE = new CharDelimitedNamingConvention("_", true); + + /** + * Represents Lisp case naming convention, + * meaning all letters are lower cased, + * and words are separated by a dash sign ("-"). E.g. "my-xml-parser" + */ + public static final NamingConvention LOWER_LISP_CASE = new CharDelimitedNamingConvention("-", false); + + /** + * Represents Lisp case naming convention, + * meaning all letters are upper cased, + * and words are separated by a dash sign ("-"). E.g. "MY-XML-PARSER". + */ + public static final NamingConvention UPPER_LISP_CASE = new CharDelimitedNamingConvention("-", true); + + /** + * Represents the default Camel case naming convention, + * with a lower cased first letter. + * + * @see LowerCamelCase + */ + public static final NamingConvention LOWER_CAMEL_CASE = new LowerCamelCase(); + + /** + * Represents the default Camel case naming convention, + * with an upper cased first letter. + * + * @see UpperCamelCase + */ + public static final NamingConvention UPPER_CAMEL_CASE = new UpperCamelCase(); + + /** + * Represents Camel case + * naming convention with a lower cased first letter. + *

    + * E.g. "myXmlParser" and "myXMLParser". Note that both examples are valid + * lower camel case forms. The first one takes abbreviations as any other + * words where the first letter is upper case, and the rest are lower case + * (hence - "Xml"), while the latter upper cases all letters of an abbreviation + * (hence - "XML"). + *

    + * Additionally, many different Java naming conventions introduce prefixes + * for field naming, some examples: + *

    + * Those prefixes can be supported. For example, if this convention is + * configured with {@code ignorablePrefixes} set to "_" then a field + * named "_myXmlParser" will be split in 3 words only: "my", "Xml", "Parser". + */ + public static class LowerCamelCase extends CamelCase { + + private final boolean upperCaseAbbreviations; + + /** + * @param upperCaseAbbreviations {@code true} to uppercase all abbreviations, + * {@code false} to treat abbreviations as any other word + * @param ignorablePrefixes string prefixes to trim if constant field name prefixes are used + */ + public LowerCamelCase(boolean upperCaseAbbreviations, String... ignorablePrefixes) { + super(ignorablePrefixes); + this.upperCaseAbbreviations = upperCaseAbbreviations; + } + + /** + * @param ignorablePrefixes string prefixes to trim if constant field name prefixes are used + */ + public LowerCamelCase(String... ignorablePrefixes) { + this(false, ignorablePrefixes); + } + + /** + * @param upperCaseAbbreviations {@code true} to uppercase all abbreviations, + * {@code false} to treat abbreviations as any other word + */ + public LowerCamelCase(boolean upperCaseAbbreviations) { + this(upperCaseAbbreviations, new String[0]); + } + + @Override + public String join(List input) { + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < input.size(); i++) { + Word word = input.get(i); + String value; + if (i == 0) { + value = word.getValue().toLowerCase(); + } else if (upperCaseAbbreviations && word.isAbbreviation()) { + value = word.getValue().toUpperCase(); + } else { + value = word.getValue().substring(0, 1).toUpperCase() + word.getValue().substring(1).toLowerCase(); + } + builder.append(value); + } + return builder.toString(); + } + + } + + /** + * Represents Camel case + * naming convention with an upper cased first letter. + *

    + * E.g. "MyXmlParser" and "MyXMLParser". Note that both examples are valid + * upper camel case forms. The first one takes abbreviations as any other + * words where the first letter is upper case, and the rest are lower case + * (hence - "Xml"), while the latter upper cases all letters of an abbreviation + * (hence - "XML"). + *

    + * Additionally, many different Java naming conventions introduce prefixes + * for field naming, some examples: + *

    + * Those prefixes can be supported. For example, if this convention is + * configured with {@code ignorablePrefixes} set to "_" then a field + * named "_MyXmlParser" will be split in 3 words only: "My", "Xml", "Parser". + */ + public static class UpperCamelCase extends CamelCase { + + private final boolean upperCaseAbbreviations; + + /** + * @param upperCaseAbbreviations {@code true} to uppercase all abbreviations, + * {@code false} to treat abbreviations as any other word + * @param ignorablePrefixes string prefixes to trim if constant field name prefixes are used + */ + public UpperCamelCase(boolean upperCaseAbbreviations, String... ignorablePrefixes) { + super(ignorablePrefixes); + this.upperCaseAbbreviations = upperCaseAbbreviations; + } + + /** + * @param ignorablePrefixes string prefixes to trim if constant field name prefixes are used + */ + public UpperCamelCase(String... ignorablePrefixes) { + this(false, ignorablePrefixes); + } + + /** + * @param upperCaseAbbreviations {@code true} to uppercase all abbreviations, + * {@code false} to treat abbreviations as any other word + */ + public UpperCamelCase(boolean upperCaseAbbreviations) { + this(upperCaseAbbreviations, new String[0]); + } + + @Override + public String join(List input) { + StringBuilder builder = new StringBuilder(); + for (Word word : input) { + String value; + if (upperCaseAbbreviations && word.isAbbreviation()) { + value = word.getValue().toUpperCase(); + } else { + value = word.getValue().substring(0, 1).toUpperCase() + word.getValue().substring(1).toLowerCase(); + } + builder.append(value); + } + return builder.toString(); + } + + } + + public abstract static class CamelCase implements NamingConvention { + + private static final Pattern SPLIT_PATTERN = Pattern.compile(String.format("%s|%s|%s", + "(?<=[A-Z])(?=[A-Z][a-z])", + "(?<=[^A-Z])(?=[A-Z])", + "(?<=[A-Za-z])(?=[^A-Za-z])" + )); + + private static final Pattern ALL_UPPERCASE_PATTERN = Pattern.compile("([A-Z])*"); + + private static final Comparator STRING_LENGTH_COMPARATOR = new Comparator() { + @Override + public int compare(String o1, String o2) { + return o2.length() - o1.length(); + } + }; + + private final Pattern ignorablePrefixPattern; + + protected CamelCase(String... ignorablePrefixes) { + Arrays.sort(ignorablePrefixes, STRING_LENGTH_COMPARATOR); + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < ignorablePrefixes.length; i++) { + if (i > 0) { + builder.append("|"); + } + builder.append("^"); + builder.append(ignorablePrefixes[i]); + } + ignorablePrefixPattern = Pattern.compile(builder.toString()); + } + + @Override + public List split(String input) { + List result = new LinkedList(); + // slice all ignorable prefixes, then split + for (String value : SPLIT_PATTERN.split(ignorablePrefixPattern.matcher(input).replaceAll(""))) { + // if all uppercase, mark as abbreviation (e.g. MyXMLParser) + boolean isAbbreviation = ALL_UPPERCASE_PATTERN.matcher(value).matches(); + Word word = new Word(value, isAbbreviation); + result.add(word); + } + return result; + } + + } + + public static class CharDelimitedNamingConvention implements NamingConvention { + + private final String delimiter; + + private final boolean isUpperCase; + + protected CharDelimitedNamingConvention(String delimiter, boolean isUpperCase) { + this.delimiter = delimiter; + this.isUpperCase = isUpperCase; + } + + @Override + public List split(String input) { + List result = new LinkedList(); + for (String value : input.split(delimiter)) { + result.add(new Word(value)); + } + return result; + } + + @Override + public String join(List input) { + StringBuilder builder = new StringBuilder(); + for (int i = 0; i < input.size(); i++) { + if (i > 0) { + builder.append(delimiter); + } + builder.append(input.get(i).getValue()); + } + String result = builder.toString(); + return isUpperCase ? result.toUpperCase() : result.toLowerCase(); + } + + } + + public static class SingleWordNamingConvention implements NamingConvention { + + private final boolean isUpperCase; + + protected SingleWordNamingConvention(boolean isUpperCase) { + this.isUpperCase = isUpperCase; + } + + @Override + public List split(String input) { + List result = new LinkedList(); + result.add(new Word(input)); + return result; + } + + @Override + public String join(List input) { + StringBuilder builder = new StringBuilder(); + for (Word word : input) { + builder.append(word.getValue()); + } + String result = builder.toString(); + return isUpperCase ? result.toUpperCase() : result.toLowerCase(); + } + + } +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingStrategy.java new file mode 100644 index 00000000000..6758dfd7608 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingStrategy.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.mapping.annotations.Column; +import com.datastax.driver.mapping.annotations.Field; + +/** + * Determines how Java property names are translated to Cassandra column/field names for a mapped + * class. + *

    + * This will be used for any property that doesn't have an explicit name provided (via a + * {@link Column} or {@link Field} annotation). + *

    + * If you need to implement your own strategy, the most straightforward approach is to build a + * {@link DefaultNamingStrategy#DefaultNamingStrategy(NamingConvention, NamingConvention) + * DefaultNamingStrategy with explicit naming conventions}. + */ +public interface NamingStrategy { + + /** + * Infers a Cassandra column/field name from a Java property name. + * + * @param javaPropertyName the name of the Java property. Depending on the + * {@link DefaultPropertyMapper#setPropertyAccessStrategy(PropertyAccessStrategy) + * property access strategy}, this might the name of the Java field, or + * be inferred from a getter/setter based on the usual Java beans + * conventions. + * @return the name of the Cassandra column or field. If you want the mapping to be + * case-insensitive, this should be in lower case. + */ + String toCassandraName(String javaPropertyName); + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyAccessStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyAccessStrategy.java new file mode 100644 index 00000000000..d1eda3178e2 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyAccessStrategy.java @@ -0,0 +1,61 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +/** + * A strategy to determine how mapped properties are discovered, + * and how to access them. + */ +public enum PropertyAccessStrategy { + + /** + * Use getters and setters exclusively. These must be available for all mapped properties. + */ + GETTERS_AND_SETTERS, + + /** + * Use field access exclusively. Fields do not need to be declared public, + * the driver will attempt to make them accessible via reflection if required. + */ + FIELDS, + + /** + * Use getters and setters preferably, and if these are not available, + * use field access. Fields do not need to be declared public, + * the driver will attempt to make them accessible via reflection if required. + * This is the default access strategy. + */ + BOTH; + + /** + * Returns {@code true} if field scan is allowed, {@code false} otherwise. + * + * @return {@code true} if field access is allowed, {@code false} otherwise. + */ + public boolean isFieldScanAllowed() { + return this == FIELDS || this == BOTH; + } + + /** + * Returns {@code true} if getter and setter scan is allowed, {@code false} otherwise. + * + * @return {@code true} if getter and setter access is allowed, {@code false} otherwise. + */ + public boolean isGetterSetterScanAllowed() { + return this == GETTERS_AND_SETTERS || this == BOTH; + } + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyMapper.java index b66b749363c..f3969130f96 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyMapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyMapper.java @@ -15,182 +15,28 @@ */ package com.datastax.driver.mapping; -import com.datastax.driver.core.Metadata; -import com.datastax.driver.core.TypeCodec; -import com.datastax.driver.mapping.annotations.*; -import com.google.common.reflect.TypeToken; - -import java.beans.PropertyDescriptor; -import java.lang.annotation.Annotation; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.lang.reflect.Type; -import java.util.Collection; -import java.util.Map; - -import static com.google.common.base.Preconditions.checkArgument; +import java.util.Set; /** - * Maps a Java bean property to a table column or a UDT field. - *

    - * Properties can be either accessed through getter and setter pairs, - * or by direct field access, depending on what is available in the - * entity/UDT class. + * A pluggable component that maps + * Java properties to a Cassandra objects. */ -class PropertyMapper { - - private final String propertyName; - final String alias; - final String columnName; - final TypeToken javaType; - final TypeCodec customCodec; - final int position; - - private final Field field; - private final Method getter; - private final Method setter; - private final Map, Annotation> annotations; - - PropertyMapper(Class baseClass, String propertyName, String alias, Field field, PropertyDescriptor property) { - this.propertyName = propertyName; - this.alias = alias; - this.field = field; - getter = ReflectionUtils.findGetter(property); - setter = ReflectionUtils.findSetter(baseClass, property); - annotations = ReflectionUtils.scanPropertyAnnotations(field, property); - if (field != null) - ReflectionUtils.tryMakeAccessible(field); - if (getter != null) - ReflectionUtils.tryMakeAccessible(getter); - if (setter != null) - ReflectionUtils.tryMakeAccessible(setter); - if (!isTransient()) { - checkArgument((field != null && field.isAccessible()) || (getter != null && getter.isAccessible()), - "Property '%s' is not readable", propertyName); - checkArgument((field != null && field.isAccessible()) || (setter != null && setter.isAccessible()), - "Property '%s' is not writable", propertyName); - } - columnName = inferColumnName(); - position = inferPosition(); - javaType = inferJavaType(); - customCodec = createCustomCodec(); - } - - Object getValue(Object entity) { - try { - // try getter first, if available, otherwise direct field access - if (getter != null && getter.isAccessible()) - return getter.invoke(entity); - else - return field.get(entity); - } catch (Exception e) { - throw new IllegalArgumentException("Unable to read property '" + propertyName + "' in " + entity.getClass(), e); - } - } - - void setValue(Object entity, Object value) { - try { - // try setter first, if available, otherwise direct field access - if (setter != null && setter.isAccessible()) - setter.invoke(entity, value); - else - field.set(entity, value); - } catch (Exception e) { - throw new IllegalArgumentException("Unable to write property '" + propertyName + "' in " + entity.getClass(), e); - } - } - - boolean hasAnnotation(Class annotationClass) { - return annotations.containsKey(annotationClass); - } - - Collection getAnnotations() { - return annotations.values(); - } - - @SuppressWarnings("unchecked") - A annotation(Class annotationClass) { - return (A) annotations.get(annotationClass); - } - - boolean isComputed() { - return hasAnnotation(Computed.class); - } - - boolean isTransient() { - return hasAnnotation(Transient.class); - } - - boolean isPartitionKey() { - return hasAnnotation(PartitionKey.class); - } - - boolean isClusteringColumn() { - return hasAnnotation(ClusteringColumn.class); - } - - private String inferColumnName() { - if (isComputed()) { - return annotation(Computed.class).value(); - } - boolean caseSensitive = false; - String columnName = propertyName; - if (hasAnnotation(Column.class)) { - Column column = annotation(Column.class); - caseSensitive = column.caseSensitive(); - if (!column.name().isEmpty()) - columnName = column.name(); - } else if (hasAnnotation(com.datastax.driver.mapping.annotations.Field.class)) { - com.datastax.driver.mapping.annotations.Field udtField = annotation(com.datastax.driver.mapping.annotations.Field.class); - caseSensitive = udtField.caseSensitive(); - if (!udtField.name().isEmpty()) - columnName = udtField.name(); - } - return caseSensitive ? Metadata.quote(columnName) : columnName.toLowerCase(); - } - - @SuppressWarnings("unchecked") - private TypeToken inferJavaType() { - Type type; - if (getter != null) - type = getter.getGenericReturnType(); - else - type = field.getGenericType(); - return (TypeToken) TypeToken.of(type); - } - - private int inferPosition() { - if (isPartitionKey()) { - return annotation(PartitionKey.class).value(); - } - if (isClusteringColumn()) { - return annotation(ClusteringColumn.class).value(); - } - return -1; - } - - private TypeCodec createCustomCodec() { - Class> codecClass = getCustomCodecClass(); - if (codecClass.equals(Defaults.NoCodec.class)) - return null; - @SuppressWarnings("unchecked") - TypeCodec instance = (TypeCodec) ReflectionUtils.newInstance(codecClass); - return instance; - } - - private Class> getCustomCodecClass() { - Column column = annotation(Column.class); - if (column != null) - return column.codec(); - com.datastax.driver.mapping.annotations.Field udtField = annotation(com.datastax.driver.mapping.annotations.Field.class); - if (udtField != null) - return udtField.codec(); - return Defaults.NoCodec.class; - } - - @Override - public String toString() { - return propertyName; - } +public interface PropertyMapper { + + /** + * Maps the given table class. + * + * @param tableClass the table class. + * @return a set of mapped properties for the given class. + */ + Set> mapTable(Class tableClass); + + /** + * Maps the given UDT class. + * + * @param udtClass the UDT class. + * @return a set of mapped properties for the given class. + */ + Set> mapUdt(Class udtClass); } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyTransienceStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyTransienceStrategy.java new file mode 100644 index 00000000000..046e1a8af05 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyTransienceStrategy.java @@ -0,0 +1,56 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import java.util.Set; + +/** + * A strategy to determine which properties are transient, and which aren't. + *

    + * Transient properties will be ignored, whereas non-transient + * ones will be mapped. + */ +public enum PropertyTransienceStrategy { + + /** + * This strategy adopts a permissive, opt-out approach that + * will consider a property to be non-transient by default, unless: + *

      + *
    1. The property is annotated with {@link com.datastax.driver.mapping.annotations.Transient @Transient};
    2. + *
    3. The corresponding field is non-null and is marked with the keyword {@code transient};
    4. + *
    5. The property name has been explicitly black-listed (see {@link DefaultPropertyMapper#setTransientPropertyNames(Set)}).
    6. + *
    + */ + OPT_OUT, + + /** + * This strategy adopts a conservative, opt-in approach that + * only considers a property to be non-transient if it is explicitly annotated + * with one of the following annotations: + *
      + *
    1. {@link com.datastax.driver.mapping.annotations.Column Column}
    2. + *
    3. {@link com.datastax.driver.mapping.annotations.Computed Computed}
    4. + *
    5. {@link com.datastax.driver.mapping.annotations.ClusteringColumn ClusteringColumn}
    6. + *
    7. {@link com.datastax.driver.mapping.annotations.Frozen Frozen}
    8. + *
    9. {@link com.datastax.driver.mapping.annotations.FrozenKey FrozenKey}
    10. + *
    11. {@link com.datastax.driver.mapping.annotations.FrozenValue FrozenValue}
    12. + *
    13. {@link com.datastax.driver.mapping.annotations.PartitionKey PartitionKey}
    14. + *
    15. {@link com.datastax.driver.mapping.annotations.Field Field}
    16. + *
    + */ + OPT_IN + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java index 705bcb2dadf..dab865ec90b 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java @@ -29,13 +29,13 @@ enum QueryType { SAVE { @Override - String makePreparedQueryString(TableMetadata table, EntityMapper mapper, MappingManager manager, Set columns, Collection options) { + String makePreparedQueryString(TableMetadata table, EntityMapper mapper, MappingManager manager, Set columns, Collection options) { Insert insert = table == null ? insertInto(mapper.keyspace, mapper.table) : insertInto(table); - for (PropertyMapper col : columns) - if (!col.isComputed()) - insert.value(col.columnName, bindMarker()); + for (AliasedMappedProperty col : columns) + if (!col.mappedProperty.isComputed()) + insert.value(col.mappedProperty.getMappedName(), bindMarker()); for (Mapper.Option opt : options) { opt.validate(QueryType.SAVE, manager); @@ -48,12 +48,12 @@ String makePreparedQueryString(TableMetadata table, EntityMapper mapper, Mapp GET { @Override - String makePreparedQueryString(TableMetadata table, EntityMapper mapper, MappingManager manager, Set columns, Collection options) { + String makePreparedQueryString(TableMetadata table, EntityMapper mapper, MappingManager manager, Set columns, Collection options) { Select.Selection selection = select(); - for (PropertyMapper col : mapper.allColumns) { - Select.SelectionOrAlias column = col.isComputed() - ? selection.raw(col.columnName) - : selection.column(col.columnName); + for (AliasedMappedProperty col : mapper.allColumns) { + Select.SelectionOrAlias column = col.mappedProperty.isComputed() + ? selection.raw(col.mappedProperty.getMappedName()) + : selection.column(col.mappedProperty.getMappedName()); if (col.alias == null) { selection = column; @@ -69,7 +69,7 @@ String makePreparedQueryString(TableMetadata table, EntityMapper mapper, Mapp } Select.Where where = select.where(); for (int i = 0; i < mapper.primaryKeySize(); i++) - where.and(eq(mapper.getPrimaryKeyColumn(i).columnName, bindMarker())); + where.and(eq(mapper.getPrimaryKeyColumn(i).mappedProperty.getMappedName(), bindMarker())); for (Mapper.Option option : options) { option.validate(QueryType.GET, manager); @@ -81,13 +81,13 @@ String makePreparedQueryString(TableMetadata table, EntityMapper mapper, Mapp DEL { @Override - String makePreparedQueryString(TableMetadata table, EntityMapper mapper, MappingManager manager, Set columns, Collection options) { + String makePreparedQueryString(TableMetadata table, EntityMapper mapper, MappingManager manager, Set columns, Collection options) { Delete delete = table == null ? delete().all().from(mapper.keyspace, mapper.table) : delete().all().from(table); Delete.Where where = delete.where(); for (int i = 0; i < mapper.primaryKeySize(); i++) - where.and(eq(mapper.getPrimaryKeyColumn(i).columnName, bindMarker())); + where.and(eq(mapper.getPrimaryKeyColumn(i).mappedProperty.getMappedName(), bindMarker())); for (Mapper.Option option : options) { option.validate(QueryType.DEL, manager); option.modifyQueryString(delete); @@ -96,6 +96,6 @@ String makePreparedQueryString(TableMetadata table, EntityMapper mapper, Mapp } }; - abstract String makePreparedQueryString(TableMetadata table, EntityMapper mapper, MappingManager manager, Set columns, Collection options); + abstract String makePreparedQueryString(TableMetadata table, EntityMapper mapper, MappingManager manager, Set columns, Collection options); } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/ReflectionUtils.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/ReflectionUtils.java index 5ea9760cc36..dcd024d466f 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/ReflectionUtils.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/ReflectionUtils.java @@ -15,30 +15,13 @@ */ package com.datastax.driver.mapping; -import com.google.common.base.Throwables; -import com.google.common.collect.ImmutableSet; - -import java.beans.BeanInfo; -import java.beans.IntrospectionException; -import java.beans.Introspector; -import java.beans.PropertyDescriptor; -import java.lang.annotation.Annotation; -import java.lang.reflect.*; -import java.util.HashMap; -import java.util.Map; -import java.util.Set; +import java.lang.reflect.Constructor; /** * Utility methods related to reflection. */ class ReflectionUtils { - private static final Set EXCLUDED_PROPERTIES = ImmutableSet.of( - "class", - // JAVA-1279: exclude Groovy's metaClass property - "metaClass" - ); - static T newInstance(Class clazz) { Constructor publicConstructor; try { @@ -60,146 +43,4 @@ static T newInstance(Class clazz) { } } - // for each key representing a property name, - // value[0] contains a Field object, value[1] contains a PropertyDescriptor object; - // they cannot be both null at the same time - static Map scanFieldsAndProperties(Class baseClass) { - Map fieldsAndProperties = new HashMap(); - Map fields = scanFields(baseClass); - for (Map.Entry entry : fields.entrySet()) { - fieldsAndProperties.put(entry.getKey(), new Object[]{entry.getValue(), null}); - } - Map properties = scanProperties(baseClass); - for (Map.Entry entry : properties.entrySet()) { - Object[] value = fieldsAndProperties.get(entry.getKey()); - if (value == null) - fieldsAndProperties.put(entry.getKey(), new Object[]{null, entry.getValue()}); - else value[1] = entry.getValue(); - } - return fieldsAndProperties; - } - - private static Map scanFields(Class baseClass) { - HashMap fields = new HashMap(); - for (Class clazz = baseClass; !clazz.equals(Object.class); clazz = clazz.getSuperclass()) { - for (Field field : clazz.getDeclaredFields()) { - if (field.isSynthetic() || Modifier.isStatic(field.getModifiers()) || isPropertyExcluded(field.getName())) - continue; - // never override a more specific field masking another one declared in a superclass - if (!fields.containsKey(field.getName())) - fields.put(field.getName(), field); - } - } - return fields; - } - - private static Map scanProperties(Class baseClass) { - BeanInfo beanInfo; - try { - beanInfo = Introspector.getBeanInfo(baseClass); - } catch (IntrospectionException e) { - throw Throwables.propagate(e); - } - Map properties = new HashMap(); - for (PropertyDescriptor property : beanInfo.getPropertyDescriptors()) { - if (isPropertyExcluded(property.getName())) - continue; - properties.put(property.getName(), property); - } - return properties; - } - - private static boolean isPropertyExcluded(String name) { - return EXCLUDED_PROPERTIES.contains(name); - } - - static Map, Annotation> scanPropertyAnnotations(Field field, PropertyDescriptor property) { - Map, Annotation> annotations = new HashMap, Annotation>(); - // annotations on getters should have precedence over annotations on fields - if (field != null) - scanFieldAnnotations(field, annotations); - Method getter = findGetter(property); - if (getter != null) - scanMethodAnnotations(getter, annotations); - return annotations; - } - - private static Map, Annotation> scanFieldAnnotations(Field field, Map, Annotation> annotations) { - for (Annotation annotation : field.getAnnotations()) { - annotations.put(annotation.annotationType(), annotation); - } - return annotations; - } - - private static Map, Annotation> scanMethodAnnotations(Method method, Map, Annotation> annotations) { - // 1. direct method annotations - for (Annotation annotation : method.getAnnotations()) { - annotations.put(annotation.annotationType(), annotation); - } - // 2. Class hierarchy: check for annotations in overridden methods in superclasses - Class getterClass = method.getDeclaringClass(); - for (Class clazz = getterClass.getSuperclass(); !clazz.equals(Object.class); clazz = clazz.getSuperclass()) { - maybeAddOverriddenMethodAnnotations(annotations, method, clazz); - } - // 3. Interfaces: check for annotations in implemented interfaces - for (Class clazz = getterClass; !clazz.equals(Object.class); clazz = clazz.getSuperclass()) { - for (Class itf : clazz.getInterfaces()) { - maybeAddOverriddenMethodAnnotations(annotations, method, itf); - } - } - return annotations; - } - - private static void maybeAddOverriddenMethodAnnotations(Map, Annotation> annotations, Method getter, Class clazz) { - try { - Method overriddenGetter = clazz.getDeclaredMethod(getter.getName(), (Class[]) getter.getParameterTypes()); - for (Annotation annotation : overriddenGetter.getAnnotations()) { - // do not override a more specific version of the annotation type being scanned - if (!annotations.containsKey(annotation.annotationType())) - annotations.put(annotation.annotationType(), annotation); - } - } catch (NoSuchMethodException e) { - //ok - } - } - - static Method findGetter(PropertyDescriptor property) { - if (property == null) - return null; - Method getter = property.getReadMethod(); - if (getter == null) - return null; - return getter; - } - - static Method findSetter(Class baseClass, PropertyDescriptor property) { - if (property == null) - return null; - Method setter = property.getWriteMethod(); - if (setter != null) - return setter; - String propertyName = property.getName(); - String setterName = "set" + propertyName.substring(0, 1).toUpperCase() + propertyName.substring(1); - // JAVA-984: look for a "relaxed" setter, ie. a setter whose return type may be anything - try { - setter = baseClass.getMethod(setterName, property.getPropertyType()); - if (!Modifier.isStatic(setter.getModifiers())) { - return setter; - } - } catch (NoSuchMethodException e) { - // ok - } - return null; - } - - static void tryMakeAccessible(AccessibleObject object) { - if (!object.isAccessible()) { - try { - object.setAccessible(true); - } catch (SecurityException e) { - // ok - } - } - } - } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java index 27b4242f5af..47d5fa771ce 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java @@ -31,10 +31,6 @@ public class Result implements PagingIterable, T> { private final EntityMapper mapper; private final boolean useAlias; - Result(ResultSet rs, EntityMapper mapper) { - this(rs, mapper, false); - } - Result(ResultSet rs, EntityMapper mapper, boolean useAlias) { this.rs = rs; this.mapper = mapper; @@ -43,32 +39,35 @@ public class Result implements PagingIterable, T> { private T map(Row row) { T entity = mapper.newEntity(); - for (PropertyMapper col : mapper.allColumns) { - String name = col.alias != null && this.useAlias ? col.alias : col.columnName; + for (AliasedMappedProperty c : mapper.allColumns) { + @SuppressWarnings("unchecked") + AliasedMappedProperty col = (AliasedMappedProperty) c; + String name = col.alias != null && this.useAlias ? col.alias : col.mappedProperty.getMappedName(); if (!row.getColumnDefinitions().contains(name)) continue; Object value; - TypeCodec customCodec = col.customCodec; + TypeCodec customCodec = col.mappedProperty.getCustomCodec(); if (customCodec != null) value = row.get(name, customCodec); else - value = row.get(name, col.javaType); + value = row.get(name, col.mappedProperty.getPropertyType()); if (shouldSetValue(value)) { - col.setValue(entity, value); + col.mappedProperty.setValue(entity, value); } } return entity; } + @SuppressWarnings("SimplifiableIfStatement") private static boolean shouldSetValue(Object value) { if (value == null) return false; if (value instanceof Collection) - return !((Collection) value).isEmpty(); + return !((Collection) value).isEmpty(); if (value instanceof Map) - return !((Map) value).isEmpty(); + return !((Map) value).isEmpty(); return true; } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Word.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Word.java new file mode 100644 index 00000000000..a612ea80240 --- /dev/null +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Word.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +/** + * Represents a single-individual word in a property name. (e.g. "my", "xml" and "parser" in a + * property named "myXmlParser"). + * Each word contains a String value and a boolean indicating whether or not + * the value is an abbreviation. + * In most cases there will be no trivial way to identify abbreviations + * (i.e. my_xml_parser in snake case), but for some naming conventions this may be helpful. + */ +public class Word { + + private final String value; + + private final boolean isAbbreviation; + + public Word(String value, boolean isAbbreviation) { + this.value = value; + this.isAbbreviation = isAbbreviation; + } + + public Word(String value) { + this(value, false); + } + + public String getValue() { + return value; + } + + public boolean isAbbreviation() { + return isAbbreviation; + } + +} diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Column.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Column.java index e7de3e53a48..e0043be99b9 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Column.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Column.java @@ -16,6 +16,8 @@ package com.datastax.driver.mapping.annotations; import com.datastax.driver.core.TypeCodec; +import com.datastax.driver.mapping.MappingConfiguration; +import com.datastax.driver.mapping.NamingStrategy; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; @@ -37,18 +39,20 @@ @Retention(RetentionPolicy.RUNTIME) public @interface Column { /** - * Name of the column being mapped in Cassandra. By default, the name of the - * field or Java bean property will be used. + * Name of the column being mapped in Cassandra. By default, the name returned + * by the {@link NamingStrategy} of the current + * {@link MappingConfiguration}. * * @return the name of the mapped column in Cassandra, or {@code ""} to use - * the field name. + * the naming strategy. */ String name() default ""; /** - * Whether the column name is a case sensitive one. + * Whether the value return by {@link #name()} is case-sensitive (this has no + * effect if no name is provided in the annotation). * - * @return whether the column name is a case sensitive one. + * @return whether the column name is case-sensitive. */ boolean caseSensitive() default false; diff --git a/driver-mapping/src/test/groovy/com/datastax/driver/mapping/MapperGroovyTest.groovy b/driver-mapping/src/test/groovy/com/datastax/driver/mapping/MapperGroovyTest.groovy index 3bc827a51f8..85ff18fa7fa 100644 --- a/driver-mapping/src/test/groovy/com/datastax/driver/mapping/MapperGroovyTest.groovy +++ b/driver-mapping/src/test/groovy/com/datastax/driver/mapping/MapperGroovyTest.groovy @@ -13,26 +13,26 @@ import static org.assertj.core.api.Assertions.assertThat * * @jira_ticket JAVA-1279 */ -public class MapperGroovyTest extends CCMTestsSupport { +class MapperGroovyTest extends CCMTestsSupport { @Table(name = "users") static class User { @PartitionKey @Column(name = "user_id") - def UUID userId + UUID userId - def String name + String name } @Override - public void onTestContextInitialized() { + void onTestContextInitialized() { execute("CREATE TABLE users (user_id uuid PRIMARY KEY, name text)") } @Test(groups = "short") - public void should_map_groovy_class() { + void should_map_groovy_class() { def mapper = new MappingManager(session()).mapper(User) def user1 = new User() user1.userId = UUID.randomUUID() diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java index afeb952c77a..a312cf995d1 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java @@ -40,7 +40,7 @@ public class MapperCaseSensitivityTest extends CCMTestsSupport { static class User { @PartitionKey - @Column(caseSensitive = true) + @Column(name = "userId", caseSensitive = true) private String userId; @Column(name = "Address", caseSensitive = true) @@ -91,7 +91,7 @@ static class Address { @Field(name = "Street", caseSensitive = true) private String street; - @Field(caseSensitive = true) + @Field(name = "zipCode", caseSensitive = true) private String zipCode; public Address() { @@ -145,11 +145,6 @@ public UserNoKeyspace(String id, Address address) { } - @UDT(name = TYPE, caseSensitiveKeyspace = true, caseSensitiveType = true) - static class AddressNoKeyspace extends Address { - - } - @Override public void onTestContextInitialized() { execute(String.format(TestUtils.CREATE_KEYSPACE_SIMPLE_FORMAT, quote(KS), 1)); diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java index 116d93c9e8a..a6f3135246b 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java @@ -26,12 +26,15 @@ public class MapperInvalidAnnotationsTest { MappingManager mappingManager; + MappingConfiguration mappingConfiguration; @BeforeClass(groups = "unit") public void setup() { mappingManager = mock(MappingManager.class); + mappingConfiguration = MappingConfiguration.builder().build(); Session session = mock(Session.class); when(mappingManager.getSession()).thenReturn(session); + when(mappingManager.getConfiguration()).thenReturn(mappingConfiguration); Cluster cluster = mock(Cluster.class); when(session.getCluster()).thenReturn(cluster); Metadata metadata = mock(Metadata.class); diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationHierarchyScanStrategyTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationHierarchyScanStrategyTest.java new file mode 100644 index 00000000000..4a9826042b7 --- /dev/null +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationHierarchyScanStrategyTest.java @@ -0,0 +1,130 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.mapping.annotations.Column; +import com.datastax.driver.mapping.annotations.PartitionKey; +import com.datastax.driver.mapping.annotations.Table; +import org.testng.annotations.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Test for JAVA-1310 - validate ability configure ancestor property scanning: + * - disable + * - configure max depth ancestor (included or not) + */ +public class MappingConfigurationHierarchyScanStrategyTest extends CCMTestsSupport { + + @Override + public void onTestContextInitialized() { + execute("CREATE TABLE foo (k int primary key, v int)"); + execute("INSERT INTO foo (k, v) VALUES (1, 1)"); + } + + @Test(groups = "short") + public void should_not_inherit_annotations_when_hierarchy_scan_disabled() { + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setHierarchyScanStrategy(new MappedClassesOnlyHierarchyScanStrategy())) + .build(); + MappingManager mappingManager = new MappingManager(session(), conf); + mappingManager.mapper(Child1.class); + } + + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Parent1 { + + @Column(name = "notAColumn") + private int notAColumn; + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Child1 extends Parent1 { + + @PartitionKey + private int k; + + public int getK() { + return k; + } + + public void setK(int k) { + this.k = k; + } + } + + @Test(groups = "short") + public void should_inherit_annotations_up_to_highest_ancestor_excluded() { + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setHierarchyScanStrategy(new DefaultHierarchyScanStrategy(GrandParent2.class, false))) + .build(); + MappingManager mappingManager = new MappingManager(session(), conf); + Mapper mapper = mappingManager.mapper(Child2.class); + assertThat(mapper.get(1).getV()).isEqualTo(1); + } + + @Test(groups = "short") + public void should_inherit_annotations_up_to_highest_ancestor_included() { + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setHierarchyScanStrategy(new DefaultHierarchyScanStrategy(Parent2.class, true))) + .build(); + MappingManager mappingManager = new MappingManager(session(), conf); + Mapper mapper = mappingManager.mapper(Child2.class); + assertThat(mapper.get(1).getV()).isEqualTo(1); + } + + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class GrandParent2 { + + @Column(name = "notAColumn") + private int notAColumn; + } + + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Parent2 extends GrandParent2 { + + private int v; + + public int getV() { + return v; + } + + public void setV(int v) { + this.v = v; + } + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Child2 extends Parent2 { + + @PartitionKey + private int k; + + public int getK() { + return k; + } + + public void setK(int k) { + this.k = k; + } + } +} diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationNamingStrategyTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationNamingStrategyTest.java new file mode 100644 index 00000000000..f40339ffe08 --- /dev/null +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationNamingStrategyTest.java @@ -0,0 +1,428 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.core.Row; +import com.datastax.driver.core.TypeCodec; +import com.datastax.driver.core.utils.CassandraVersion; +import com.datastax.driver.mapping.annotations.*; +import org.testng.annotations.Test; + +import java.util.concurrent.atomic.AtomicInteger; + +import static org.assertj.core.api.Assertions.assertThat; + +@CassandraVersion(value = "2.1.0") +public class MappingConfigurationNamingStrategyTest extends CCMTestsSupport { + + private static AtomicInteger counter = new AtomicInteger(0); + + @Override + public void onTestContextInitialized() { + execute("CREATE TABLE lowerlisp (\"primary-key\" int primary key, \"my-value\" int)", + "CREATE TABLE uppersnake (\"PRIMARY_KEY\" int primary key, \"MY_VALUE\" int)", + "CREATE TYPE \"ADDRESS\" (\"ZIP_CODE\" int, \"CITY_AND_STATE\" text)", + "CREATE TABLE user (\"NAME\" text primary key, \"ADDRESS\" frozen<\"ADDRESS\">)"); + } + + @Table(name = "lowerlisp") + static class UpperSnake { + + @PartitionKey + int PRIMARY_KEY; + + int MY_VALUE; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + UpperSnake that = (UpperSnake) o; + + return PRIMARY_KEY == that.PRIMARY_KEY && MY_VALUE == that.MY_VALUE; + } + + @Override + public int hashCode() { + int result = PRIMARY_KEY; + result = 31 * result + MY_VALUE; + return result; + } + } + + @Test(groups = "short") + public void should_use_naming_strategy_fields() { + // given a configuration with a java naming convention of upper snake case (i.e. HELLO_WORLD) and a + // cassandra naming convention of lower lisp case (i.e. hello-world) with and access strategy of fields + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setNamingStrategy(new DefaultNamingStrategy( + NamingConventions.UPPER_SNAKE_CASE, + NamingConventions.LOWER_LISP_CASE)) + .setPropertyAccessStrategy(PropertyAccessStrategy.FIELDS)) + .build(); + + MappingManager mappingManager = new MappingManager(session(), conf); + // when creating a mapper + // should succeed since fields match the upper snake case strategy and they are appropriately converted + // to lower lisp format (PRIMARY_KEY -> primary-key, MY_VALUE -> my-value) + Mapper mapper = mappingManager.mapper(UpperSnake.class); + + // should be able to insert and retrieve data + UpperSnake in = new UpperSnake(); + in.PRIMARY_KEY = counter.incrementAndGet(); + in.MY_VALUE = counter.incrementAndGet(); + + mapper.save(in); + + UpperSnake out = mapper.get(in.PRIMARY_KEY); + assertThat(out).isEqualTo(in); + } + + @Table(name = "lowerlisp") + static class NamingStrategyOverrideField { + + // Override what would be mapped to key to primary-key + @PartitionKey + @Column(name = "primary-key") + int key; + + int MY_VALUE; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + NamingStrategyOverrideField that = (NamingStrategyOverrideField) o; + + return key == that.key && MY_VALUE == that.MY_VALUE; + } + + @Override + public int hashCode() { + int result = key; + result = 31 * result + MY_VALUE; + return result; + } + } + + @Test(groups = "short") + public void should_override_naming_strategy_with_column_annotation_name_fields() { + // given a configuration with a java naming convention of upper snake case (i.e. HELLO_WORLD) and a + // cassandra naming convention of lower lisp case (i.e. hello-world) with an access strategy of fields + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setNamingStrategy(new DefaultNamingStrategy( + NamingConventions.UPPER_SNAKE_CASE, + NamingConventions.LOWER_LISP_CASE)) + .setPropertyAccessStrategy(PropertyAccessStrategy.FIELDS)) + .build(); + + // when creating a mapper + // should succeed since fields match the upper snake case strategy and they are appropriately converted + // to lower lisp format (MY_VALUE -> my-value) and since there is a @Column-annotated name override (key field + // has override to 'primary-key' + MappingManager mappingManager = new MappingManager(session(), conf); + Mapper mapper = mappingManager.mapper(NamingStrategyOverrideField.class); + + // should be able to insert and retrieve data + NamingStrategyOverrideField in = new NamingStrategyOverrideField(); + in.key = counter.incrementAndGet(); + in.MY_VALUE = counter.incrementAndGet(); + + mapper.save(in); + + NamingStrategyOverrideField out = mapper.get(in.key); + assertThat(out).isEqualTo(in); + } + + @Table(name = "uppersnake") + @SuppressWarnings({"unused", "WeakerAccess"}) + static class LowerSnake { + + private int _primaryKey; + private int _myValue; + + @PartitionKey + public int getprimary_key() { + return _primaryKey; + } + + public void setprimary_key(int k) { + this._primaryKey = k; + } + + public int getmy_value() { + return _myValue; + } + + public void setmy_value(int v) { + this._myValue = v; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + LowerSnake that = (LowerSnake) o; + + return _primaryKey == that._primaryKey && _myValue == that._myValue; + } + + @Override + public int hashCode() { + int result = _primaryKey; + result = 31 * result + _myValue; + return result; + } + } + + @Test(groups = "short") + public void should_use_naming_strategy_getters_and_setters() { + // given a configuration with a java naming convention of lower snake case (i.e. hello_world) and a + // cassandra naming convention of upper snake case (i.e. HELLO_WORLD) with an access strategy of + // getters and setters + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setNamingStrategy(new DefaultNamingStrategy( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.UPPER_SNAKE_CASE)) + .setPropertyAccessStrategy(PropertyAccessStrategy.GETTERS_AND_SETTERS)) + .build(); + + // when creating a mapper + // should succeed since getters match the lower snake case strategy and they are appropriately converted + // to upper snake case format (getprimary_key -> PRIMARY_KEY, getmy_value -> MY_VALUE) + MappingManager mappingManager = new MappingManager(session(), conf); + Mapper mapper = mappingManager.mapper(LowerSnake.class); + + // should be able to insert and retrieve data + LowerSnake in = new LowerSnake(); + in.setprimary_key(counter.incrementAndGet()); + in.setmy_value(counter.incrementAndGet()); + + mapper.save(in); + + LowerSnake out = mapper.get(in.getprimary_key()); + assertThat(out).isEqualTo(in); + } + + @Table(name = "uppersnake") + @SuppressWarnings({"unused", "WeakerAccess"}) + static class NamingStrategyOverrideGetter { + + private int _primaryKey; + private int _myValue; + + // Override column name from what would be mapped to KEY to PRIMARY_KEY + @PartitionKey + @Column(name = "PRIMARY_KEY", caseSensitive = true) + public int getKey() { + return _primaryKey; + } + + public void setKey(int k) { + this._primaryKey = k; + } + + public int getmy_value() { + return _myValue; + } + + public void setmy_value(int v) { + this._myValue = v; + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + NamingStrategyOverrideGetter that = (NamingStrategyOverrideGetter) o; + + return _primaryKey == that._primaryKey && _myValue == that._myValue; + } + + @Override + public int hashCode() { + int result = _primaryKey; + result = 31 * result + _myValue; + return result; + } + } + + @Test(groups = "short") + public void should_override_naming_strategy_with_column_annotation_name_getters() { + // given a configuration with a java naming convention of lower snake case (i.e. hello_world) and a + // cassandra naming convention of upper snake case (i.e. HELLO_WORLD) with an access strategy for + // getters and setters + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setNamingStrategy(new DefaultNamingStrategy( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.UPPER_SNAKE_CASE)) + .setPropertyAccessStrategy(PropertyAccessStrategy.GETTERS_AND_SETTERS)) + .build(); + + // when creating a mapper + // should succeed since getters match the lower snake case strategy and they are appropriately converted + // to upper snake case format (getmy_value -> MY_VALUE) and @Column-annotated name override on getKey is + // PRIMARY_KEY. + MappingManager mappingManager = new MappingManager(session(), conf); + Mapper mapper = mappingManager.mapper(NamingStrategyOverrideGetter.class); + + // should be able to insert and retrieve data + NamingStrategyOverrideGetter in = new NamingStrategyOverrideGetter(); + in.setKey(counter.incrementAndGet()); + in.setmy_value(counter.incrementAndGet()); + + mapper.save(in); + + NamingStrategyOverrideGetter out = mapper.get(in.getKey()); + assertThat(out).isEqualTo(in); + } + + @Accessor + interface NamingStrategyAccessor { + @Query("SELECT * from uppersnake where \"PRIMARY_KEY\" = ?") + Result getValue(int key); + } + + @Test(groups = "short") + public void should_apply_naming_strategy_when_mapping_from_accessor_result() { + // given a configuration with a java naming convention of lower snake case (i.e. hello_world) and a + // cassandra naming convention of upper snake case (i.e. HELLO_WORLD) with an access strategy for + // getters and setters + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setNamingStrategy(new DefaultNamingStrategy( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.UPPER_SNAKE_CASE)) + .setPropertyAccessStrategy(PropertyAccessStrategy.GETTERS_AND_SETTERS)) + .build(); + + MappingManager mappingManager = new MappingManager(session(), conf); + Mapper mapper = mappingManager.mapper(NamingStrategyOverrideGetter.class); + NamingStrategyAccessor acc = mappingManager.createAccessor(NamingStrategyAccessor.class); + + NamingStrategyOverrideGetter in = new NamingStrategyOverrideGetter(); + in.setKey(counter.incrementAndGet()); + in.setmy_value(counter.incrementAndGet()); + + mapper.save(in); + + Result out = acc.getValue(in.getKey()); + + assertThat(out.one()).isEqualTo(in); + } + + @UDT(name = "ADDRESS", caseSensitiveType = true) + static class Address { + int zip_code; + + @Field(name = "CITY_AND_STATE", caseSensitive = true) + String cityAndState; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + Address address = (Address) o; + + return zip_code == address.zip_code && (cityAndState != null ? cityAndState.equals(address.cityAndState) : address.cityAndState == null); + } + + @Override + public int hashCode() { + int result = zip_code; + result = 31 * result + (cityAndState != null ? cityAndState.hashCode() : 0); + return result; + } + } + + @Table(name = "user") + static class User { + @PartitionKey + String name; + + Address address; + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + + User user = (User) o; + + return (name != null ? name.equals(user.name) : user.name == null) && (address != null ? address.equals(user.address) : user.address == null); + } + + @Override + public int hashCode() { + int result = name != null ? name.hashCode() : 0; + result = 31 * result + (address != null ? address.hashCode() : 0); + return result; + } + } + + @Test(groups = "short") + public void should_apply_naming_strategy_to_udts() { + // given a configuration with a java naming convention of lower snake case (i.e. hello_world) and a + // cassandra naming convention of upper snake case (i.e. HELLO_WORLD) with an access strategy for + // fields + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setNamingStrategy(new DefaultNamingStrategy( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.UPPER_SNAKE_CASE)) + .setPropertyAccessStrategy(PropertyAccessStrategy.FIELDS)) + .build(); + + MappingManager mappingManager = new MappingManager(session(), conf); + + // when creating a mapper + // should succeed since fields match the lower snake case strategy and they are appropriately converted for + // both the table (User) and the underlying UDT (Address) + Mapper mapper = mappingManager.mapper(User.class); + + // insert user w/ address + Address address = new Address(); + address.zip_code = 90210; + address.cityAndState = "Beverly Hills, CA"; + + User user = new User(); + user.name = "John Doe"; + user.address = address; + + mapper.save(user); + + // retrieve user w/ address and ensure it matches the input. + User out = mapper.get(user.name); + assertThat(out).isEqualTo(user); + + // should be able to use udtCodec to get a codec back that is capable of converting a retrieved + // udt column value into an Address object and it should match the input. + TypeCodec
    addressCodec = mappingManager.udtCodec(Address.class); + Row row = session().execute("select \"ADDRESS\" from user where \"NAME\" = 'John Doe'").one(); + Address outAddress = row.get(0, addressCodec); + assertThat(outAddress).isEqualTo(address); + } +} diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationPropertyAccessTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationPropertyAccessTest.java new file mode 100644 index 00000000000..8d0eea21dee --- /dev/null +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationPropertyAccessTest.java @@ -0,0 +1,139 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.mapping.annotations.PartitionKey; +import com.datastax.driver.mapping.annotations.Table; +import com.datastax.driver.mapping.annotations.Transient; +import org.testng.annotations.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Test for JAVA-1310 - validate ability configure property scope - getters vs. fields + */ +public class MappingConfigurationPropertyAccessTest extends CCMTestsSupport { + + @Override + public void onTestContextInitialized() { + execute("CREATE TABLE foo (k int primary key, v int)"); + execute("INSERT INTO foo (k, v) VALUES (1, 1)"); + } + + @Test(groups = "short") + public void should_ignore_fields() { + // given a configuration with an access strategy of getters and setters + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setPropertyAccessStrategy(PropertyAccessStrategy.GETTERS_AND_SETTERS)) + .build(); + MappingManager mappingManager = new MappingManager(session(), conf); + // when creating a mapper + // should succeed since getters (getK) maps to a C* column (k) and fields are ignored + mappingManager.mapper(Foo1.class); + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Foo1 { + private int k; + + private int notAColumn; + + @PartitionKey + public int getK() { + return k; + } + + public void setK(int k) { + this.k = k; + } + } + + @Test(groups = "short") + public void should_ignore_getters() { + // given a configuration with an access strategy of fields + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setPropertyAccessStrategy(PropertyAccessStrategy.FIELDS)) + .build(); + MappingManager mappingManager = new MappingManager(session(), conf); + // when creating a mapper + // should succeed since fields (k) maps to a C* column (k) and getters are ignored + mappingManager.mapper(Foo2.class); + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Foo2 { + @PartitionKey + private int k; + + public int getNotAColumn() { + return 1; + } + + public boolean isNotAColumn2() { + return true; + } + } + + @Test(groups = "short") + public void should_map_fields_and_getters() { + // given a configuration with an access strategy of both + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setPropertyAccessStrategy(PropertyAccessStrategy.BOTH)) + .build(); + MappingManager mappingManager = new MappingManager(session(), conf); + // when creating a mapper + // should succeed since fields and getters (k, getV) maps to a C* columns (k, v) and remaining field/getter + // has a @Transient annotation (storeVValueButNotMapped) + Mapper mapper = mappingManager.mapper(Foo3.class); + // should be able to retrieve data + Foo3 foo = mapper.get(1); + assertThat(foo.getV()).isEqualTo(1); + assertThat(foo.getK()).isEqualTo(1); + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Foo3 { + @PartitionKey + private int k; + + @Transient + private int storeVValueButNotMapped; + + @SuppressWarnings({"unused", "WeakerAccess"}) + public int getK() { + return k; + } + + public void setK(int k) { + this.k = k; + } + + public int getV() { + return storeVValueButNotMapped; + } + + public void setV(int v) { + this.storeVValueButNotMapped = v; + } + } +} diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransienceStrategyTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransienceStrategyTest.java new file mode 100644 index 00000000000..f936befabb9 --- /dev/null +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransienceStrategyTest.java @@ -0,0 +1,122 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.mapping.annotations.PartitionKey; +import com.datastax.driver.mapping.annotations.Table; +import com.datastax.driver.mapping.annotations.Transient; +import org.testng.annotations.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Test for JAVA-1310 - validate ability configure property mapping strategy - whitelist vs. blacklist + */ +public class MappingConfigurationTransienceStrategyTest extends CCMTestsSupport { + + @Override + public void onTestContextInitialized() { + execute("CREATE TABLE foo (k int primary key, v int)"); + execute("INSERT INTO foo (k, v) VALUES (1, 1)"); + } + + @Test(groups = "short") + public void should_map_only_non_transient() { + // given an 'opt out' configuration + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setPropertyTransienceStrategy(PropertyTransienceStrategy.OPT_OUT)) + .build(); + MappingManager mappingManager = new MappingManager(session(), conf); + // when creating a mapper + // then will succeed mapping since non-transient fields (k, v) exist in table and transient one (notAColumn) + // is not used + Mapper mapper = mappingManager.mapper(Foo1.class); + // k and v should have been mapped since they were non-transient + assertThat(mapper.get(1).getV()).isEqualTo(1); + assertThat(mapper.get(1).getK()).isEqualTo(1); + } + + @SuppressWarnings({"unused", "WeakerAccess"}) + @Table(name = "foo") + public static class Foo1 { + + @PartitionKey + private int k; + + private int v; + + @Transient + private int notAColumn; + + public int getK() { + return k; + } + + public void setK(int k) { + this.k = k; + } + + public int getV() { + return v; + } + + public void setV(int v) { + this.v = v; + } + } + + @Test(groups = "short") + public void should_map_only_annotated() { + // given an 'opt in' configuration + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .setPropertyTransienceStrategy(PropertyTransienceStrategy.OPT_IN)) + .build(); + MappingManager mappingManager = new MappingManager(session(), conf); + // when creating a mapper + // then will succeed mapping since notAColumn is not annotated with @Column + Mapper mapper = mappingManager.mapper(Foo2.class); + // k should have been mapped since it is annotated with @PartitionKey + assertThat(mapper.get(1).getK()).isEqualTo(1); + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Foo2 { + @PartitionKey + private int k; + + private int notAColumn; + + public int getK() { + return k; + } + + public void setK(int k) { + this.k = k; + } + + public int getNotAColumn() { + return notAColumn; + } + + public void setNotAColumn(int notAColumn) { + this.notAColumn = notAColumn; + } + } +} diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransientTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransientTest.java new file mode 100644 index 00000000000..058fadf5f48 --- /dev/null +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransientTest.java @@ -0,0 +1,112 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.mapping.annotations.PartitionKey; +import com.datastax.driver.mapping.annotations.Table; +import com.datastax.driver.mapping.annotations.Transient; +import org.testng.annotations.Test; + +/** + * Test for JAVA-1310 - validate ability to transient properties at manager and mapper levels + */ +public class MappingConfigurationTransientTest extends CCMTestsSupport { + + @Override + public void onTestContextInitialized() { + execute("CREATE TABLE foo (k int primary key, v int)"); + execute("INSERT INTO foo (k, v) VALUES (1, 1)"); + } + + @Test(groups = "short") + public void should_ignore_property_if_field_annotated_transient() { + // given default configuration + MappingManager mappingManager = new MappingManager(session()); + // when creating a mapper + // then mapping should succeed since non-existent column 'notAColumn' is annotated as Transient on its field + mappingManager.mapper(Foo1.class); + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Foo1 { + @PartitionKey + private int k; + @Transient + private int notAColumn; + } + + @Test(groups = "short") + public void should_ignore_property_if_getter_annotated_transient() { + // given default configuration + MappingManager mappingManager = new MappingManager(session()); + // when creating a mapper + // then mapping should succeed since non-existent column 'notAColumn' is annotated as @Transient on its getter + mappingManager.mapper(Foo2.class); + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Foo2 { + @PartitionKey + private int k; + private int notAColumn; + + @Transient + public int getNotAColumn() { + return notAColumn; + } + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Foo3 { + @PartitionKey + private int k; + private int notAColumn; + } + + @Test(groups = "short") + public void should_ignore_property_if_declared_transient_in_mapper_configuration() { + // given configuration that considers 'notAColumn' as transient + MappingConfiguration conf = MappingConfiguration.builder() + .withPropertyMapper(new DefaultPropertyMapper() + .addTransientPropertyNames("notAColumn")) + .build(); + // when creating a mapper + // then mapping should succeed since non-existent column 'notAColumn' is considered implicitly transient + MappingManager mappingManager = new MappingManager(session(), conf); + mappingManager.mapper(Foo3.class); + } + + @Test(groups = "short") + public void should_ignore_property_if_field_has_transient_modifier() { + // given default configuration + MappingManager mappingManager = new MappingManager(session()); + // when creating a mapper + // then mapping should succeed since non-existent column 'notAColumn' has transient modifier + mappingManager.mapper(Foo4.class); + } + + @Table(name = "foo") + @SuppressWarnings({"unused", "WeakerAccess"}) + public static class Foo4 { + @PartitionKey + private int k; + private transient int notAColumn; + } +} diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/NamingConventionsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/NamingConventionsTest.java new file mode 100644 index 00000000000..3c0f50fe5be --- /dev/null +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/NamingConventionsTest.java @@ -0,0 +1,550 @@ +/* + * Copyright (C) 2012-2015 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import org.testng.annotations.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * Test for JAVA-1316 - test combinations of different + * {@link NamingConventions} implementation. + */ +public class NamingConventionsTest { + + // test lower camel case inputs + + @Test(groups = "unit") + public void lower_camel_case_to_upper_camel_case() { + test( + NamingConventions.LOWER_CAMEL_CASE, + NamingConventions.UPPER_CAMEL_CASE, + "myXmlParser", + "MyXmlParser" + ); + } + + @Test(groups = "unit") + public void lower_camel_case_to_lower_snake_case() { + test( + NamingConventions.LOWER_CAMEL_CASE, + NamingConventions.LOWER_SNAKE_CASE, + "myXmlParser", + "my_xml_parser" + ); + } + + @Test(groups = "unit") + public void lower_camel_case_to_upper_snake_case() { + test( + NamingConventions.LOWER_CAMEL_CASE, + NamingConventions.UPPER_SNAKE_CASE, + "myXmlParser", + "MY_XML_PARSER" + ); + } + + @Test(groups = "unit") + public void lower_camel_case_to_lower_lisp_case() { + test( + NamingConventions.LOWER_CAMEL_CASE, + NamingConventions.LOWER_LISP_CASE, + "myXmlParser", + "my-xml-parser" + ); + } + + @Test(groups = "unit") + public void lower_camel_case_to_upper_lisp_case() { + test( + NamingConventions.LOWER_CAMEL_CASE, + NamingConventions.UPPER_LISP_CASE, + "myXmlParser", + "MY-XML-PARSER" + ); + } + + @Test(groups = "unit") + public void lower_camel_case_to_lower_case() { + test( + NamingConventions.LOWER_CAMEL_CASE, + NamingConventions.LOWER_CASE, + "myXmlParser", + "myxmlparser" + ); + } + + @Test(groups = "unit") + public void lower_camel_case_to_upper_case() { + test( + NamingConventions.LOWER_CAMEL_CASE, + NamingConventions.UPPER_CASE, + "myXmlParser", + "MYXMLPARSER" + ); + } + + // test upper camel case inputs + + @Test(groups = "unit") + public void upper_camel_case_to_lower_camel_case() { + test( + NamingConventions.UPPER_CAMEL_CASE, + NamingConventions.LOWER_CAMEL_CASE, + "MyXmlParser", + "myXmlParser" + ); + } + + @Test(groups = "unit") + public void upper_camel_case_to_lower_snake_case() { + test( + NamingConventions.UPPER_CAMEL_CASE, + NamingConventions.LOWER_SNAKE_CASE, + "MyXmlParser", + "my_xml_parser" + ); + } + + @Test(groups = "unit") + public void upper_camel_case_to_upper_snake_case() { + test( + NamingConventions.UPPER_CAMEL_CASE, + NamingConventions.UPPER_SNAKE_CASE, + "MyXmlParser", + "MY_XML_PARSER" + ); + } + + @Test(groups = "unit") + public void upper_camel_case_to_lower_lisp_case() { + test( + NamingConventions.UPPER_CAMEL_CASE, + NamingConventions.LOWER_LISP_CASE, + "MyXmlParser", + "my-xml-parser" + ); + } + + @Test(groups = "unit") + public void upper_camel_case_to_upper_lisp_case() { + test( + NamingConventions.UPPER_CAMEL_CASE, + NamingConventions.UPPER_LISP_CASE, + "MyXmlParser", + "MY-XML-PARSER" + ); + } + + @Test(groups = "unit") + public void upper_camel_case_to_lower_case() { + test( + NamingConventions.UPPER_CAMEL_CASE, + NamingConventions.LOWER_CASE, + "MyXmlParser", + "myxmlparser" + ); + } + + // test lower snake case inputs + + @Test(groups = "unit") + public void lower_snake_case_to_lower_camel_case() { + test( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.LOWER_CAMEL_CASE, + "my_xml_parser", + "myXmlParser" + ); + } + + @Test(groups = "unit") + public void lower_snake_case_to_upper_camel_case() { + test( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.UPPER_CAMEL_CASE, + "my_xml_parser", + "MyXmlParser" + ); + } + + @Test(groups = "unit") + public void lower_snake_case_to_upper_snake_case() { + test( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.UPPER_SNAKE_CASE, + "my_xml_parser", + "MY_XML_PARSER" + ); + } + + @Test(groups = "unit") + public void lower_snake_case_to_lower_lisp_case() { + test( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.LOWER_LISP_CASE, + "my_xml_parser", + "my-xml-parser" + ); + } + + @Test(groups = "unit") + public void lower_snake_case_to_upper_lisp_case() { + test( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.UPPER_LISP_CASE, + "my_xml_parser", + "MY-XML-PARSER" + ); + } + + @Test(groups = "unit") + public void lower_snake_case_to_lower_case() { + test( + NamingConventions.LOWER_SNAKE_CASE, + NamingConventions.LOWER_CASE, + "my_xml_parser", + "myxmlparser" + ); + } + + // test upper snake case inputs + + @Test(groups = "unit") + public void upper_snake_case_to_lower_camel_case() { + test( + NamingConventions.UPPER_SNAKE_CASE, + NamingConventions.LOWER_CAMEL_CASE, + "MY_XML_PARSER", + "myXmlParser" + ); + } + + @Test(groups = "unit") + public void upper_snake_case_to_upper_camel_case() { + test( + NamingConventions.UPPER_SNAKE_CASE, + NamingConventions.UPPER_CAMEL_CASE, + "MY_XML_PARSER", + "MyXmlParser" + ); + } + + @Test(groups = "unit") + public void upper_snake_case_to_lower_snake_case() { + test( + NamingConventions.UPPER_SNAKE_CASE, + NamingConventions.LOWER_SNAKE_CASE, + "MY_XML_PARSER", + "my_xml_parser" + ); + } + + @Test(groups = "unit") + public void upper_snake_case_to_lower_lisp_case() { + test( + NamingConventions.UPPER_SNAKE_CASE, + NamingConventions.LOWER_LISP_CASE, + "MY_XML_PARSER", + "my-xml-parser" + ); + } + + @Test(groups = "unit") + public void upper_snake_case_to_upper_lisp_case() { + test( + NamingConventions.UPPER_SNAKE_CASE, + NamingConventions.UPPER_LISP_CASE, + "MY_XML_PARSER", + "MY-XML-PARSER" + ); + } + + @Test(groups = "unit") + public void upper_snake_case_to_lower_case() { + test( + NamingConventions.UPPER_SNAKE_CASE, + NamingConventions.LOWER_CASE, + "MY_XML_PARSER", + "myxmlparser" + ); + } + + // test lower lisp case inputs + + @Test(groups = "unit") + public void lower_lisp_case_to_lower_camel_case() { + test( + NamingConventions.LOWER_LISP_CASE, + NamingConventions.LOWER_CAMEL_CASE, + "my-xml-parser", + "myXmlParser" + ); + } + + @Test(groups = "unit") + public void lower_lisp_case_to_upper_camel_case() { + test( + NamingConventions.LOWER_LISP_CASE, + NamingConventions.UPPER_CAMEL_CASE, + "my-xml-parser", + "MyXmlParser" + ); + } + + @Test(groups = "unit") + public void lower_lisp_case_to_lower_snake_case() { + test( + NamingConventions.LOWER_LISP_CASE, + NamingConventions.LOWER_SNAKE_CASE, + "my-xml-parser", + "my_xml_parser" + ); + } + + @Test(groups = "unit") + public void lower_lisp_case_to_upper_snake_case() { + test( + NamingConventions.LOWER_LISP_CASE, + NamingConventions.UPPER_SNAKE_CASE, + "my-xml-parser", + "MY_XML_PARSER" + ); + } + + @Test(groups = "unit") + public void lower_lisp_case_to_upper_lisp_case() { + test( + NamingConventions.LOWER_LISP_CASE, + NamingConventions.UPPER_LISP_CASE, + "my-xml-parser", + "MY-XML-PARSER" + ); + } + + @Test(groups = "unit") + public void lower_lisp_case_to_lower_case() { + test( + NamingConventions.LOWER_LISP_CASE, + NamingConventions.LOWER_CASE, + "my-xml-parser", + "myxmlparser" + ); + } + + // test upper lisp case inputs + + @Test(groups = "unit") + public void upper_lisp_case_to_lower_camel_case() { + test( + NamingConventions.UPPER_LISP_CASE, + NamingConventions.LOWER_CAMEL_CASE, + "MY-XML-PARSER", + "myXmlParser" + ); + } + + @Test(groups = "unit") + public void upper_lisp_case_to_upper_camel_case() { + test( + NamingConventions.UPPER_LISP_CASE, + NamingConventions.UPPER_CAMEL_CASE, + "MY-XML-PARSER", + "MyXmlParser" + ); + } + + @Test(groups = "unit") + public void upper_lisp_case_to_lower_snake_case() { + test( + NamingConventions.UPPER_LISP_CASE, + NamingConventions.LOWER_SNAKE_CASE, + "MY-XML-PARSER", + "my_xml_parser" + ); + } + + @Test(groups = "unit") + public void upper_lisp_case_to_upper_snake_case() { + test( + NamingConventions.UPPER_LISP_CASE, + NamingConventions.UPPER_SNAKE_CASE, + "MY-XML-PARSER", + "MY_XML_PARSER" + ); + } + + @Test(groups = "unit") + public void upper_lisp_case_to_lower_lisp_case() { + test( + NamingConventions.UPPER_LISP_CASE, + NamingConventions.LOWER_LISP_CASE, + "MY-XML-PARSER", + "my-xml-parser" + ); + } + + @Test(groups = "unit") + public void upper_lisp_case_to_lower_case() { + test( + NamingConventions.UPPER_LISP_CASE, + NamingConventions.LOWER_CASE, + "MY-XML-PARSER", + "myxmlparser" + ); + } + + // test special camel case settings + + @Test(groups = "unit") + public void lower_camel_case_with_prefix_to_upper_camel_case() { + test( + new NamingConventions.LowerCamelCase("_"), + NamingConventions.UPPER_CAMEL_CASE, + "_myXmlParser", + "MyXmlParser" + ); + test( + new NamingConventions.LowerCamelCase("_"), + NamingConventions.UPPER_CAMEL_CASE, + "myXmlParser", + "MyXmlParser" + ); + test( + new NamingConventions.LowerCamelCase("_", "m"), + NamingConventions.UPPER_CAMEL_CASE, + "mMyXmlParser", + "MyXmlParser" + ); + test( + new NamingConventions.LowerCamelCase("_", "m"), + NamingConventions.UPPER_CAMEL_CASE, + "_MyXmlParser", + "MyXmlParser" + ); + } + + @Test(groups = "unit") + public void lower_camel_case_with_prefix_to_lower_snake_case() { + test( + new NamingConventions.LowerCamelCase("_"), + NamingConventions.LOWER_SNAKE_CASE, + "_myXmlParser", + "my_xml_parser" + ); + test( + new NamingConventions.LowerCamelCase("_"), + NamingConventions.LOWER_SNAKE_CASE, + "myXmlParser", + "my_xml_parser" + ); + test( + new NamingConventions.LowerCamelCase("_", "m"), + NamingConventions.LOWER_SNAKE_CASE, + "mMyXmlParser", + "my_xml_parser" + ); + test( + new NamingConventions.LowerCamelCase("_", "m"), + NamingConventions.LOWER_SNAKE_CASE, + "_MyXmlParser", + "my_xml_parser" + ); + } + + @Test(groups = "unit") + public void upper_camel_case_with_prefix_to_upper_camel_case() { + test( + new NamingConventions.UpperCamelCase("_"), + NamingConventions.UPPER_CAMEL_CASE, + "_MyXmlParser", + "MyXmlParser" + ); + test( + new NamingConventions.UpperCamelCase("_"), + NamingConventions.UPPER_CAMEL_CASE, + "MyXmlParser", + "MyXmlParser" + ); + test( + new NamingConventions.UpperCamelCase("_", "m"), + NamingConventions.UPPER_CAMEL_CASE, + "mMyXmlParser", + "MyXmlParser" + ); + test( + new NamingConventions.UpperCamelCase("_", "m"), + NamingConventions.UPPER_CAMEL_CASE, + "_MyXmlParser", + "MyXmlParser" + ); + } + + @Test(groups = "unit") + public void upper_camel_case_with_prefix_to_upper_snake_case() { + test( + new NamingConventions.UpperCamelCase("_"), + NamingConventions.LOWER_SNAKE_CASE, + "_MyXmlParser", + "my_xml_parser" + ); + test( + new NamingConventions.UpperCamelCase("_"), + NamingConventions.LOWER_SNAKE_CASE, + "MyXmlParser", + "my_xml_parser" + ); + test( + new NamingConventions.UpperCamelCase("_", "m"), + NamingConventions.LOWER_SNAKE_CASE, + "mMyXmlParser", + "my_xml_parser" + ); + test( + new NamingConventions.UpperCamelCase("_", "m"), + NamingConventions.LOWER_SNAKE_CASE, + "_MyXmlParser", + "my_xml_parser" + ); + } + + @Test(groups = "unit") + public void lower_camel_case_with_abbr_to_lower_camel_case_with_no_abbr() { + test( + new NamingConventions.LowerCamelCase(true), + new NamingConventions.LowerCamelCase(false), + "myXMLParser", + "myXmlParser" + ); + } + + @Test(groups = "unit") + public void upper_camel_case_with_abbr_to_lower_camel_case_with_abbr() { + test( + new NamingConventions.UpperCamelCase(true), + new NamingConventions.LowerCamelCase(true), + "MyXMLParser", + "myXMLParser" + ); + } + + private void test(NamingConvention inputConvention, NamingConvention outputConvention, String input, String output) { + DefaultNamingStrategy namingStrategy = new DefaultNamingStrategy(inputConvention, outputConvention); + String result = namingStrategy.toCassandraName(input); + assertThat(result).isEqualTo(output); + } + +} diff --git a/manual/object_mapper/using/README.md b/manual/object_mapper/using/README.md index 4e95e503a9c..651477c75cf 100644 --- a/manual/object_mapper/using/README.md +++ b/manual/object_mapper/using/README.md @@ -297,3 +297,49 @@ public ListenableFuture> getAllAsync(); ``` [@QueryParameters]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/QueryParameters.html + + +### Mapping configuration + +[MappingConfiguration] lets you configure low-level aspects of the object mapper. It is configured +when initializing the mapping manager: + +```java +PropertyMapper propertyMapper = ... ; // see examples below +MappingConfiguration configuration = + MappingConfiguration.builder() + .withPropertyMapper(propertyMapper) + .build(); +MappingManager manager = new MappingManager(session, configuration); +``` + +The main component in the configuration is [PropertyMapper], which controls how annotated classes +will relate to database objects. The best way to plug in specific behavior is to create an instance of +[DefaultPropertyMapper] and customize it. + +For example, the mapper's default behavior is to try to map all the properties of your Java objects. +You might want to take the opposite approach and only map the ones that are specifically annotated +with `@Column` or `@Field`: + +```java +PropertyMapper propertyMapper = new DefaultPropertyMapper() + .setPropertyTransienceStrategy(PropertyTransienceStrategy.OPT_IN); +``` + +Another common need is to customize the way Cassandra column names are inferred. Out of the box, Java +property names are simply lowercased, so a `userName` property would be mapped to the `username` column. +To map to `user_name` instead, use the following: + +```java +PropertyMapper propertyMapper = new DefaultPropertyMapper() + .setNamingStrategy(new DefaultNamingStrategy( + NamingConventions.LOWER_CAMEL_CASE, + NamingConventions.LOWER_SNAKE_CASE)); +``` + +There is more to `DefaultPropertyMapper`; see the Javadocs and implementation for details. + + +[MappingConfiguration]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/MappingConfiguration.html +[PropertyMapper]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/PropertyMapper.html +[DefaultPropertyMapper]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/DefaultPropertyMapper.html diff --git a/upgrade_guide/README.md b/upgrade_guide/README.md index 003acfdbff2..3fe68aedc74 100644 --- a/upgrade_guide/README.md +++ b/upgrade_guide/README.md @@ -17,6 +17,12 @@ In 3.1.0, the driver would log a warning the first time it would skip a retry for a non-idempotent request; this warning has now been removed as users should now have adjusted their applications accordingly. +The `caseSensitive` field on `@Column` and `@Field` annotation now only +applies to the `name` field on the annotation and not the name of the +variable / method itself. If you were previously depending on the +name of the field, you should add a `name` field to the annotation, +i.e.: `@Column(name="userName", caseSensitive=true)`. + ### 3.1.0 From d336e5c59d6d842ede62045d2d814ff734eccda1 Mon Sep 17 00:00:00 2001 From: Olivier Michallat Date: Wed, 22 Mar 2017 09:46:44 -0700 Subject: [PATCH 075/512] JAVA-1424: Handle new WRITE_FAILURE and READ_FAILURE format in v5 protocol --- changelog/README.md | 1 + .../java/com/datastax/driver/core/CBUtil.java | 13 ++- .../com/datastax/driver/core/Responses.java | 17 +++- .../core/exceptions/ReadFailureException.java | 58 +++++++++++-- .../exceptions/WriteFailureException.java | 60 ++++++++++++-- .../ReadWriteFailureExceptionTest.java | 82 +++++++++++++++++++ 6 files changed, 214 insertions(+), 17 deletions(-) create mode 100644 driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java diff --git a/changelog/README.md b/changelog/README.md index 23a9529a030..a3ceeb56e06 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -21,6 +21,7 @@ - [improvement] JAVA-1414: Optimize Metadata.escapeId and Metadata.handleId. - [improvement] JAVA-1310: Make mapper's ignored properties configurable. - [improvement] JAVA-1316: Add strategy for resolving properties into CQL names. +- [bug] JAVA-1424: Handle new WRITE_FAILURE and READ_FAILURE format in v5 protocol. Merged from 3.1.x branch: diff --git a/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java b/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java index d01060c05dd..620258dd0a4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java @@ -369,7 +369,7 @@ public static int sizeOfNamedValueList(Map namedValues) { } public static InetSocketAddress readInet(ByteBuf cb) { - int addrSize = cb.readByte(); + int addrSize = cb.readByte() & 0xFF; byte[] address = new byte[addrSize]; cb.readBytes(address); int port = cb.readInt(); @@ -380,6 +380,17 @@ public static InetSocketAddress readInet(ByteBuf cb) { } } + public static InetAddress readInetWithoutPort(ByteBuf cb) { + int addrSize = cb.readByte() & 0xFF; + byte[] address = new byte[addrSize]; + cb.readBytes(address); + try { + return InetAddress.getByAddress(address); + } catch (UnknownHostException e) { + throw new DriverInternalError(String.format("Invalid IP address (%d.%d.%d.%d) while deserializing inet address", address[0], address[1], address[2], address[3])); + } + } + public static void writeInet(InetSocketAddress inet, ByteBuf cb) { byte[] address = inet.getAddress().getAddress(); diff --git a/driver-core/src/main/java/com/datastax/driver/core/Responses.java b/driver-core/src/main/java/com/datastax/driver/core/Responses.java index 70c24d00c97..98a120bf5cf 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Responses.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Responses.java @@ -20,12 +20,12 @@ import com.datastax.driver.core.utils.Bytes; import io.netty.buffer.ByteBuf; +import java.net.InetAddress; import java.net.InetSocketAddress; import java.nio.ByteBuffer; import java.util.*; import static com.datastax.driver.core.ProtocolVersion.V4; -import static com.datastax.driver.core.ProtocolVersion.V5; import static com.datastax.driver.core.SchemaElement.*; class Responses { @@ -69,12 +69,23 @@ public Error decode(ByteBuf body, ProtocolVersion version, CodecRegistry codecRe received = body.readInt(); blockFor = body.readInt(); int failures = body.readInt(); + Map failuresMap; + if (version.compareTo(ProtocolVersion.V5) < 0) { + failuresMap = Collections.emptyMap(); + } else { + failuresMap = new HashMap(); + for (int i = 0; i < failures; i++) { + InetAddress address = CBUtil.readInetWithoutPort(body); + int reasonCode = body.readUnsignedShort(); + failuresMap.put(address, reasonCode); + } + } if (code == ExceptionCode.WRITE_FAILURE) { WriteType writeType = Enum.valueOf(WriteType.class, CBUtil.readString(body)); - infos = new WriteFailureException(clt, writeType, received, blockFor, failures); + infos = new WriteFailureException(clt, writeType, received, blockFor, failures, failuresMap); } else { byte dataPresent = body.readByte(); - infos = new ReadFailureException(clt, received, blockFor, failures, dataPresent != 0); + infos = new ReadFailureException(clt, received, blockFor, failures, failuresMap, dataPresent != 0); } break; case UNPREPARED: diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadFailureException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadFailureException.java index ce9bdf56577..db6ed9b73fa 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadFailureException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadFailureException.java @@ -17,7 +17,10 @@ import com.datastax.driver.core.ConsistencyLevel; +import java.net.InetAddress; import java.net.InetSocketAddress; +import java.util.Collections; +import java.util.Map; /** * A non-timeout error during a read query. @@ -29,29 +32,48 @@ public class ReadFailureException extends QueryConsistencyException { private final int failed; private final boolean dataPresent; + private final Map failuresMap; /** * This constructor should only be used internally by the driver * when decoding error responses. */ + public ReadFailureException(ConsistencyLevel consistency, int received, int required, int failed, Map failuresMap, boolean dataPresent) { + this(null, consistency, received, required, failed, failuresMap, dataPresent); + } + + /** + * @deprecated Legacy constructor for backward compatibility. + */ + @Deprecated public ReadFailureException(ConsistencyLevel consistency, int received, int required, int failed, boolean dataPresent) { - this(null, consistency, received, required, failed, dataPresent); + this(null, consistency, received, required, failed, Collections.emptyMap(), dataPresent); } - public ReadFailureException(InetSocketAddress address, ConsistencyLevel consistency, int received, int required, int failed, boolean dataPresent) { + public ReadFailureException(InetSocketAddress address, ConsistencyLevel consistency, int received, int required, int failed, Map failuresMap, boolean dataPresent) { super(address, String.format("Cassandra failure during read query at consistency %s " - + "(%d responses were required but only %d replica responded, %d failed)", - consistency, required, received, failed), + + "(%d responses were required but only %d replica responded, %d failed)", + consistency, required, received, failed), consistency, received, required); this.failed = failed; + this.failuresMap = failuresMap; this.dataPresent = dataPresent; } - private ReadFailureException(InetSocketAddress address, String msg, Throwable cause, ConsistencyLevel consistency, int received, int required, int failed, boolean dataPresent) { + /** + * @deprecated Legacy constructor for backward compatibility. + */ + @Deprecated + public ReadFailureException(InetSocketAddress address, ConsistencyLevel consistency, int received, int required, int failed, boolean dataPresent) { + this(address, consistency, received, required, failed, Collections.emptyMap(), dataPresent); + } + + private ReadFailureException(InetSocketAddress address, String msg, Throwable cause, ConsistencyLevel consistency, int received, int required, int failed, Map failuresMap, boolean dataPresent) { super(address, msg, cause, consistency, received, required); this.failed = failed; + this.failuresMap = failuresMap; this.dataPresent = dataPresent; } @@ -64,6 +86,29 @@ public int getFailures() { return failed; } + /** + * Returns the a failure reason code for each node that failed. + *

    + * At the time of writing, the existing reason codes are: + *

      + *
    • {@code 0x0000}: the error does not have a specific code assigned yet, or the cause is + * unknown.
    • + *
    • {@code 0x0001}: The read operation scanned too many tombstones (as defined by + * {@code tombstone_failure_threshold} in {@code cassandra.yaml}, causing a + * {@code TombstoneOverwhelmingException}.
    • + *
    + * (please refer to the Cassandra documentation for your version for the most up-to-date list + * of errors) + *

    + * This feature is available for protocol v5 or above only. With lower protocol versions, the + * map will always be empty. + * + * @return a map of IP addresses to failure codes. + */ + public Map getFailuresMap() { + return failuresMap; + } + /** * Whether the actual data was amongst the received replica responses. *

    @@ -82,7 +127,7 @@ public boolean wasDataRetrieved() { @Override public ReadFailureException copy() { return new ReadFailureException(getAddress(), getMessage(), this, getConsistencyLevel(), getReceivedAcknowledgements(), - getRequiredAcknowledgements(), getFailures(), wasDataRetrieved()); + getRequiredAcknowledgements(), getFailures(), getFailuresMap(), wasDataRetrieved()); } public ReadFailureException copy(InetSocketAddress address) { @@ -94,6 +139,7 @@ public ReadFailureException copy(InetSocketAddress address) { getReceivedAcknowledgements(), getRequiredAcknowledgements(), failed, + getFailuresMap(), dataPresent); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteFailureException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteFailureException.java index 079c882c165..b4ef62d5009 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteFailureException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteFailureException.java @@ -18,7 +18,10 @@ import com.datastax.driver.core.ConsistencyLevel; import com.datastax.driver.core.WriteType; +import java.net.InetAddress; import java.net.InetSocketAddress; +import java.util.Collections; +import java.util.Map; /** * A non-timeout error during a write query. @@ -29,31 +32,50 @@ public class WriteFailureException extends QueryConsistencyException { private final WriteType writeType; private final int failed; + private final Map failuresMap; /** * This constructor should only be used internally by the driver * when decoding error responses. */ + public WriteFailureException(ConsistencyLevel consistency, WriteType writeType, int received, int required, int failed, Map failuresMap) { + this(null, consistency, writeType, received, required, failed, failuresMap); + } + + /** + * @deprecated Legacy constructor for backward compatibility. + */ + @Deprecated public WriteFailureException(ConsistencyLevel consistency, WriteType writeType, int received, int required, int failed) { - this(null, consistency, writeType, received, required, failed); + this(null, consistency, writeType, received, required, failed, Collections.emptyMap()); } - public WriteFailureException(InetSocketAddress address, ConsistencyLevel consistency, WriteType writeType, int received, int required, int failed) { + public WriteFailureException(InetSocketAddress address, ConsistencyLevel consistency, WriteType writeType, int received, int required, int failed, Map failuresMap) { super(address, String.format("Cassandra failure during write query at consistency %s " - + "(%d responses were required but only %d replica responded, %d failed)", - consistency, required, received, failed), + + "(%d responses were required but only %d replica responded, %d failed)", + consistency, required, received, failed), consistency, received, required); this.writeType = writeType; this.failed = failed; + this.failuresMap = failuresMap; + } + + /** + * @deprecated Legacy constructor for backward compatibility. + */ + @Deprecated + public WriteFailureException(InetSocketAddress address, ConsistencyLevel consistency, WriteType writeType, int received, int required, int failed) { + this(address, consistency, writeType, received, required, failed, Collections.emptyMap()); } private WriteFailureException(InetSocketAddress address, String msg, Throwable cause, - ConsistencyLevel consistency, WriteType writeType, int received, int required, int failed) { + ConsistencyLevel consistency, WriteType writeType, int received, int required, int failed, Map failuresMap) { super(address, msg, cause, consistency, received, required); this.writeType = writeType; this.failed = failed; + this.failuresMap = failuresMap; } /** @@ -74,10 +96,33 @@ public int getFailures() { return failed; } + /** + * Returns the a failure reason code for each node that failed. + *

    + * At the time of writing, the existing reason codes are: + *

      + *
    • {@code 0x0000}: the error does not have a specific code assigned yet, or the cause is + * unknown.
    • + *
    • {@code 0x0001}: The read operation scanned too many tombstones (as defined by + * {@code tombstone_failure_threshold} in {@code cassandra.yaml}, causing a + * {@code TombstoneOverwhelmingException}.
    • + *
    + * (please refer to the Cassandra documentation for your version for the most up-to-date list + * of errors) + *

    + * This feature is available for protocol v5 or above only. With lower protocol versions, the + * map will always be empty. + * + * @return a map of IP addresses to failure codes. + */ + public Map getFailuresMap() { + return failuresMap; + } + @Override public WriteFailureException copy() { return new WriteFailureException(getAddress(), getMessage(), this, getConsistencyLevel(), getWriteType(), - getReceivedAcknowledgements(), getRequiredAcknowledgements(), getFailures()); + getReceivedAcknowledgements(), getRequiredAcknowledgements(), getFailures(), failuresMap); } public WriteFailureException copy(InetSocketAddress address) { @@ -89,6 +134,7 @@ public WriteFailureException copy(InetSocketAddress address) { getWriteType(), getReceivedAcknowledgements(), getRequiredAcknowledgements(), - failed); + failed, + failuresMap); } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java new file mode 100644 index 00000000000..036a5762132 --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java @@ -0,0 +1,82 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * This software can be used solely with DataStax Enterprise. Please consult the license at + * http://www.datastax.com/terms/datastax-dse-driver-license-terms + */ +package com.datastax.driver.core.exceptions; + +import com.datastax.driver.core.*; +import com.datastax.driver.core.utils.CassandraVersion; +import org.testng.annotations.Test; + +import static com.datastax.driver.core.TestUtils.CREATE_KEYSPACE_SIMPLE_FORMAT; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +@CCMConfig(config = "tombstone_failure_threshold:1000", + numberOfNodes = 2, + jvmArgs = "-Dcassandra.test.fail_writes_ks=ks_write_fail") +@CassandraVersion("2.2.0") +public class ReadWriteFailureExceptionTest extends CCMTestsSupport { + /** + * Validates that ReadFailureException occurs, and that in the case of protocol v5 the reason map + * is surfaced appropriately on the exception. + * + * @jira_ticket JAVA-1424 + * @test_category error_codes + */ + @Test(groups = "long") + public void should_readFailure_on_tombstone_overwelmed() throws Throwable { + //Create a table and insert 2000 tombstones + session().execute("CREATE KEYSPACE ks_read_fail WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}"); + session().execute("CREATE TABLE ks_read_fail.foo(pk int, cc int, v int, primary key (pk, cc))"); + PreparedStatement prepared = session().prepare("INSERT INTO ks_read_fail.foo (pk, cc, v) VALUES (1, ?, null)"); + + for (int v = 0; v < 2000; v++) { + BoundStatement bound = prepared.bind(v); + session().execute(bound); + } + // Attempt a query, since our tombstone failure threshold is set to 1000 this should error + try { + ResultSet result = session().execute("SELECT * FROM ks_read_fail.foo WHERE pk = 1"); + fail("A ReadFailureException should have been thrown here"); + } catch (ReadFailureException e) { + if (cluster().getConfiguration().getProtocolOptions().getProtocolVersion().compareTo(ProtocolVersion.V5) >= 0) { + assertThat(e.getFailuresMap()) + .hasSize(1) + .containsValue(1); + } else { + assertThat(e.getFailuresMap()).isEmpty(); + } + } + } + + /** + * Validates that a WriteFailureException occurs. In the case of protocol > v5 the reason map + * is surfaced appropriately on the exception. + * + * @jira_ticket JAVA-1424 + * @test_category error_codes + */ + @Test(groups = "long") + public void should_writeFailure_on_error() throws Throwable { + // Creates the failure keyspace and a table. + session().execute(String.format(CREATE_KEYSPACE_SIMPLE_FORMAT, "ks_write_fail", 1)); + session().execute("CREATE TABLE ks_write_fail.foo(pk int, cc int, v int, primary key (pk, cc))"); + try { + // This should fail because we have a the jvm arg cassandra.test.fail_writes_ks=ks_write_fail set. + session().execute("INSERT INTO ks_write_fail.foo (pk, cc, v) VALUES (1, 1, null)"); + fail("A WriteFailureException should have been thrown here"); + } catch (WriteFailureException e) { + + if (cluster().getConfiguration().getProtocolOptions().getProtocolVersion().compareTo(ProtocolVersion.V5) >= 0) { + assertThat(e.getFailuresMap()) + .hasSize(1) + .containsValue(0); + } else { + assertThat(e.getFailuresMap()).isEmpty(); + } + } + } +} \ No newline at end of file From 25499d644d4e9847eac4acc067780329d5638e8d Mon Sep 17 00:00:00 2001 From: olim7t Date: Thu, 23 Mar 2017 10:13:38 -0700 Subject: [PATCH 076/512] Revert "JAVA-1241: Upgrade Netty to 4.1.x" This reverts commit f2468d328c62129c21fcd6db54af6d17b8b792de. --- changelog/README.md | 1 + driver-core/pom.xml | 2 -- .../src/test/java/com/datastax/driver/osgi/BundleOptions.java | 3 +-- pom.xml | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index a3ceeb56e06..faf63d7b192 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -22,6 +22,7 @@ - [improvement] JAVA-1310: Make mapper's ignored properties configurable. - [improvement] JAVA-1316: Add strategy for resolving properties into CQL names. - [bug] JAVA-1424: Handle new WRITE_FAILURE and READ_FAILURE format in v5 protocol. +- revert JAVA-1241 (go back to Netty 4.0) Merged from 3.1.x branch: diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 77d68eeb17d..a58366cb91e 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -269,8 +269,6 @@ META-INF/maven/io.netty/netty-common/pom.xml META-INF/maven/io.netty/netty-handler/pom.properties META-INF/maven/io.netty/netty-handler/pom.xml - META-INF/maven/io.netty/netty-resolver/pom.properties - META-INF/maven/io.netty/netty-resolver/pom.xml META-INF/maven/io.netty/netty-transport/pom.properties META-INF/maven/io.netty/netty-transport/pom.xml diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java index 08e09612d8e..aa22917e1f5 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java @@ -103,8 +103,7 @@ public Option[] getOptions() { mavenBundle("io.netty", "netty-codec", nettyVersion), mavenBundle("io.netty", "netty-common", nettyVersion), mavenBundle("io.netty", "netty-handler", nettyVersion), - mavenBundle("io.netty", "netty-transport", nettyVersion), - mavenBundle("io.netty", "netty-resolver", nettyVersion) + mavenBundle("io.netty", "netty-transport", nettyVersion) ); } }; diff --git a/pom.xml b/pom.xml index 61dcd38e7a3..304adaffaeb 100644 --- a/pom.xml +++ b/pom.xml @@ -51,7 +51,7 @@ 1.2.17 1.7.6 19.0 - 4.1.8.Final + 4.0.44.Final 3.1.2 1.1.2.6 1.3.0 From 427afda84afeb788319fb182f8e3ea8fb343aa1c Mon Sep 17 00:00:00 2001 From: olim7t Date: Thu, 23 Mar 2017 10:18:06 -0700 Subject: [PATCH 077/512] Fix wrong license header --- .../exceptions/ReadWriteFailureExceptionTest.java | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java index 036a5762132..ed2a49770bb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java @@ -1,8 +1,17 @@ /* - * Copyright (C) 2012-2017 DataStax Inc. + * Copyright (C) 2012-2015 DataStax Inc. * - * This software can be used solely with DataStax Enterprise. Please consult the license at - * http://www.datastax.com/terms/datastax-dse-driver-license-terms + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; From 204081a43e5cf8a260c02e7dc4b08783e146aa8b Mon Sep 17 00:00:00 2001 From: olim7t Date: Thu, 23 Mar 2017 11:09:23 -0700 Subject: [PATCH 078/512] Update javadoc links in manual --- docs.yaml | 1 + faq/README.md | 2 +- faq/osgi/README.md | 2 +- manual/README.md | 30 +++++------ manual/address_resolution/README.md | 4 +- manual/async/README.md | 8 +-- manual/auth/README.md | 2 +- manual/custom_codecs/README.md | 38 +++++++------- manual/custom_codecs/extras/README.md | 42 +++++++-------- manual/custom_payloads/README.md | 4 +- manual/idempotence/README.md | 6 +-- manual/load_balancing/README.md | 34 ++++++------ manual/logging/README.md | 2 +- manual/metadata/README.md | 38 +++++++------- manual/metrics/README.md | 2 +- manual/native_protocol/README.md | 10 ++-- manual/object_mapper/creating/README.md | 24 ++++----- manual/object_mapper/custom_codecs/README.md | 6 +-- manual/object_mapper/using/README.md | 18 +++---- manual/paging/README.md | 4 +- manual/pooling/README.md | 26 +++++----- manual/query_timestamps/README.md | 8 +-- manual/reconnection/README.md | 2 +- manual/retries/README.md | 54 ++++++++++---------- manual/shaded_jar/README.md | 2 +- manual/socket_options/README.md | 24 ++++----- manual/speculative_execution/README.md | 18 +++---- manual/ssl/README.md | 10 ++-- manual/statements/README.md | 16 +++--- manual/statements/batch/README.md | 2 +- manual/statements/built/README.md | 2 +- manual/statements/prepared/README.md | 12 ++--- manual/statements/simple/README.md | 2 +- manual/tuples/README.md | 2 +- manual/udts/README.md | 2 +- 35 files changed, 230 insertions(+), 229 deletions(-) diff --git a/docs.yaml b/docs.yaml index d495d3b3566..da19065929a 100644 --- a/docs.yaml +++ b/docs.yaml @@ -45,6 +45,7 @@ links: - title: Releases href: https://github.com/datastax/java-driver/releases api_docs: + 3.1: http://docs.datastax.com/en/drivers/java/3.2 3.1: http://docs.datastax.com/en/drivers/java/3.1 3.0: http://docs.datastax.com/en/drivers/java/3.0 2.1: http://docs.datastax.com/en/drivers/java/2.1 diff --git a/faq/README.md b/faq/README.md index d3d19aad32c..94ec3974191 100644 --- a/faq/README.md +++ b/faq/README.md @@ -35,7 +35,7 @@ row.getBool(0); // this is equivalent row.getBool("applied") Note that, unlike manual inspection, `wasApplied` does not consume the first row. -[wasApplied]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/ResultSet.html#wasApplied-- +[wasApplied]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html#wasApplied-- ### What is a parameterized statement and how can I use it? diff --git a/faq/osgi/README.md b/faq/osgi/README.md index cfdb54ab11d..3df525d41b4 100644 --- a/faq/osgi/README.md +++ b/faq/osgi/README.md @@ -195,7 +195,7 @@ it is also normal to see the following log lines when starting the driver: [BND]:http://www.aqute.biz/Bnd [Maven bundle plugin]:https://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Maven+Bundle+Plugin+%28BND%29 [OSGi examples repository]:https://github.com/datastax/java-driver-examples-osgi -[without metrics]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.Builder.html#withoutMetrics-- +[without metrics]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.Builder.html#withoutMetrics-- [SLF4J]:http://www.slf4j.org/ [Logback]:http://logback.qos.ch/ [Tycho]:https://eclipse.org/tycho/ diff --git a/manual/README.md b/manual/README.md index 6d0b4ab027c..019d9941290 100644 --- a/manual/README.md +++ b/manual/README.md @@ -209,7 +209,7 @@ String firstName = row.getString("first_name"); blob getBytes java.nio.ByteBuffer boolean getBool boolean counter getLong long - date getDate LocalDate + date getDate LocalDate decimal getDecimal java.math.BigDecimal double getDouble double float getFloat float @@ -286,17 +286,17 @@ menu on the left hand side to navigate sub-sections. If you're [browsing the sou github.com](https://github.com/datastax/java-driver/tree/3.x/manual), simply navigate to each sub-directory. -[Cluster]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.html -[Cluster.Builder]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.Builder.html -[Initializer]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.Initializer.html -[Session]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.html -[ResultSet]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ResultSet.html -[Row]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Row.html -[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/NettyOptions.html -[QueryOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/QueryOptions.html -[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html -[Host.StateListener]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Host.StateListener.html -[LatencyTracker]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/LatencyTracker.html -[SchemaChangeListener]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SchemaChangeListener.html -[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/NoHostAvailableException.html -[LocalDate]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/LocalDate.html \ No newline at end of file +[Cluster]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.html +[Cluster.Builder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.Builder.html +[Initializer]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.Initializer.html +[Session]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html +[ResultSet]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html +[Row]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Row.html +[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/NettyOptions.html +[QueryOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html +[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html +[Host.StateListener]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Host.StateListener.html +[LatencyTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/LatencyTracker.html +[SchemaChangeListener]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SchemaChangeListener.html +[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[LocalDate]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/LocalDate.html \ No newline at end of file diff --git a/manual/address_resolution/README.md b/manual/address_resolution/README.md index 82b945b041f..619fdf574d3 100644 --- a/manual/address_resolution/README.md +++ b/manual/address_resolution/README.md @@ -102,8 +102,8 @@ private/public switch automatically based on location). -[AddressTranslator]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/AddressTranslator.html -[EC2MultiRegionAddressTranslator]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslator.html +[AddressTranslator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/AddressTranslator.html +[EC2MultiRegionAddressTranslator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslator.html [cassandra.yaml]: https://docs.datastax.com/en/cassandra/3.x/cassandra/configuration/configCassandra_yaml.html [rpc_address]: https://docs.datastax.com/en/cassandra/3.x/cassandra/configuration/configCassandra_yaml.html?scroll=configCassandra_yaml__rpc_address diff --git a/manual/async/README.md b/manual/async/README.md index c834abbfe8a..abc93059f21 100644 --- a/manual/async/README.md +++ b/manual/async/README.md @@ -51,8 +51,8 @@ to the current page, and [fetchMoreResults] to get a future to the next page (see also the section on [paging](../paging/)). Here is a full example: -[getAvailableWithoutFetching]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ResultSet.html#getAvailableWithoutFetching-- -[fetchMoreResults]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ResultSet.html#fetchMoreResults-- +[getAvailableWithoutFetching]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html#getAvailableWithoutFetching-- +[fetchMoreResults]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html#fetchMoreResults-- ```java Statement statement = new SimpleStatement("select * from foo").setFetchSize(20); @@ -134,5 +134,5 @@ There are still a few places where the driver will block internally hasn't been fetched already. [ListenableFuture]: https://github.com/google/guava/wiki/ListenableFutureExplained -[init]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.html#init-- -[query trace]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/QueryTrace.html +[init]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.html#init-- +[query trace]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryTrace.html diff --git a/manual/auth/README.md b/manual/auth/README.md index 4040345b4de..430e776fa4b 100644 --- a/manual/auth/README.md +++ b/manual/auth/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [AuthProvider].* -[AuthProvider]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/AuthProvider.html \ No newline at end of file +[AuthProvider]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AuthProvider.html \ No newline at end of file diff --git a/manual/custom_codecs/README.md b/manual/custom_codecs/README.md index b4e0d3ef040..a45e1baed19 100644 --- a/manual/custom_codecs/README.md +++ b/manual/custom_codecs/README.md @@ -446,26 +446,26 @@ Beware that in these cases, the lookup performs in average 10x worse. If perform consider using prepared statements all the time. [JAVA-721]: https://datastax-oss.atlassian.net/browse/JAVA-721 -[TypeCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TypeCodec.html -[LocalDate]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/LocalDate.html +[TypeCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html +[LocalDate]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/LocalDate.html [ByteBuffer]: http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html -[serialize]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TypeCodec.html#serialize-T-com.datastax.driver.core.ProtocolVersion- -[deserialize]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TypeCodec.html#deserialize-java.nio.ByteBuffer-com.datastax.driver.core.ProtocolVersion- -[TypeCodec.format]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TypeCodec.html#format-T- -[TypeCodec.parse]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TypeCodec.html#parse-java.lang.String- -[accepts]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TypeCodec.html#accepts-com.datastax.driver.core.DataType- -[CodecRegistry]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/CodecRegistry.html -[CodecNotFoundException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/CodecNotFoundException.html +[serialize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#serialize-T-com.datastax.driver.core.ProtocolVersion- +[deserialize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#deserialize-java.nio.ByteBuffer-com.datastax.driver.core.ProtocolVersion- +[TypeCodec.format]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#format-T- +[TypeCodec.parse]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#parse-java.lang.String- +[accepts]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#accepts-com.datastax.driver.core.DataType- +[CodecRegistry]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/CodecRegistry.html +[CodecNotFoundException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/CodecNotFoundException.html [Jackson]: http://wiki.fasterxml.com/JacksonHome [AbstractType]: https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/marshal/AbstractType.java -[UserType]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/UserType.html -[UDTValue]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/UDTValue.html -[TupleType]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TupleType.html -[TupleValue]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TupleValue.html -[CustomType]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/DataType.CustomType.html +[UserType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/UserType.html +[UDTValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/UDTValue.html +[TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html +[TupleValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleValue.html +[CustomType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/DataType.CustomType.html [TypeToken]: http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/reflect/TypeToken.html -[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SimpleStatement.html -[BuiltStatement]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/querybuilder/BuiltStatement.html -[setList]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SettableByIndexData.html#setList-int-java.util.List- -[setSet]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SettableByIndexData.html#setSet-int-java.util.Set- -[setMap]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SettableByIndexData.html#setMap-int-java.util.Map- +[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SimpleStatement.html +[BuiltStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/BuiltStatement.html +[setList]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SettableByIndexData.html#setList-int-java.util.List- +[setSet]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SettableByIndexData.html#setSet-int-java.util.Set- +[setMap]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SettableByIndexData.html#setMap-int-java.util.Map- diff --git a/manual/custom_codecs/extras/README.md b/manual/custom_codecs/extras/README.md index b2a995633c7..0497cd23f5d 100644 --- a/manual/custom_codecs/extras/README.md +++ b/manual/custom_codecs/extras/README.md @@ -58,10 +58,10 @@ session.execute("INSERT INTO example (id, t) VALUES (1, ?)", ZonedDateTime.parse("2010-06-30T01:20:47.999+01:00")); ``` -[InstantCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/jdk8/InstantCodec.html -[LocalDateCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.html -[LocalTimeCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.html -[ZonedDateTimeCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.html +[InstantCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/InstantCodec.html +[LocalDateCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.html +[LocalTimeCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.html +[ZonedDateTimeCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.html [Instant]: https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html [LocalDate]: https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html [LocalTime]: https://docs.oracle.com/javase/8/docs/api/java/time/LocalTime.html @@ -111,10 +111,10 @@ session.execute("INSERT INTO example (id, t) VALUES (1, ?)", DateTime.parse("2010-06-30T01:20:47.999+01:00")); ``` -[InstantCodec_joda]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/joda/InstantCodec.html -[LocalDateCodec_joda]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/joda/LocalDateCodec.html -[LocalTimeCodec_joda]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.html -[DateTimeCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/joda/DateTimeCodec.html +[InstantCodec_joda]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/joda/InstantCodec.html +[LocalDateCodec_joda]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/joda/LocalDateCodec.html +[LocalTimeCodec_joda]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.html +[DateTimeCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/joda/DateTimeCodec.html [DateTime]: http://www.joda.org/joda-time/apidocs/org/joda/time/DateTime.html [Instant_joda]: http://www.joda.org/joda-time/apidocs/org/joda/time/Instant.html [LocalDate_joda]: http://www.joda.org/joda-time/apidocs/org/joda/time/LocalDate.html @@ -132,8 +132,8 @@ Time can also be expressed as simple durations: There is no extra codec for `time`, because by default the driver already maps that type to a `long` representing the number of milliseconds since midnight. -[SimpleTimestampCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/date/SimpleTimestampCodec.html -[SimpleDateCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/date/SimpleDateCodec.html +[SimpleTimestampCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/date/SimpleTimestampCodec.html +[SimpleDateCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/date/SimpleDateCodec.html ### Enums @@ -171,8 +171,8 @@ Note that if you registered an `EnumNameCodec` and an `EnumOrdinalCodec` _for th In practice, this is unlikely to happen, because you'll probably stick to a single CQL type for a given enum type; however, if you ever run into that issue, the workaround is to use [prepared statements](../../statements/prepared/), for which the driver knows the CQL type and can pick the exact codec. -[EnumNameCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/enums/EnumNameCodec.html -[EnumOrdinalCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/enums/EnumOrdinalCodec.html +[EnumNameCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/enums/EnumNameCodec.html +[EnumOrdinalCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/enums/EnumOrdinalCodec.html [name]: https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#name-- [ordinal]: https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#ordinal-- @@ -217,7 +217,7 @@ session.execute("insert into example (id, owner) values (1, ?)", // owner saved as '{"id":1,"name":"root"}' ``` -[JacksonJsonCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.html +[JacksonJsonCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.html [Jackson]: http://wiki.fasterxml.com/JacksonHome @@ -256,7 +256,7 @@ session.execute("insert into example (id, owner) values (1, ?)", ``` -[Jsr353JsonCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.html +[Jsr353JsonCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.html [JsonStructure]: https://javaee-spec.java.net/nonav/javadocs/javax/json/JsonStructure.html @@ -309,7 +309,7 @@ For the same reason, we need to give a type hint when setting "v", in the form o anonymous inner class; we recommend storing these tokens as constants in a utility class, to avoid creating them too often. -[OptionalCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.html +[OptionalCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.html [Optional]: https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html [TypeToken]: http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/reflect/TypeToken.html @@ -353,7 +353,7 @@ session.execute(pst.bind() See the JDK8 Optional section above for explanations about [TypeToken]. -[OptionalCodec_guava]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/guava/OptionalCodec.html +[OptionalCodec_guava]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/guava/OptionalCodec.html [Optional_guava]: http://docs.guava-libraries.googlecode.com/git-history/v16.0.1/javadoc/com/google/common/base/Optional.html @@ -378,9 +378,9 @@ session.execute("insert into example (i, l) values (1, ?)", Package [com.datastax.driver.extras.codecs.arrays][arrays] contains similar codecs for all primitive types, and [ObjectArrayCodec] to map arrays of objects. -[IntArrayCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/arrays/IntArrayCodec.html -[ObjectArrayCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/arrays/ObjectArrayCodec.html -[arrays]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/arrays/package-summary.html +[IntArrayCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/arrays/IntArrayCodec.html +[ObjectArrayCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/arrays/ObjectArrayCodec.html +[arrays]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/arrays/package-summary.html ### Abstract utilities @@ -410,5 +410,5 @@ These two classes are convenient, but since they perform conversions in two step optimal approach. If performance is paramount, it's better to start from scratch and convert your objects to `ByteBuffer` directly. -[MappingCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/MappingCodec.html -[ParsingCodec]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/extras/codecs/ParsingCodec.html +[MappingCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/MappingCodec.html +[ParsingCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/ParsingCodec.html diff --git a/manual/custom_payloads/README.md b/manual/custom_payloads/README.md index 00009a623fe..d0b68a677ed 100644 --- a/manual/custom_payloads/README.md +++ b/manual/custom_payloads/README.md @@ -241,8 +241,8 @@ The log message contains a pretty-printed version of the payload itself, and its [CASSANDRA-8553]: https://issues.apache.org/jira/browse/CASSANDRA-8553 [v4spec]: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec [qh]: https://issues.apache.org/jira/browse/CASSANDRA-6659 -[nhae]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[nhae]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html [chm]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html [immutablemap]: http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/ImmutableMap.html -[ufe]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/UnsupportedFeatureException.html +[ufe]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/UnsupportedFeatureException.html diff --git a/manual/idempotence/README.md b/manual/idempotence/README.md index 4a1118e5a0a..4d2b0816965 100644 --- a/manual/idempotence/README.md +++ b/manual/idempotence/README.md @@ -125,8 +125,8 @@ broke linearizability by doing a transparent retry at step 6. If linearizability is important for you, you should ensure that lightweight transactions are appropriately flagged as not idempotent. -[isIdempotent]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Statement.html#isIdempotent-- -[setDefaultIdempotence]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/QueryOptions.html#setDefaultIdempotence-boolean- -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/querybuilder/QueryBuilder.html +[isIdempotent]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html#isIdempotent-- +[setDefaultIdempotence]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setDefaultIdempotence-boolean- +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/QueryBuilder.html [linearizability]: https://en.wikipedia.org/wiki/Linearizability#Definition_of_linearizability \ No newline at end of file diff --git a/manual/load_balancing/README.md b/manual/load_balancing/README.md index 5ec39a89a0c..f6b180ccbf3 100644 --- a/manual/load_balancing/README.md +++ b/manual/load_balancing/README.md @@ -295,11 +295,11 @@ For any host, the distance returned by the policy is always the same as its chil Query plans are based on the child policy's, except that hosts that are currently excluded for being too slow are moved to the end of the plan. -[withExclusionThreshold]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withExclusionThreshold-double- -[withMininumMeasurements]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withMininumMeasurements-int- -[withRetryPeriod]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withRetryPeriod-long-java.util.concurrent.TimeUnit- -[withScale]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withScale-long-java.util.concurrent.TimeUnit- -[withUpdateRate]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withUpdateRate-long-java.util.concurrent.TimeUnit- +[withExclusionThreshold]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withExclusionThreshold-double- +[withMininumMeasurements]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withMininumMeasurements-int- +[withRetryPeriod]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withRetryPeriod-long-java.util.concurrent.TimeUnit- +[withScale]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withScale-long-java.util.concurrent.TimeUnit- +[withUpdateRate]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withUpdateRate-long-java.util.concurrent.TimeUnit- ### Filtering policies @@ -317,15 +317,15 @@ studying the existing implementations first: `RoundRobinPolicy` is a good place complex ones like `DCAwareRoundRobinPolicy`. -[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LoadBalancingPolicy.html -[RoundRobinPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RoundRobinPolicy.html -[DCAwareRoundRobinPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.html -[TokenAwarePolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/TokenAwarePolicy.html -[LatencyAwarePolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LatencyAwarePolicy.html -[HostFilterPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/HostFilterPolicy.html -[WhiteListPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/WhiteListPolicy.html -[HostDistance]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/HostDistance.html -[refreshConnectedHosts]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PoolingOptions.html#refreshConnectedHosts-- -[setMetadataEnabled]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/QueryOptions.html#setMetadataEnabled-boolean- -[Statement#getKeyspace]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Statement.html#getKeyspace-- -[Statement#getRoutingKey]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Statement.html#getRoutingKey-- +[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LoadBalancingPolicy.html +[RoundRobinPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RoundRobinPolicy.html +[DCAwareRoundRobinPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.html +[TokenAwarePolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/TokenAwarePolicy.html +[LatencyAwarePolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.html +[HostFilterPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/HostFilterPolicy.html +[WhiteListPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/WhiteListPolicy.html +[HostDistance]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/HostDistance.html +[refreshConnectedHosts]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#refreshConnectedHosts-- +[setMetadataEnabled]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setMetadataEnabled-boolean- +[Statement#getKeyspace]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html#getKeyspace-- +[Statement#getRoutingKey]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html#getRoutingKey-- diff --git a/manual/logging/README.md b/manual/logging/README.md index af8c7336c76..3002b8c21a3 100644 --- a/manual/logging/README.md +++ b/manual/logging/README.md @@ -302,4 +302,4 @@ It also turns on slow query tracing as described above. ``` -[query_logger]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/QueryLogger.html +[query_logger]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryLogger.html diff --git a/manual/metadata/README.md b/manual/metadata/README.md index c58aa411fa8..4e4fd708ffd 100644 --- a/manual/metadata/README.md +++ b/manual/metadata/README.md @@ -4,7 +4,7 @@ The driver maintains global information about the Cassandra cluster it is connected to. It is available via [Cluster#getMetadata()][getMetadata]. -[getMetadata]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.html#getMetadata-- +[getMetadata]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.html#getMetadata-- ### Schema metadata @@ -12,8 +12,8 @@ Use [getKeyspace(String)][getKeyspace] or [getKeyspaces()][getKeyspaces] to get keyspace-level metadata. From there you can access the keyspace's objects (tables, and UDTs and UDFs if relevant). -[getKeyspace]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html#getKeyspace-java.lang.String- -[getKeyspaces]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html#getKeyspaces-- +[getKeyspace]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getKeyspace-java.lang.String- +[getKeyspaces]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getKeyspaces-- #### Refreshes @@ -47,8 +47,8 @@ Note that it is preferable to register a listener only *after* the cluster is fu otherwise the listener could be notified with a great deal of "Added" events as the driver builds the schema metadata from scratch for the first time. -[SchemaChangeListener]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SchemaChangeListener.html -[registerListener]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.html#register-com.datastax.driver.core.SchemaChangeListener- +[SchemaChangeListener]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SchemaChangeListener.html +[registerListener]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.html#register-com.datastax.driver.core.SchemaChangeListener- #### Schema agreement @@ -135,9 +135,9 @@ custom executor). Check out the API docs for the features in this section: -* [withMaxSchemaAgreementWaitSeconds(int)](http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Cluster.Builder.html#withMaxSchemaAgreementWaitSeconds-int-) -* [isSchemaInAgreement()](http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ExecutionInfo.html#isSchemaInAgreement--) -* [checkSchemaAgreement()](http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html#checkSchemaAgreement--) +* [withMaxSchemaAgreementWaitSeconds(int)](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.Builder.html#withMaxSchemaAgreementWaitSeconds-int-) +* [isSchemaInAgreement()](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ExecutionInfo.html#isSchemaInAgreement--) +* [checkSchemaAgreement()](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#checkSchemaAgreement--) ### Token metadata @@ -181,14 +181,14 @@ Starting with Cassandra 2.1.5, this information is available in a system table (see [CASSANDRA-7688](https://issues.apache.org/jira/browse/CASSANDRA-7688)). -[metadata]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html -[getTokenRanges]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html#getTokenRanges-- -[getTokenRanges2]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html#getTokenRanges-java.lang.String-com.datastax.driver.core.Host- -[getReplicas]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html#getReplicas-java.lang.String-com.datastax.driver.core.TokenRange- -[newToken]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html#newToken-java.lang.String- -[newTokenRange]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metadata.html#newTokenRange-com.datastax.driver.core.Token-com.datastax.driver.core.Token- -[TokenRange]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TokenRange.html -[getTokens]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Host.html#getTokens-- -[setToken]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/BoundStatement.html#setToken-int-com.datastax.driver.core.Token- -[getToken]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Row.html#getToken-int- -[getPKToken]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Row.html#getPartitionKeyToken-- +[metadata]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html +[getTokenRanges]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getTokenRanges-- +[getTokenRanges2]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getTokenRanges-java.lang.String-com.datastax.driver.core.Host- +[getReplicas]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getReplicas-java.lang.String-com.datastax.driver.core.TokenRange- +[newToken]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#newToken-java.lang.String- +[newTokenRange]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#newTokenRange-com.datastax.driver.core.Token-com.datastax.driver.core.Token- +[TokenRange]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TokenRange.html +[getTokens]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Host.html#getTokens-- +[setToken]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BoundStatement.html#setToken-int-com.datastax.driver.core.Token- +[getToken]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Row.html#getToken-int- +[getPKToken]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Row.html#getPartitionKeyToken-- diff --git a/manual/metrics/README.md b/manual/metrics/README.md index 841ed0ffe64..7dc741bc4c9 100644 --- a/manual/metrics/README.md +++ b/manual/metrics/README.md @@ -9,4 +9,4 @@ TODO cover: - getMetrics() returns null until Cluster initialized --> -[Metrics]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metrics.html \ No newline at end of file +[Metrics]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.html \ No newline at end of file diff --git a/manual/native_protocol/README.md b/manual/native_protocol/README.md index e81eba98514..be945e75664 100644 --- a/manual/native_protocol/README.md +++ b/manual/native_protocol/README.md @@ -63,7 +63,7 @@ All host(s) tried for query failed [/127.0.0.1:9042] Host /127.0.0.1:9042 does not support protocol version V3 but V2)) ``` -[gpv]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- +[gpv]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- #### Protocol version with mixed clusters @@ -94,19 +94,19 @@ To avoid this issue, you can use one the following workarounds: #### v1 to v2 * bound variables in simple statements - ([Session#execute(String, Object...)](http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.html#execute-java.lang.String-java.lang.Object...-)) -* [batch statements](http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/BatchStatement.html) + ([Session#execute(String, Object...)](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-java.lang.String-java.lang.Object...-)) +* [batch statements](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html) * [query paging](../paging/) #### v2 to v3 * the number of stream ids per connection goes from 128 to 32768 (see [Connection pooling](../pooling/)) -* [serial consistency on batch statements](http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/BatchStatement.html#setSerialConsistencyLevel-com.datastax.driver.core.ConsistencyLevel-) +* [serial consistency on batch statements](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html#setSerialConsistencyLevel-com.datastax.driver.core.ConsistencyLevel-) * [client-side timestamps](../query_timestamps/) #### v3 to v4 -* [query warnings](http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ExecutionInfo.html#getWarnings--) +* [query warnings](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ExecutionInfo.html#getWarnings--) * allowed unset values in bound statements * [Custom payloads](../custom_payloads/) diff --git a/manual/object_mapper/creating/README.md b/manual/object_mapper/creating/README.md index 0a5929d94ed..cbb14bf2244 100644 --- a/manual/object_mapper/creating/README.md +++ b/manual/object_mapper/creating/README.md @@ -149,9 +149,9 @@ User user = new User() .setName("John Doe"); ``` -[table]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Table.html +[table]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Table.html [case-sensitive]:http://docs.datastax.com/en/cql/3.3/cql/cql_reference/ucase-lcase_r.html -[consistency level]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ConsistencyLevel.html +[consistency level]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ConsistencyLevel.html [java-beans]:https://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html [set-accessible]:https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/AccessibleObject.html#setAccessible-boolean- @@ -189,7 +189,7 @@ CREATE TABLE users(id uuid PRIMARY KEY, "userName" text); private String userName; ``` -[column]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Column.html +[column]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Column.html #### Primary key fields @@ -213,8 +213,8 @@ private String areaCode; The order of the indices must match that of the columns in the table declaration. -[pk]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/PartitionKey.html -[cc]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/ClusteringColumn.html +[pk]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/PartitionKey.html +[cc]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/ClusteringColumn.html [pks]:http://thelastpickle.com/blog/2013/01/11/primary-keys-in-cql.html #### Computed fields @@ -250,7 +250,7 @@ version (see [JAVA-832](https://datastax-oss.atlassian.net/browse/JAVA-832)). [User Defined Functions]:http://www.planetcassandra.org/blog/user-defined-functions-in-cassandra-3-0/ -[computed]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Computed.html +[computed]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Computed.html #### Transient properties @@ -259,7 +259,7 @@ to table columns. [@Transient][transient] can be used to prevent a field or a Java bean property from being mapped. Like other column-level annotations, it should be placed on either the field declaration or the property getter method. -[transient]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Transient.html +[transient]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Transient.html ### Mapping User Types @@ -322,8 +322,8 @@ This also works with UDTs inside collections or other UDTs, with any arbitrary nesting level. [User Defined Types]: ../../udts/ -[udt]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/UDT.html -[field]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Field.html +[udt]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/UDT.html +[field]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Field.html ### Mapping collections @@ -359,9 +359,9 @@ private Map> frozenKeyValueMap; private Map> frozenValueMap; ``` -[frozen]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Frozen.html -[frozenkey]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/FrozenKey.html -[frozenvalue]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/FrozenValue.html +[frozen]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Frozen.html +[frozenkey]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/FrozenKey.html +[frozenvalue]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/FrozenValue.html ### Polymorphism support diff --git a/manual/object_mapper/custom_codecs/README.md b/manual/object_mapper/custom_codecs/README.md index 032b819e964..148164ad115 100644 --- a/manual/object_mapper/custom_codecs/README.md +++ b/manual/object_mapper/custom_codecs/README.md @@ -98,9 +98,9 @@ instance (one per column) and cache it for future use. This also works with [@Field][field] and [@Param][param] annotations. -[column]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Column.html -[field]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Field.html -[param]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Param.html +[column]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Column.html +[field]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Field.html +[param]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Param.html ## Implicit UDT codecs diff --git a/manual/object_mapper/using/README.md b/manual/object_mapper/using/README.md index 651477c75cf..e6559db79f4 100644 --- a/manual/object_mapper/using/README.md +++ b/manual/object_mapper/using/README.md @@ -28,9 +28,9 @@ Mapper mapper = manager.mapper(User.class); calling `manager#mapper` more than once for the same class will return the previously generated mapper. -[Mapper]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/Mapper.html -[MappingManager]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/MappingManager.html -[Session]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.html +[Mapper]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/Mapper.html +[MappingManager]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/MappingManager.html +[Session]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html #### Basic CRUD operations @@ -178,7 +178,7 @@ It provides methods `one()`, `all()`, `iterator()`, `getExecutionInfo()` and `isExhausted()`. Note that iterating the `Result` will consume the `ResultSet`, and vice-versa. -[Result]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/Result.html +[Result]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/Result.html ### Accessors @@ -228,7 +228,7 @@ corresponds to which marker: ResultSet insert(@Param("u") UUID userId, @Param("n") String name); ``` -[param]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/Param.html +[param]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Param.html If a method argument is a Java enumeration, it must be annotated with `@Enumerated` to indicate how to convert it to a CQL type (the rules are @@ -296,7 +296,7 @@ query with the annotation [@QueryParameters]. Then, options like public ListenableFuture> getAllAsync(); ``` -[@QueryParameters]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/annotations/QueryParameters.html +[@QueryParameters]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/QueryParameters.html ### Mapping configuration @@ -340,6 +340,6 @@ PropertyMapper propertyMapper = new DefaultPropertyMapper() There is more to `DefaultPropertyMapper`; see the Javadocs and implementation for details. -[MappingConfiguration]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/MappingConfiguration.html -[PropertyMapper]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/PropertyMapper.html -[DefaultPropertyMapper]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/mapping/DefaultPropertyMapper.html +[MappingConfiguration]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/MappingConfiguration.html +[PropertyMapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/PropertyMapper.html +[DefaultPropertyMapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/DefaultPropertyMapper.html diff --git a/manual/paging/README.md b/manual/paging/README.md index e969424228e..b3246eb0773 100644 --- a/manual/paging/README.md +++ b/manual/paging/README.md @@ -176,8 +176,8 @@ if (nextPage != null) { } ``` -[result_set]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ResultSet.html -[paging_state]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PagingState.html +[result_set]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html +[paging_state]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PagingState.html Due to internal implementation details, `PagingState` instances are not diff --git a/manual/pooling/README.md b/manual/pooling/README.md index 729489b7b36..f8dbd94bd27 100644 --- a/manual/pooling/README.md +++ b/manual/pooling/README.md @@ -283,16 +283,16 @@ either: [newConnectionThreshold][nct] so that enough connections are added by the time you reach the bottleneck. -[result_set_future]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ResultSetFuture.html -[pooling_options]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PoolingOptions.html -[lbp]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LoadBalancingPolicy.html -[nct]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PoolingOptions.html#setNewConnectionThreshold-com.datastax.driver.core.HostDistance-int- -[mrpc]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PoolingOptions.html#setMaxRequestsPerConnection-com.datastax.driver.core.HostDistance-int- -[sits]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PoolingOptions.html#setIdleTimeoutSeconds-int- -[rtm]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#getReadTimeoutMillis-- -[smqs]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PoolingOptions.html#setMaxQueueSize-int- -[sptm]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PoolingOptions.html#setPoolTimeoutMillis-int- -[nhae]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/NoHostAvailableException.html -[getErrors]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- -[get_state]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.html#getState-- -[BusyPoolException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/BusyPoolException.html +[result_set_future]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSetFuture.html +[pooling_options]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html +[lbp]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LoadBalancingPolicy.html +[nct]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setNewConnectionThreshold-com.datastax.driver.core.HostDistance-int- +[mrpc]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setMaxRequestsPerConnection-com.datastax.driver.core.HostDistance-int- +[sits]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setIdleTimeoutSeconds-int- +[rtm]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#getReadTimeoutMillis-- +[smqs]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setMaxQueueSize-int- +[sptm]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setPoolTimeoutMillis-int- +[nhae]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[getErrors]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- +[get_state]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#getState-- +[BusyPoolException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/BusyPoolException.html diff --git a/manual/query_timestamps/README.md b/manual/query_timestamps/README.md index 1cff906c85d..249d62ad908 100644 --- a/manual/query_timestamps/README.md +++ b/manual/query_timestamps/README.md @@ -42,8 +42,8 @@ statement.setDefaultTimestamp(1234567890); session.execute(statement); ``` -[tsg]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TimestampGenerator.html -[amtsg]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html +[tsg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TimestampGenerator.html +[amtsg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html ### Server-side generation @@ -70,8 +70,8 @@ that there is a risk of timestamp collision with this generator when accessed by thread; only use it when threads are not in direct competition for timestamp ties (i.e., they are executing independent statements). -[amtsg]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html -[tlmtsg]: http://docs.datastax.com/en/drivers/java/2.1/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.html +[amtsg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html +[tlmtsg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.html #### Accuracy diff --git a/manual/reconnection/README.md b/manual/reconnection/README.md index b4597322b2b..ccd4598a309 100644 --- a/manual/reconnection/README.md +++ b/manual/reconnection/README.md @@ -8,4 +8,4 @@ TODO cover: - scheduled reconnections vs. gossip events --> -[ReconnectionPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/ReconnectionPolicy.html \ No newline at end of file +[ReconnectionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ReconnectionPolicy.html \ No newline at end of file diff --git a/manual/retries/README.md b/manual/retries/README.md index ed33ffd6713..4b7f67f5312 100644 --- a/manual/retries/README.md +++ b/manual/retries/README.md @@ -146,33 +146,33 @@ implementations to handle idempotence (the new behavior is equivalent to what yo `IdempotenceAwareRetryPolicy` before). -[RetryDecision]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html -[retry()]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#retry-com.datastax.driver.core.ConsistencyLevel- -[tryNextHost()]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#tryNextHost-com.datastax.driver.core.ConsistencyLevel- -[rethrow()]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#rethrow-- -[ignore()]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#ignore-- -[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/NoHostAvailableException.html -[getErrors()]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- -[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.html -[DefaultRetryPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/DefaultRetryPolicy.html -[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- -[onWriteTimeout]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onWriteTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.WriteType-int-int-int- -[onUnavailable]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onUnavailable-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-int- -[onRequestError]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/ExtendedRetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-java.lang.Exception-int- -[UnavailableException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/UnavailableException.html -[ReadTimeoutException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/ReadTimeoutException.html -[WriteTimeoutException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/WriteTimeoutException.html -[OverloadedException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/OverloadedException.html -[ServerError]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/ServerError.html -[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/OperationTimedOutException.html -[ConnectionException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/ConnectionException.html -[QueryValidationException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/QueryValidationException.html -[InvalidQueryException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/InvalidQueryException.html -[InvalidConfigurationInQueryException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.html -[UnauthorizedException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/UnauthorizedException.html -[SyntaxError]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/SyntaxError.html -[AlreadyExistsException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/AlreadyExistsException.html -[TruncateException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/TruncateException.html +[RetryDecision]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html +[retry()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#retry-com.datastax.driver.core.ConsistencyLevel- +[tryNextHost()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#tryNextHost-com.datastax.driver.core.ConsistencyLevel- +[rethrow()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#rethrow-- +[ignore()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#ignore-- +[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[getErrors()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- +[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html +[DefaultRetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html +[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- +[onWriteTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onWriteTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.WriteType-int-int-int- +[onUnavailable]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onUnavailable-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-int- +[onRequestError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ExtendedRetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-java.lang.Exception-int- +[UnavailableException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/UnavailableException.html +[ReadTimeoutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ReadTimeoutException.html +[WriteTimeoutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/WriteTimeoutException.html +[OverloadedException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OverloadedException.html +[ServerError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ServerError.html +[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OperationTimedOutException.html +[ConnectionException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ConnectionException.html +[QueryValidationException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/QueryValidationException.html +[InvalidQueryException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/InvalidQueryException.html +[InvalidConfigurationInQueryException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.html +[UnauthorizedException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/UnauthorizedException.html +[SyntaxError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/SyntaxError.html +[AlreadyExistsException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/AlreadyExistsException.html +[TruncateException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/TruncateException.html [query plan]: ../load_balancing/#query-plan [connection pool]: ../pooling/ diff --git a/manual/shaded_jar/README.md b/manual/shaded_jar/README.md index 36c28c7bd13..a2caa967a32 100644 --- a/manual/shaded_jar/README.md +++ b/manual/shaded_jar/README.md @@ -74,5 +74,5 @@ detects that shaded Netty classes are being used: Detected shaded Netty classes in the classpath; native epoll transport will not work properly, defaulting to NIO. -[NettyOptions]:http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/NettyOptions.html +[NettyOptions]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/NettyOptions.html [Netty native transports]:http://netty.io/wiki/native-transports.html diff --git a/manual/socket_options/README.md b/manual/socket_options/README.md index 055470f8e7f..8a0defd87e7 100644 --- a/manual/socket_options/README.md +++ b/manual/socket_options/README.md @@ -117,15 +117,15 @@ To clarify: We might rename `SocketOptions.setReadTimeoutMillis` in a future version to clear up any confusion. -[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html -[setReadTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#setReadTimeoutMillis-int- -[setConnectTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#setConnectTimeoutMillis-int- -[setKeepAlive]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#setKeepAlive-boolean- -[setReceiveBufferSize]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#setReceiveBufferSize-int- -[setReuseAddress]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#setReuseAddress-boolean- -[setSendBufferSize]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#setSendBufferSize-int- -[setSoLinger]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#setSoLinger-int- -[setTcpNoDelay]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SocketOptions.html#setTcpNoDelay-boolean- -[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- -[onRequestError]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- -[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/exceptions/OperationTimedOutException.html \ No newline at end of file +[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html +[setReadTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReadTimeoutMillis-int- +[setConnectTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setConnectTimeoutMillis-int- +[setKeepAlive]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setKeepAlive-boolean- +[setReceiveBufferSize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReceiveBufferSize-int- +[setReuseAddress]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReuseAddress-boolean- +[setSendBufferSize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setSendBufferSize-int- +[setSoLinger]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setSoLinger-int- +[setTcpNoDelay]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setTcpNoDelay-boolean- +[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- +[onRequestError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- +[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OperationTimedOutException.html \ No newline at end of file diff --git a/manual/speculative_execution/README.md b/manual/speculative_execution/README.md index e20b9f10752..fdc605f069d 100644 --- a/manual/speculative_execution/README.md +++ b/manual/speculative_execution/README.md @@ -70,7 +70,7 @@ Speculative executions are controlled by an instance of `Cluster`. This policy defines the threshold after which a new speculative execution will be triggered. -[sep]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html +[sep]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html Two implementations are provided with the driver: @@ -98,7 +98,7 @@ way: * if no response has been received at t0 + 1000 milliseconds, start another speculative execution on a third node. -[csep]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html +[csep]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html #### [PercentileSpeculativeExecutionPolicy][psep] @@ -159,9 +159,9 @@ Note that `PerHostPercentileTracker` may also be used with a slow query logger (see the [Logging](../logging/) section). In that case, you would create a single tracker object and share it with both components. -[psep]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html +[psep]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html [hdr]: http://hdrhistogram.github.io/HdrHistogram/ -[phpt]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PerHostPercentileTracker.html +[phpt]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PerHostPercentileTracker.html #### Using your own @@ -207,7 +207,7 @@ client driver exec1 exec2 The only impact is that all executions of the same query always share the same query plan, so each host will be used by at most one execution. -[retry_policy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.html +[retry_policy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html ### Tuning and practical details @@ -222,8 +222,8 @@ You can monitor how many speculative executions were triggered with the It should only be a few percents of the total number of requests ([cluster.getMetrics().getRequestsTimer().getCount()][request_metric]). -[se_metric]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metrics.Errors.html#getSpeculativeExecutions-- -[request_metric]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Metrics.html#getRequestsTimer-- +[se_metric]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.Errors.html#getSpeculativeExecutions-- +[request_metric]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.html#getRequestsTimer-- #### Stream id exhaustion @@ -252,8 +252,8 @@ sustained. If you're unsure of which native protocol version you're using, you can check with [cluster.getConfiguration().getProtocolOptions().getProtocolVersion()][protocol_version]. -[session_state]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.State.html -[protocol_version]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- +[session_state]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.State.html +[protocol_version]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- #### Request ordering and client timestamps diff --git a/manual/ssl/README.md b/manual/ssl/README.md index cd462076f0c..213c5393ec2 100644 --- a/manual/ssl/README.md +++ b/manual/ssl/README.md @@ -185,8 +185,8 @@ Cluster cluster = Cluster.builder() .build(); ``` -[RemoteEndpointAwareSSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.html -[RemoteEndpointAwareJdkSSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html -[newSSLEngine]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html#newSSLEngine-io.netty.channel.socket.SocketChannel-java.net.InetSocketAddress- -[RemoteEndpointAwareNettySSLOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.html -[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/NettyOptions.html +[RemoteEndpointAwareSSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.html +[RemoteEndpointAwareJdkSSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html +[newSSLEngine]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html#newSSLEngine-io.netty.channel.socket.SocketChannel-java.net.InetSocketAddress- +[RemoteEndpointAwareNettySSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.html +[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/NettyOptions.html diff --git a/manual/statements/README.md b/manual/statements/README.md index 1cf3c124da1..6efd14ce104 100644 --- a/manual/statements/README.md +++ b/manual/statements/README.md @@ -32,11 +32,11 @@ If you use custom policies ([RetryPolicy], [LoadBalancingPolicy], properties that influence statement execution. To achieve this, you can wrap your statements in a custom [StatementWrapper] implementation. -[Statement]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Statement.html -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/querybuilder/QueryBuilder.html -[StatementWrapper]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/StatementWrapper.html -[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/RetryPolicy.html -[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/LoadBalancingPolicy.html -[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html -[execute]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- -[executeAsync]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- +[Statement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/QueryBuilder.html +[StatementWrapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/StatementWrapper.html +[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html +[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LoadBalancingPolicy.html +[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html +[execute]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- +[executeAsync]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- diff --git a/manual/statements/batch/README.md b/manual/statements/batch/README.md index 913ddf403cd..5f3b7930c32 100644 --- a/manual/statements/batch/README.md +++ b/manual/statements/batch/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [BatchStatement].* -[BatchStatement]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/BatchStatement.html +[BatchStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html diff --git a/manual/statements/built/README.md b/manual/statements/built/README.md index 2918268aa38..405aa9d2161 100644 --- a/manual/statements/built/README.md +++ b/manual/statements/built/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [QueryBuilder].* -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/querybuilder/QueryBuilder.html \ No newline at end of file +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/QueryBuilder.html \ No newline at end of file diff --git a/manual/statements/prepared/README.md b/manual/statements/prepared/README.md index abc771d2972..2132db700ae 100644 --- a/manual/statements/prepared/README.md +++ b/manual/statements/prepared/README.md @@ -257,11 +257,11 @@ in your statement, i.e.: `SELECT a, b, c FROM tbl`. This will be addressed in a future release of both Cassandra and the driver. Follow [CASSANDRA-10786] and [JAVA-1196] for more information. -[PreparedStatement]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/PreparedStatement.html -[BoundStatement]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/BoundStatement.html -[setPrepareOnAllHosts]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/QueryOptions.html#setPrepareOnAllHosts-boolean- -[setReprepareOnUp]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/QueryOptions.html#setReprepareOnUp-boolean- -[execute]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- -[executeAsync]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- +[PreparedStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PreparedStatement.html +[BoundStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BoundStatement.html +[setPrepareOnAllHosts]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setPrepareOnAllHosts-boolean- +[setReprepareOnUp]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setReprepareOnUp-boolean- +[execute]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- +[executeAsync]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- [CASSANDRA-10786]: https://issues.apache.org/jira/browse/CASSANDRA-10786 [JAVA-1196]: https://datastax-oss.atlassian.net/browse/JAVA-1196 \ No newline at end of file diff --git a/manual/statements/simple/README.md b/manual/statements/simple/README.md index e62d1de3bed..9967b0e4bf3 100644 --- a/manual/statements/simple/README.md +++ b/manual/statements/simple/README.md @@ -128,4 +128,4 @@ session.execute( 1, bytes); ``` -[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/SimpleStatement.html +[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SimpleStatement.html diff --git a/manual/tuples/README.md b/manual/tuples/README.md index 86563cd5a9c..27e8f9f9b05 100644 --- a/manual/tuples/README.md +++ b/manual/tuples/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [TupleType].* -[TupleType]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/TupleType.html \ No newline at end of file +[TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html \ No newline at end of file diff --git a/manual/udts/README.md b/manual/udts/README.md index 4d75a67afb0..760b87e9321 100644 --- a/manual/udts/README.md +++ b/manual/udts/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [UserType].* -[UserType]: http://docs.datastax.com/en/drivers/java/3.0/com/datastax/driver/core/UserType.html \ No newline at end of file +[UserType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/UserType.html \ No newline at end of file From 17099d2d127403a0b59e13407f2da0620b411c43 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Fri, 24 Mar 2017 10:56:23 +0100 Subject: [PATCH 079/512] Update changelog --- changelog/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog/README.md b/changelog/README.md index 928dd5bef91..f9049e4b3a8 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -31,6 +31,7 @@ Merged from 3.1.x branch: - [documentation] JAVA-1334: Clarify documentation of method `addContactPoints`. - [improvement] JAVA-1357: Document that getReplicas only returns replicas of the last token in range. - [bug] JAVA-1404: Fix min token handling in TokenRange.contains. +- [bug] JAVA-1429: Prevent heartbeats until connection is fully initialized. ### 3.1.5 (in progress) @@ -38,6 +39,7 @@ Merged from 3.1.x branch: Merged from 3.0.x branch: - [bug] JAVA-1404: Fix min token handling in TokenRange.contains. +- [bug] JAVA-1429: Prevent heartbeats until connection is fully initialized. ### 3.1.4 From 6efac0e529b1eec87d2f3e20112eae5c6a83af1c Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 27 Mar 2017 10:29:18 -0700 Subject: [PATCH 080/512] Remove any mention of 1241 from the changelog No need to mention it since it was introduced and reverted in the same release. --- changelog/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index f9049e4b3a8..b80ebf1de14 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -9,7 +9,6 @@ - [improvement] JAVA-1367: Make protocol negotiation more resilient. - [bug] JAVA-1397: Handle duration as native datatype in protocol v5+. - [improvement] JAVA-1308: CodecRegistry performance improvements. -- [improvement] JAVA-1241: Upgrade Netty to 4.1.x. - [improvement] JAVA-1287: Add CDC to TableOptionsMetadata and Schema Builder. - [improvement] JAVA-1392: Reduce lock contention in RPTokenFactory. - [improvement] JAVA-1328: Provide compatibility with Guava 20. @@ -22,7 +21,6 @@ - [improvement] JAVA-1310: Make mapper's ignored properties configurable. - [improvement] JAVA-1316: Add strategy for resolving properties into CQL names. - [bug] JAVA-1424: Handle new WRITE_FAILURE and READ_FAILURE format in v5 protocol. -- revert JAVA-1241 (go back to Netty 4.0) Merged from 3.1.x branch: From ab41e8679ab09f085f4f01e71514955cdf28f403 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Wed, 29 Mar 2017 11:05:56 +0200 Subject: [PATCH 081/512] Update version in docs --- README.md | 18 +++++++++--------- changelog/README.md | 16 +--------------- docs.yaml | 4 +++- faq/README.md | 2 +- manual/compression/README.md | 2 +- manual/custom_codecs/extras/README.md | 2 +- manual/object_mapper/README.md | 2 +- manual/paging/README.md | 4 ++-- manual/shaded_jar/README.md | 6 +++--- pom.xml | 2 +- 10 files changed, 23 insertions(+), 35 deletions(-) diff --git a/README.md b/README.md index 53c6361feeb..787d944d38c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ not yet have been released. You can find the documentation for latest version through [Java driver docs](http://datastax.github.io/java-driver/) or via the release tags, [e.g. -3.1.3](https://github.com/datastax/java-driver/tree/3.1.3).* +3.2.0](https://github.com/datastax/java-driver/tree/3.2.0).* A modern, [feature-rich](manual/) and highly tunable Java client library for Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using @@ -51,11 +51,11 @@ The driver contains the following modules: driver releases and important announcements (low frequency). [@DataStaxEng](https://twitter.com/datastaxeng) has more news including other drivers, Cassandra, and DSE. -- DOCS: the [manual](http://docs.datastax.com/en/developer/java-driver/3.1/manual/) has quick +- DOCS: the [manual](http://docs.datastax.com/en/developer/java-driver/3.2/manual/) has quick start material and technical details about the driver and its features. -- API: http://www.datastax.com/drivers/java/3.1 +- API: http://www.datastax.com/drivers/java/3.2 - [changelog](changelog/) -- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.1.3.tar.gz) +- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.2.0.tar.gz) **Feeback requested:** help us focus our efforts, provide your input on the [Platform and Runtime Survey](http://goo.gl/forms/qwUE6qnL7U) (we kept it short). @@ -68,7 +68,7 @@ it in your application using the following Maven dependency: com.datastax.cassandra cassandra-driver-core - 3.1.3 + 3.2.0 ``` @@ -78,7 +78,7 @@ Note that the object mapper is published as a separate artifact: com.datastax.cassandra cassandra-driver-mapping - 3.1.3 + 3.2.0 ``` @@ -88,7 +88,7 @@ The 'extras' module is also published as a separate artifact: com.datastax.cassandra cassandra-driver-extras - 3.1.3 + 3.2.0 ``` @@ -97,12 +97,12 @@ We also provide a [shaded JAR](manual/shaded_jar/) to avoid the explicit dependency to Netty. If you can't use a dependency management tool, a -[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.1.3.tar.gz) +[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.2.0.tar.gz) is available for download. ## Compatibility -The Java client driver 3.1.3 ([branch 3.x](https://github.com/datastax/java-driver/tree/3.x)) is compatible with Apache +The Java client driver 3.2.0 ([branch 3.x](https://github.com/datastax/java-driver/tree/3.x)) is compatible with Apache Cassandra 1.2, 2.0, 2.1, 2.2 and 3.0 (see [this page](http://datastax.github.io/java-driver/manual/native_protocol) for the most up-to-date compatibility information). diff --git a/changelog/README.md b/changelog/README.md index b80ebf1de14..cd9dd5932db 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,6 +1,6 @@ ## Changelog -### 3.2.0 (in progress) +### 3.2.0 - [new feature] JAVA-1347: Add support for duration type. - [new feature] JAVA-1248: Implement "beta" flag for native protocol v5. @@ -32,14 +32,6 @@ Merged from 3.1.x branch: - [bug] JAVA-1429: Prevent heartbeats until connection is fully initialized. -### 3.1.5 (in progress) - -Merged from 3.0.x branch: - -- [bug] JAVA-1404: Fix min token handling in TokenRange.contains. -- [bug] JAVA-1429: Prevent heartbeats until connection is fully initialized. - - ### 3.1.4 Merged from 3.0.x branch: @@ -166,12 +158,6 @@ Merged from 2.1 branch: - [improvement] JAVA-444: Add Java process information to UUIDs.makeNode() hash. -### 3.0.8 (in progress) - -- [bug] JAVA-1404: Fix min token handling in TokenRange.contains. -- [bug] JAVA-1429: Prevent heartbeats until connection is fully initialized. - - ### 3.0.7 - [bug] JAVA-1371: Reintroduce connection pool timeout. diff --git a/docs.yaml b/docs.yaml index da19065929a..3524a9ed071 100644 --- a/docs.yaml +++ b/docs.yaml @@ -45,12 +45,14 @@ links: - title: Releases href: https://github.com/datastax/java-driver/releases api_docs: - 3.1: http://docs.datastax.com/en/drivers/java/3.2 + 3.2: http://docs.datastax.com/en/drivers/java/3.2 3.1: http://docs.datastax.com/en/drivers/java/3.1 3.0: http://docs.datastax.com/en/drivers/java/3.0 2.1: http://docs.datastax.com/en/drivers/java/2.1 2.0: http://docs.datastax.com/en/drivers/java/2.0 versions: + - name: '3.2' + ref: '3.2.0' - name: '3.1' ref: '3.1.4' - name: '3.0' diff --git a/faq/README.md b/faq/README.md index 94ec3974191..97f8f560542 100644 --- a/faq/README.md +++ b/faq/README.md @@ -216,7 +216,7 @@ fields set to `null`. This also causes tombstones to be inserted unless setting `saveNullFields` option to false. See [Mapper options] for more details. -[Blobs.java]: https://github.com/datastax/java-driver/tree/3.0.x/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java +[Blobs.java]: https://github.com/datastax/java-driver/tree/3.2.0/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java [CASSANDRA-7304]: https://issues.apache.org/jira/browse/CASSANDRA-7304 [Parameters and Binding]: ../manual/statements/prepared/#parameters-and-binding [Mapper options]: ../manual/object_mapper/using/#mapper-options diff --git a/manual/compression/README.md b/manual/compression/README.md index 6fcfe054b85..6fc87a06134 100644 --- a/manual/compression/README.md +++ b/manual/compression/README.md @@ -85,4 +85,4 @@ cluster = Cluster.builder() .build(); ``` -[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.1.3/cassandra-driver-parent-3.1.3.pom +[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.2.0/cassandra-driver-parent-3.2.0.pom diff --git a/manual/custom_codecs/extras/README.md b/manual/custom_codecs/extras/README.md index 0497cd23f5d..d39fd9de995 100644 --- a/manual/custom_codecs/extras/README.md +++ b/manual/custom_codecs/extras/README.md @@ -10,7 +10,7 @@ The module is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-extras - 3.1.3 + 3.2.0 ``` diff --git a/manual/object_mapper/README.md b/manual/object_mapper/README.md index f513cd260ee..27867088ce4 100644 --- a/manual/object_mapper/README.md +++ b/manual/object_mapper/README.md @@ -11,7 +11,7 @@ The mapper is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-mapping - 3.1.3 + 3.2.0 ``` diff --git a/manual/paging/README.md b/manual/paging/README.md index b3246eb0773..915600d8099 100644 --- a/manual/paging/README.md +++ b/manual/paging/README.md @@ -219,8 +219,8 @@ There are two situations where you might want to use the unsafe API: implementing your own validation logic (for example, signing the raw state with a private key). -[gpsu]: http://www.datastax.com/drivers/java/3.0/com/datastax/driver/core/ExecutionInfo.html#getPagingStateUnsafe-- -[spsu]: http://www.datastax.com/drivers/java/3.0/com/datastax/driver/core/Statement.html#setPagingStateUnsafe-byte:A- +[gpsu]: http://www.datastax.com/drivers/java/3.2/com/datastax/driver/core/ExecutionInfo.html#getPagingStateUnsafe-- +[spsu]: http://www.datastax.com/drivers/java/3.2/com/datastax/driver/core/Statement.html#setPagingStateUnsafe-byte:A- ### Offset queries diff --git a/manual/shaded_jar/README.md b/manual/shaded_jar/README.md index a2caa967a32..38ee468c8c2 100644 --- a/manual/shaded_jar/README.md +++ b/manual/shaded_jar/README.md @@ -12,7 +12,7 @@ package name: com.datastax.cassandra cassandra-driver-core - 3.1.3 + 3.2.0 shaded @@ -32,7 +32,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-core - 3.1.3 + 3.2.0 shaded @@ -44,7 +44,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-mapping - 3.1.3 + 3.2.0 com.datastax.cassandra diff --git a/pom.xml b/pom.xml index 304adaffaeb..89c88a7dbe6 100644 --- a/pom.xml +++ b/pom.xml @@ -359,7 +359,7 @@ - 3.1.3 + 3.1.4 ../clirr-ignores.xml @@ -129,6 +127,22 @@ true + + + + javax.inject + javax.inject + 1 + true + + + + javax.annotation + javax.annotation-api + 1.2 + true + + diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java b/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java index 7f66808d939..b2553e70014 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java @@ -16,7 +16,6 @@ package com.datastax.driver.examples.paging; import com.datastax.driver.core.*; -import com.google.common.collect.Lists; import com.sun.net.httpserver.HttpServer; import org.glassfish.hk2.utilities.binding.AbstractBinder; import org.glassfish.jersey.jdkhttp.JdkHttpServerFactory; @@ -31,6 +30,7 @@ import javax.ws.rs.core.UriInfo; import java.io.IOException; import java.net.URI; +import java.util.ArrayList; import java.util.Collections; import java.util.Date; import java.util.List; @@ -227,7 +227,7 @@ public UserVideosResponse getUserVideos(@PathParam("userid") int userid, @QueryP videos = Collections.emptyList(); } else { int remaining = ITEMS_PER_PAGE; - videos = Lists.newArrayListWithExpectedSize(remaining); + videos = new ArrayList(remaining); for (Row row : rs) { UserVideo video = new UserVideo( row.getInt("videoid"), diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 9bd5f19d4f9..d1752de80e1 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -51,10 +51,17 @@ com.fasterxml.jackson.core - jackson-databind + jackson-core ${jackson.version} true + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind.version} + true + joda-time @@ -106,6 +113,13 @@ test + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + test + + org.apache.commons commons-exec diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index cba79c4dc37..4bf359bf7f3 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -48,6 +48,18 @@ test + + com.google.guava + guava + ${guava.version} + + + + org.slf4j + slf4j-api + ${slf4j.version} + + org.testng testng @@ -78,22 +90,10 @@ org.ow2.asm - asm-all + asm 5.0.3 test - log4j diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index f96bf899c11..2f37ef8f299 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -35,8 +35,6 @@ 3.6.0 2.4.0 - 1.1.3 - 1.7.5 none - 2.6.3 + 2.8.8 + + 2.7.9.1 2.9.1 1.0 1.0.4 @@ -69,6 +72,7 @@ 1.10.8 1.3 1.1.2 + 1.2.3 ${project.basedir} 127.0.1. unit @@ -140,11 +144,13 @@ maven-surefire-plugin 2.16 - - usedefaultlisteners - false - - + + + usedefaultlisteners + false + + + true 1 false @@ -279,8 +285,8 @@ http://netty.io/4.0/api/ http://www.joda.org/joda-time/apidocs/ - http://fasterxml.github.io/jackson-core/javadoc/2.6/ - http://fasterxml.github.io/jackson-databind/javadoc/2.6/ + http://fasterxml.github.io/jackson-core/javadoc/2.8/ + http://fasterxml.github.io/jackson-databind/javadoc/2.7/ https://javaee-spec.java.net/nonav/javadocs/ @@ -313,7 +319,7 @@ com.fasterxml.jackson.core jackson-databind - ${jackson.version} + ${jackson-databind.version} joda-time From c8ab7b4aadd49e7a54ff95c9b73f6988f87bb67e Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 16 May 2017 14:21:04 -0700 Subject: [PATCH 095/512] JAVA-1463: Revisit speculative execution docs Remove obsolete information, and mention the cluster-wide tracker. --- changelog/README.md | 1 + manual/logging/README.md | 5 +-- manual/speculative_execution/README.md | 49 ++++++++++++++------------ 3 files changed, 28 insertions(+), 27 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 45c2499d6b6..83c675d6b5e 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -9,6 +9,7 @@ - [bug] JAVA-1464: Allow custom codecs with non public constructors in @Param. - [bug] JAVA-1470: Querying multiple pages overrides WrappedStatement. - [improvement] JAVA-1428: Upgrade logback and jackson dependencies. +- [documentation] JAVA-1463: Revisit speculative execution docs. ### 3.2.0 diff --git a/manual/logging/README.md b/manual/logging/README.md index 70ce83c0a40..ca200f6d09f 100644 --- a/manual/logging/README.md +++ b/manual/logging/README.md @@ -179,10 +179,7 @@ See the `QueryLogger` [API docs][query_logger] for examples of how to truncate t Currently the `QueryLogger` can be configured to track slow queries using either a constant threshold in milliseconds (which is the default behavior), or -a dynamic threshold based on per-host latency percentiles, as computed by `PerHostPercentileTracker`. - -**Dynamic thresholds are still a beta feature: they haven't been extensively -tested yet, and the API is still subject to change.** +a dynamic threshold based on per-host latency percentiles, as computed by a `PercentileTracker`. Refer to the `QueryLogger` [API docs][query_logger] for an example of usage. diff --git a/manual/speculative_execution/README.md b/manual/speculative_execution/README.md index fdc605f069d..ceecc2a0f3b 100644 --- a/manual/speculative_execution/README.md +++ b/manual/speculative_execution/README.md @@ -7,7 +7,10 @@ will experience bad latency. One thing we can do to improve that is pre-emptively start a second execution of the query against another node, before the first node has replied or errored out. If that second node replies faster, we can send -the response back to the client (we also cancel the first query): +the response back to the client (we also cancel the first execution -- +note that "cancelling" in this context simply means discarding the response +when it arrives later, Cassandra does not support cancellation of in flight +requests at this stage): ```ditaa client driver exec1 exec2 @@ -66,15 +69,15 @@ there is no way to guarantee that only one node will apply the mutation. ### Enabling speculative executions Speculative executions are controlled by an instance of -[SpeculativeExecutionPolicy][sep] provided when initializing the +[SpeculativeExecutionPolicy] provided when initializing the `Cluster`. This policy defines the threshold after which a new speculative execution will be triggered. -[sep]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html +[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html Two implementations are provided with the driver: -#### [ConstantSpeculativeExecutionPolicy][csep] +#### [ConstantSpeculativeExecutionPolicy] This simple policy uses a constant threshold: @@ -98,16 +101,13 @@ way: * if no response has been received at t0 + 1000 milliseconds, start another speculative execution on a third node. -[csep]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html +[ConstantSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html -#### [PercentileSpeculativeExecutionPolicy][psep] +#### [PercentileSpeculativeExecutionPolicy] This policy sets the threshold at a given latency percentile for the current host, based on recent statistics. -**As of 2.1.6, this class is provided as a beta preview: it hasn't been -extensively tested yet, and the API is still subject to change.** - First and foremost, make sure that the [HdrHistogram][hdr] library (used under the hood to collect latencies) is in your classpath. It's defined as an optional dependency in the driver's POM, so you'll need to @@ -121,14 +121,22 @@ explicitly depend on it: ``` -Then create an instance of [PerHostPercentileTracker][phpt] that will collect -latency statistics for your `Cluster`: +Then create a [PercentileTracker] that will collect latency histograms for your `Cluster`. Two +implementations are provided out of the box: + +* [ClusterWidePercentileTracker]: maintains a single histogram for the whole cluster. This means + queries will be compared against the global performance of all the hosts in the cluster. +* [PerHostPercentileTracker]: maintains a histogram per host. This means queries to a host will + only be compared against previous queries to the same host. + +We recommend the cluster-wide strategy: in practice, we've found that it produces better results, +because it does a better job at penalizing hosts that are consistently slower. ```java // There are more options than shown here, please refer to the API docs // for more information -PerHostPercentileTracker tracker = PerHostPercentileTracker - .builderWithHighestTrackableLatencyMillis(15000) +PercentileTracker tracker = ClusterWidePercentileTracker + .builder(15000) .build(); ``` @@ -148,20 +156,15 @@ Cluster cluster = Cluster.builder() .build(); ``` -Finally, don't forget to register your tracker with the cluster (the -policy does not do this itself): - -```java -cluster.register(tracker); -``` - -Note that `PerHostPercentileTracker` may also be used with a slow query +Note that `PercentileTracker` may also be used with a slow query logger (see the [Logging](../logging/) section). In that case, you would create a single tracker object and share it with both components. -[psep]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html +[PercentileSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html +[PercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PercentileTracker.html +[ClusterWidePercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ClusterWidePercentileTracker.html +[PerHostPercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PerHostPercentileTracker.html [hdr]: http://hdrhistogram.github.io/HdrHistogram/ -[phpt]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PerHostPercentileTracker.html #### Using your own From 8a130bcedef6bfeac47a16fcc5ca81a1369c39d3 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 16 May 2017 14:06:07 -0700 Subject: [PATCH 096/512] JAVA-1466: Revisit timestamp docs Reorganize for clarity. Mention server-side timestamp generator. --- changelog/README.md | 1 + manual/query_timestamps/README.md | 100 +++++++++++++++++------------- 2 files changed, 59 insertions(+), 42 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 83c675d6b5e..d9d07578d53 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -10,6 +10,7 @@ - [bug] JAVA-1470: Querying multiple pages overrides WrappedStatement. - [improvement] JAVA-1428: Upgrade logback and jackson dependencies. - [documentation] JAVA-1463: Revisit speculative execution docs. +- [documentation] JAVA-1466: Revisit timestamp docs. ### 3.2.0 diff --git a/manual/query_timestamps/README.md b/manual/query_timestamps/README.md index 249d62ad908..cb3f4dce9cf 100644 --- a/manual/query_timestamps/README.md +++ b/manual/query_timestamps/README.md @@ -20,59 +20,29 @@ This is enabled by default if you're using the driver 3.0+ and a version of Cassandra that supports [native protocol](../native_protocol) v3 or above. -A client timestamp will be sent by each query. It is generated by a -[TimestampGenerator][tsg]. The default implementation is -[AtomicMonotonicTimestampGenerator][amtsg]. +The driver will use a [TimestampGenerator] to generate a timestamp for each query, and send it +to the server as part of the request. -You can specify another generator at initialization: +You can configure the generator at initialization: ```java Cluster.builder().addContactPoint("127.0.0.1") - .withTimestampGenerator(new MyCustomTimestampGenerator()) + .withTimestampGenerator(new SomeTimestampGeneratorImpl()) .build(); ``` -In addition, you can also override the default timestamp on a -per-statement basis: - -```java -Statement statement = new SimpleStatement( - "UPDATE users SET email = 'x@y.com' where id = 1"); -statement.setDefaultTimestamp(1234567890); -session.execute(statement); -``` - -[tsg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TimestampGenerator.html -[amtsg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html +Two generator implementations are provided out of the box: - -### Server-side generation - -This is the "legacy" behavior if you're connected to a Cassandra version -that only supports protocol v2 or below. The server will assign a -timestamp based on the time it receives the query. - -This can be a problem when the order of the writes matter: with unlucky -timing (different coordinators, network latency, etc.), two successive -requests from the same client might be processed in a different order -server-side, and end up with out-of-order timestamps. If protocol v3 is -not an option, the only workaround is to add `USING TIMESTAMP` in your -queries. - - -The driver ships with two implementations of `TimestampGenerator`: - -1. [AtomicMonotonicTimestampGenerator][amtsg], which guarantess monotonicity of timestamps for all threads; -2. [ThreadLocalMonotonicTimestampGenerator][tlmtsg], which guarantees per-thread monotonicity of timestamps. +1. [AtomicMonotonicTimestampGenerator], which guarantees monotonicity of timestamps for all + threads. This is the default implementation (i.e. what will be used if you don't call + `withTimestampGenerator`); +2. [ThreadLocalMonotonicTimestampGenerator], which guarantees per-thread monotonicity of timestamps. There is less contention using `ThreadLocalMonotonicTimestampGenerator`, but beware that there is a risk of timestamp collision with this generator when accessed by more than one thread; only use it when threads are not in direct competition for timestamp ties (i.e., they are executing independent statements). -[amtsg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html -[tlmtsg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.html - #### Accuracy Both implementations strive to achieve microsecond resolution on a best-effort basis. @@ -99,9 +69,6 @@ To check what's available on your system: INFO com.datastax.driver.core.ClockFactory - Using native clock to generate timestamps ``` -[gettimeofday]: http://man7.org/linux/man-pages/man2/settimeofday.2.html -[JNR]: https://github.com/jnr/jnr-ffi - #### Monotonicity The aforementioned implementations also guarantee @@ -116,6 +83,46 @@ When this happens, the built-in generators log a periodic warning message in the `com.datastax.driver.core.TimestampGenerator`. See their non-default constructors for ways to control the warning interval. + +#### Overriding the timestamp manually + +You can override the generator and provide and explicit timestamp for a given query: + +```java +Statement statement = new SimpleStatement( + "UPDATE users SET email = 'x@y.com' where id = 1"); +statement.setDefaultTimestamp(1234567890); +session.execute(statement); +``` + + +### Server-side generation + +This is the "legacy" behavior if you're connected to a Cassandra version +that only supports protocol v2 or below. The server will assign a +timestamp based on the time it received the query. + +This can be a problem when the order of the writes matter: with unlucky +timing (different coordinators, network latency, etc.), two successive +requests from the same client might be processed in a different order +server-side, and end up with out-of-order timestamps. This is why client-side +generation is the default starting with protocol v3. With older versions, the +only way to get client timestamps is to add a `USING TIMESTAMP` clause to your +CQL queries. + +Note that, although client-side timestamps are recommended when available, you can still opt for +server-side timestamps with protocol v3 or above, using [ServerSideTimestampGenerator]: + +```java +Cluster.builder().addContactPoint("127.0.0.1") + .withTimestampGenerator(ServerSideTimestampGenerator.INSTANCE) + .build(); +``` + +Server-side generation might be more suitable for situations where it is more difficult to keep +time synchronized across all clients. + + ### Summary As shown in the previous sections, there are multiple ways to provide a @@ -131,3 +138,12 @@ following: 4. otherwise, let the server assign the timestamp. Steps 2 and 3 only apply if native protocol v3 or above is in use. + + +[TimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TimestampGenerator.html +[AtomicMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html +[ThreadLocalMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.html +[ServerSideTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ServerSideTimestampGenerator.html + +[gettimeofday]: http://man7.org/linux/man-pages/man2/settimeofday.2.html +[JNR]: https://github.com/jnr/jnr-ffi From 10a42e25989dd3fd977ab2113b3b2a1f6d18313c Mon Sep 17 00:00:00 2001 From: Kevin Gallardo Date: Fri, 28 Apr 2017 18:26:47 -0400 Subject: [PATCH 097/512] Add documentation for tuples --- manual/tuples/README.md | 103 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 100 insertions(+), 3 deletions(-) diff --git a/manual/tuples/README.md b/manual/tuples/README.md index 27e8f9f9b05..79a7b96c74a 100644 --- a/manual/tuples/README.md +++ b/manual/tuples/README.md @@ -1,5 +1,102 @@ -## Tuples +## Using Tuples with the Java driver -*Coming soon... In the meantime, see the javadoc for [TupleType].* +Cassandra allows to use `tuple` data types [in tables and user-defined types](https://docs.datastax.com/en/cql/3.1/cql/cql_reference/tupleType.html): -[TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html \ No newline at end of file +``` +CREATE TABLE ks.collect_things ( + pk int, + ck1 text, + ck2 text, + v tuple, + PRIMARY KEY (pk, ck1, ck2) +); +``` + +### Fetching Tuples from Rows results + +The DataStax Java driver exposes a special [TupleValue] class to handle such columns. +[TupleValue] exposes getters allowing to extract from the tuple all the data types +supported by Cassandra: + +```java +Row row = session.execute("SELECT v FROM ks.collect_things WHERE pk = 1").one(); + +TupleValue tupleValue = row.getTupleValue("v"); + +int firstValueInTuple = tupleValue.getInt(0); + +String secondValueInTuple = tupleValue.getString(1); + +Float thirdValueInTuple = tupleValue.getFloat(2); +``` + +### Using tuples as statement parameters + +A prepared statement may contain a Tuple as a query parameter. In such cases, users +will need to create or gather a [TupleType] first, in order to be able to create a [TupleValue] +to bind: + +```java +PreparedStatement ps = session.prepare("INSERT INTO ks.collect_things (pk, ck1, ck2, v) VALUES (:pk, :ck1, :ck2, :v)"); + +TupleType tupleType = cluster.getMetadata().newTupleType(DataType.cint(), DataType.text(), DataType.cfloat()); + +BoundStatement bs = ps.bind(); +bs.setInt("pk", 1); +bs.setString("ck1", "1"); +bs.setString("ck2", "1"); +bs.setTupleValue("v", tupleType.newValue(1, "hello", 2.3f)); + +session.execute(bs); +``` + +The method [newValue(Object...)][newValueVararg] follows the same rules as `new SimpleStatement(String, Object...)`, +there can be ambiguities due to the fact that the driver will infer the data types from the values +given in parameters of the method, whereas the data types required may differ (numeric +literals are always interpreted as `int`). + +To avoid such ambiguities, a [TupleValue] returned by [newValue()][newValue] also exposes specific +setters for all the existing Cassandra data types: + +```java +TupleType tupleType = cluster.getMetadata().newTupleType(DataType.bigint(), DataType.text(), DataType.cfloat()); + +TupleValue value = tupleType.newValue().setLong(0, 2).setString(1, "hello").setDouble(2, 2.3f); +``` + +#### More use cases + +Users can also define single-usage tuples in _SELECT_ queries with the `IN` keyword +(called a "multi-column IN restriction"), usually for tables with composite clustering +keys. In this case, a tuple will be usable the same way it was for prepared statements' parameters: + +```java +TupleType oneTimeUsageTuple = cluster.getMetadata().newTupleType(DataType.text(), DataType.text()); + +PreparedStatement ps = session.prepare("SELECT * FROM ks.collect_things WHERE pk = 1 and (ck1, ck2) IN (:t)"); + +BoundStatement bs = ps.bind(); +bs.setTupleValue("t", oneTimeUsageTuple.newValue("1", "1")); + +session.execute(bs); +``` + +More generally, the `IN` keyword in a `SELECT` query will be used to define a *list* of +desired values of the filtered clustering keys, those would simply be bound as a list of +[TupleValue] with the Java driver: + +```java +TupleType oneTimeUsageTuple = cluster.getMetadata().newTupleType(DataType.text(), DataType.text()); + +PreparedStatement ps = session.prepare("SELECT * FROM ks.collect_things WHERE pk = 1 AND (ck1, ck2) IN :l"); + +BoundStatement bs = ps.bind(); +bs.setList("l", Arrays.asList(oneTimeUsageTuple.newValue("1", "1"), oneTimeUsageTuple.newValue("1", "2"), oneTimeUsageTuple.newValue("2", "1"))); + +session.execute(bs); +``` + +[TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html +[TupleValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleValue.html +[GettableByIndexData]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/GettableByIndexData.html[newValueVararg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-java.lang.Object...- +[newValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-- From 7c8bb1d2c44a381364b822803c49595e4639634e Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Mon, 29 May 2017 11:30:42 +0200 Subject: [PATCH 098/512] Fix wrong links in tuple documentation --- manual/tuples/README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/manual/tuples/README.md b/manual/tuples/README.md index 79a7b96c74a..345bcc517ff 100644 --- a/manual/tuples/README.md +++ b/manual/tuples/README.md @@ -14,8 +14,8 @@ CREATE TABLE ks.collect_things ( ### Fetching Tuples from Rows results -The DataStax Java driver exposes a special [TupleValue] class to handle such columns. -[TupleValue] exposes getters allowing to extract from the tuple all the data types +The DataStax Java driver exposes a special [`TupleValue`][TupleValue] class to handle such columns. +[`TupleValue`][TupleValue] exposes getters allowing to extract from the tuple all the data types supported by Cassandra: ```java @@ -33,7 +33,7 @@ Float thirdValueInTuple = tupleValue.getFloat(2); ### Using tuples as statement parameters A prepared statement may contain a Tuple as a query parameter. In such cases, users -will need to create or gather a [TupleType] first, in order to be able to create a [TupleValue] +will need to create or gather a [`TupleType`][TupleType] first, in order to be able to create a [`TupleValue`][TupleValue] to bind: ```java @@ -50,12 +50,12 @@ bs.setTupleValue("v", tupleType.newValue(1, "hello", 2.3f)); session.execute(bs); ``` -The method [newValue(Object...)][newValueVararg] follows the same rules as `new SimpleStatement(String, Object...)`, +The method [`newValue(Object...)`][newValueVararg] follows the same rules as `new SimpleStatement(String, Object...)`; there can be ambiguities due to the fact that the driver will infer the data types from the values given in parameters of the method, whereas the data types required may differ (numeric literals are always interpreted as `int`). -To avoid such ambiguities, a [TupleValue] returned by [newValue()][newValue] also exposes specific +To avoid such ambiguities, a [`TupleValue`][TupleValue] returned by [`newValue()`][newValue] also exposes specific setters for all the existing Cassandra data types: ```java @@ -83,7 +83,7 @@ session.execute(bs); More generally, the `IN` keyword in a `SELECT` query will be used to define a *list* of desired values of the filtered clustering keys, those would simply be bound as a list of -[TupleValue] with the Java driver: +[`TupleValue`][TupleValue] with the Java driver: ```java TupleType oneTimeUsageTuple = cluster.getMetadata().newTupleType(DataType.text(), DataType.text()); @@ -98,5 +98,5 @@ session.execute(bs); [TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html [TupleValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleValue.html -[GettableByIndexData]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/GettableByIndexData.html[newValueVararg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-java.lang.Object...- +[newValueVararg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-java.lang.Object...- [newValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-- From f7d8d477835b6eaef54a85a27e44470165e7dc27 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Wed, 5 Apr 2017 13:30:08 +0200 Subject: [PATCH 099/512] Fix compiler warnings in mapping module --- .../driver/mapping/AliasedMappedProperty.java | 9 +++++---- .../driver/mapping/AnnotationChecks.java | 4 ++-- .../driver/mapping/AnnotationParser.java | 16 ++++++++-------- .../datastax/driver/mapping/EntityMapper.java | 10 +++++----- .../datastax/driver/mapping/MappedUDTCodec.java | 12 ++++++------ .../java/com/datastax/driver/mapping/Mapper.java | 10 +++++----- .../java/com/datastax/driver/mapping/Result.java | 4 ++-- 7 files changed, 33 insertions(+), 32 deletions(-) diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java index 16e6ecada3f..676f7c05d5b 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java @@ -15,13 +15,14 @@ */ package com.datastax.driver.mapping; -class AliasedMappedProperty { +class AliasedMappedProperty { - final MappedProperty mappedProperty; + final MappedProperty mappedProperty; final String alias; - AliasedMappedProperty(MappedProperty mappedProperty, String alias) { - this.mappedProperty = mappedProperty; + @SuppressWarnings("unchecked") + AliasedMappedProperty(MappedProperty mappedProperty, String alias) { + this.mappedProperty = (MappedProperty) mappedProperty; this.alias = alias; } } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java index ffc30f97c18..f57e75685a6 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java @@ -95,9 +95,9 @@ private static void checkValidComputed(String propertyName, Map> properties, String annotation) { + static void validateOrder(List properties, String annotation) { for (int i = 0; i < properties.size(); i++) { - AliasedMappedProperty property = properties.get(i); + AliasedMappedProperty property = properties.get(i); int pos = property.mappedProperty.getPosition(); if (pos != i) throw new IllegalArgumentException(String.format("Invalid ordering value %d for annotation %s of property '%s', was expecting %d", diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java index a0705d36369..76694836b5b 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java @@ -36,9 +36,9 @@ */ class AnnotationParser { - private static final Comparator> POSITION_COMPARATOR = new Comparator>() { + private static final Comparator POSITION_COMPARATOR = new Comparator() { @Override - public int compare(AliasedMappedProperty o1, AliasedMappedProperty o2) { + public int compare(AliasedMappedProperty o1, AliasedMappedProperty o2) { return o1.mappedProperty.getPosition() - o2.mappedProperty.getPosition(); } }; @@ -78,9 +78,9 @@ static EntityMapper parseEntity(final Class entityClass, MappingManage EntityMapper mapper = new EntityMapper(entityClass, ksName, tableName, writeConsistency, readConsistency); - List> pks = new ArrayList>(); - List> ccs = new ArrayList>(); - List> rgs = new ArrayList>(); + List pks = new ArrayList(); + List ccs = new ArrayList(); + List rgs = new ArrayList(); MappingConfiguration configuration = mappingManager.getConfiguration(); Set> properties = configuration.getPropertyMapper().mapTable(entityClass); @@ -92,7 +92,7 @@ static EntityMapper parseEntity(final Class entityClass, MappingManage ? "col" + columnCounter.incrementAndGet() : null; - AliasedMappedProperty aliasedMappedProperty = new AliasedMappedProperty(mappedProperty, alias); + AliasedMappedProperty aliasedMappedProperty = new AliasedMappedProperty(mappedProperty, alias); if (mappingManager.protocolVersionAsInt == 1 && mappedProperty.isComputed()) throw new UnsupportedOperationException("Computed properties are not supported with native protocol v1"); @@ -147,14 +147,14 @@ static MappedUDTCodec parseUDT(Class udtClass, MappingManager mappingM if (userType == null) throw new IllegalArgumentException(String.format("User type %s does not exist in keyspace %s", udtName, ksName)); - Map> propertyMappers = new HashMap>(); + Map propertyMappers = new HashMap(); MappingConfiguration configuration = mappingManager.getConfiguration(); Set> properties = configuration.getPropertyMapper().mapUdt(udtClass); for (MappedProperty mappedProperty : properties) { - AliasedMappedProperty aliasedMappedProperty = new AliasedMappedProperty(mappedProperty, null); + AliasedMappedProperty aliasedMappedProperty = new AliasedMappedProperty(mappedProperty, null); if (!userType.contains(mappedProperty.getMappedName())) throw new IllegalArgumentException(String.format("Field %s does not exist in type %s.%s", diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java index b494763e56f..87e1ad4a635 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java @@ -29,10 +29,10 @@ class EntityMapper { final ConsistencyLevel writeConsistency; final ConsistencyLevel readConsistency; - final List> partitionKeys = new ArrayList>(); - final List> clusteringColumns = new ArrayList>(); + final List partitionKeys = new ArrayList(); + final List clusteringColumns = new ArrayList(); - final List> allColumns = new ArrayList>(); + final List allColumns = new ArrayList(); EntityMapper(Class entityClass, String keyspace, String table, ConsistencyLevel writeConsistency, ConsistencyLevel readConsistency) { this.entityClass = entityClass; @@ -46,11 +46,11 @@ int primaryKeySize() { return partitionKeys.size() + clusteringColumns.size(); } - AliasedMappedProperty getPrimaryKeyColumn(int i) { + AliasedMappedProperty getPrimaryKeyColumn(int i) { return i < partitionKeys.size() ? partitionKeys.get(i) : clusteringColumns.get(i - partitionKeys.size()); } - void addColumns(List> pks, List> ccs, List> rgs) { + void addColumns(List pks, List ccs, List rgs) { partitionKeys.addAll(pks); clusteringColumns.addAll(ccs); allColumns.addAll(pks); diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java index 4730683a946..b26eaf3fddc 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java @@ -29,10 +29,10 @@ class MappedUDTCodec extends TypeCodec.AbstractUDTCodec { private final UserType cqlUserType; private final Class udtClass; - private final Map> columnMappers; + private final Map columnMappers; private final CodecRegistry codecRegistry; - MappedUDTCodec(UserType cqlUserType, Class udtClass, Map> columnMappers, MappingManager mappingManager) { + MappedUDTCodec(UserType cqlUserType, Class udtClass, Map columnMappers, MappingManager mappingManager) { super(cqlUserType, udtClass); this.cqlUserType = cqlUserType; this.udtClass = udtClass; @@ -52,7 +52,7 @@ Class getUdtClass() { @Override protected ByteBuffer serializeField(T source, String fieldName, ProtocolVersion protocolVersion) { @SuppressWarnings("unchecked") - AliasedMappedProperty aliasedMappedProperty = (AliasedMappedProperty) columnMappers.get(fieldName); + AliasedMappedProperty aliasedMappedProperty = columnMappers.get(fieldName); if (aliasedMappedProperty == null) return null; @@ -71,7 +71,7 @@ protected ByteBuffer serializeField(T source, String fieldName, ProtocolVersion @Override protected T deserializeAndSetField(ByteBuffer input, T target, String fieldName, ProtocolVersion protocolVersion) { @SuppressWarnings("unchecked") - AliasedMappedProperty aliasedMappedProperty = (AliasedMappedProperty) columnMappers.get(fieldName); + AliasedMappedProperty aliasedMappedProperty = columnMappers.get(fieldName); if (aliasedMappedProperty != null) { TypeCodec codec = aliasedMappedProperty.mappedProperty.getCustomCodec(); if (codec == null) @@ -86,7 +86,7 @@ protected T deserializeAndSetField(ByteBuffer input, T target, String fieldName, @Override protected String formatField(T source, String fieldName) { @SuppressWarnings("unchecked") - AliasedMappedProperty aliasedMappedProperty = (AliasedMappedProperty) columnMappers.get(fieldName); + AliasedMappedProperty aliasedMappedProperty = columnMappers.get(fieldName); if (aliasedMappedProperty == null) return null; Object value = aliasedMappedProperty.mappedProperty.getValue(source); @@ -101,7 +101,7 @@ protected String formatField(T source, String fieldName) { @Override protected T parseAndSetField(String input, T target, String fieldName) { @SuppressWarnings("unchecked") - AliasedMappedProperty aliasedMappedProperty = (AliasedMappedProperty) columnMappers.get(fieldName); + AliasedMappedProperty aliasedMappedProperty = columnMappers.get(fieldName); if (aliasedMappedProperty != null) { TypeCodec codec = aliasedMappedProperty.mappedProperty.getCustomCodec(); if (codec == null) diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java index d8c555e857c..7562d5283a9 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java @@ -256,8 +256,9 @@ private static boolean shouldSaveNullFields(EnumMap options return option == null || option.saveNullFields; } - private static void setObject(BoundStatement bs, int i, T value, AliasedMappedProperty mapper, boolean saveNullFieldsAsUnset) { - TypeCodec customCodec = mapper.mappedProperty.getCustomCodec(); + private static void setObject(BoundStatement bs, int i, T value, AliasedMappedProperty mapper, boolean saveNullFieldsAsUnset) { + @SuppressWarnings("unchecked") + TypeCodec customCodec = (TypeCodec) mapper.mappedProperty.getCustomCodec(); if (saveNullFieldsAsUnset && value == null) bs.unset(i); else if (customCodec != null) @@ -396,8 +397,7 @@ public BoundStatement apply(PreparedStatement input) { BoundStatement bs = new MapperBoundStatement(input); int i = 0; for (Object value : primaryKeys) { - @SuppressWarnings("unchecked") - AliasedMappedProperty column = (AliasedMappedProperty) mapper.getPrimaryKeyColumn(i); + AliasedMappedProperty column = mapper.getPrimaryKeyColumn(i); if (value == null) { throw new IllegalArgumentException( String.format("Invalid null value for PRIMARY KEY column %s (argument %d)", @@ -605,7 +605,7 @@ public BoundStatement apply(PreparedStatement input) { int columnNumber = 0; for (Object value : primaryKey) { @SuppressWarnings("unchecked") - AliasedMappedProperty column = (AliasedMappedProperty) mapper.getPrimaryKeyColumn(columnNumber); + AliasedMappedProperty column = mapper.getPrimaryKeyColumn(columnNumber); if (value == null) { throw new IllegalArgumentException(String.format("Invalid null value for PRIMARY KEY column %s (argument %d)", column.mappedProperty.getMappedName(), i)); diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java index 47d5fa771ce..78b81ffa2c6 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java @@ -39,9 +39,9 @@ public class Result implements PagingIterable, T> { private T map(Row row) { T entity = mapper.newEntity(); - for (AliasedMappedProperty c : mapper.allColumns) { + for (AliasedMappedProperty c : mapper.allColumns) { @SuppressWarnings("unchecked") - AliasedMappedProperty col = (AliasedMappedProperty) c; + AliasedMappedProperty col = c; String name = col.alias != null && this.useAlias ? col.alias : col.mappedProperty.getMappedName(); if (!row.getColumnDefinitions().contains(name)) continue; From 7fd55e7a0ae81a25d2eb05803f5d799b9eca046c Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Wed, 5 Apr 2017 13:58:32 +0200 Subject: [PATCH 100/512] Update license plugin --- driver-core/pom.xml | 4 --- driver-dist/pom.xml | 4 --- driver-examples/pom.xml | 1 - driver-extras/pom.xml | 1 - driver-mapping/pom.xml | 1 - driver-tests/osgi/pom.xml | 1 - driver-tests/pom.xml | 4 --- driver-tests/stress/pom.xml | 4 --- pom.xml | 54 ++++++++++++++++++++----------------- src/license/header.txt | 13 --------- 10 files changed, 29 insertions(+), 58 deletions(-) delete mode 100644 src/license/header.txt diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 46fdcf73d6d..c54a95cda33 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -30,10 +30,6 @@ https://github.com/datastax/java-driver - - ${project.parent.basedir} - - io.netty diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index a0181cd15f4..682cb70f116 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -24,10 +24,6 @@ cassandra-driver-dist - - ${project.parent.basedir} - - jar diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 26201eedce9..47243d6f228 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -30,7 +30,6 @@ https://github.com/datastax/java-driver - ${project.parent.basedir} 2.0.1 2.23.1 2.4.0-b34 diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index d1752de80e1..7c506c94882 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -30,7 +30,6 @@ https://github.com/datastax/java-driver - ${project.parent.basedir} unit none diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 4bf359bf7f3..08a81546a2a 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -29,7 +29,6 @@ https://github.com/datastax/java-driver - ${project.parent.basedir} 2.4.7 diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 2f37ef8f299..eda21c2df3e 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -42,7 +42,6 @@ test with no matching methods. --> true - ${project.parent.parent.basedir} diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 64d9755db92..4a2858cb36f 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -28,10 +28,6 @@ Tests for the DataStax Java Driver for Apache Cassandra. https://github.com/datastax/java-driver - - ${project.parent.basedir} - - stress osgi diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 76c85b3abd9..4c27c301f40 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -28,10 +28,6 @@ A stress test example for DataStax Java Driver for Apache Cassandra. https://github.com/datastax/java-driver - - ${project.parent.parent.basedir} - - com.datastax.cassandra diff --git a/pom.xml b/pom.xml index 566f63738db..22cba164903 100644 --- a/pom.xml +++ b/pom.xml @@ -1,18 +1,18 @@ @@ -73,7 +73,6 @@ 1.3 1.1.2 1.2.3 - ${project.basedir} 127.0.1. unit @@ -382,25 +381,35 @@ - com.mycila license-maven-plugin - 2.8 + 3.0 -
    ${main.basedir}/src/license/header.txt
    + + src/**/*.java src/**/*.xml src/**/*.properties **/pom.xml - - **/src/main/config/ide/** - SLASHSTAR_STYLE SCRIPT_STYLE @@ -414,11 +423,6 @@ check - - - ${currentYear} - -
    diff --git a/src/license/header.txt b/src/license/header.txt deleted file mode 100644 index 0dc2cb31e50..00000000000 --- a/src/license/header.txt +++ /dev/null @@ -1,13 +0,0 @@ - Copyright (C) ${project.inceptionYear}-2015 DataStax Inc. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. From b9cd396107f0661e4ca22fc9c2c26b8bbd19e65f Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Wed, 5 Apr 2017 14:00:33 +0200 Subject: [PATCH 101/512] Update headers --- driver-core/pom.xml | 20 +++++++++--------- .../core/AbstractAddressableByIndexData.java | 20 +++++++++--------- .../datastax/driver/core/AbstractData.java | 20 +++++++++--------- .../core/AbstractGettableByIndexData.java | 20 +++++++++--------- .../driver/core/AbstractGettableData.java | 20 +++++++++--------- .../AbstractMonotonicTimestampGenerator.java | 20 +++++++++--------- .../core/AbstractReconnectionHandler.java | 20 +++++++++--------- .../datastax/driver/core/AbstractSession.java | 20 +++++++++--------- .../driver/core/AbstractTableMetadata.java | 20 +++++++++--------- .../driver/core/AggregateMetadata.java | 20 +++++++++--------- .../driver/core/ArrayBackedResultSet.java | 20 +++++++++--------- .../datastax/driver/core/ArrayBackedRow.java | 20 +++++++++--------- .../AtomicMonotonicTimestampGenerator.java | 20 +++++++++--------- .../datastax/driver/core/AuthProvider.java | 20 +++++++++--------- .../datastax/driver/core/Authenticator.java | 20 +++++++++--------- .../datastax/driver/core/BatchStatement.java | 20 +++++++++--------- .../datastax/driver/core/BoundStatement.java | 20 +++++++++--------- .../java/com/datastax/driver/core/CBUtil.java | 20 +++++++++--------- .../driver/core/ChainedResultSetFuture.java | 20 +++++++++--------- .../java/com/datastax/driver/core/Clock.java | 20 +++++++++--------- .../com/datastax/driver/core/CloseFuture.java | 20 +++++++++--------- .../com/datastax/driver/core/Cluster.java | 20 +++++++++--------- .../core/ClusterNameMismatchException.java | 20 +++++++++--------- .../core/ClusterWidePercentileTracker.java | 20 +++++++++--------- .../datastax/driver/core/ClusteringOrder.java | 20 +++++++++--------- .../datastax/driver/core/CodecRegistry.java | 20 +++++++++--------- .../com/datastax/driver/core/CodecUtils.java | 20 +++++++++--------- .../driver/core/ColumnDefinitions.java | 20 +++++++++--------- .../datastax/driver/core/ColumnMetadata.java | 20 +++++++++--------- .../datastax/driver/core/Configuration.java | 20 +++++++++--------- .../com/datastax/driver/core/Connection.java | 20 +++++++++--------- .../driver/core/ConsistencyLevel.java | 20 +++++++++--------- .../driver/core/ControlConnection.java | 20 +++++++++--------- .../driver/core/ConvictionPolicy.java | 20 +++++++++--------- .../com/datastax/driver/core/DataType.java | 20 +++++++++--------- .../driver/core/DataTypeClassNameParser.java | 20 +++++++++--------- .../driver/core/DataTypeCqlNameParser.java | 20 +++++++++--------- .../driver/core/DefaultPreparedStatement.java | 20 +++++++++--------- .../driver/core/DefaultResultSetFuture.java | 20 +++++++++--------- .../driver/core/DelegatingCluster.java | 20 +++++++++--------- .../datastax/driver/core/DirectedGraph.java | 20 +++++++++--------- .../driver/core/DriverThrowables.java | 20 +++++++++--------- .../com/datastax/driver/core/Duration.java | 20 +++++++++--------- .../datastax/driver/core/EventDebouncer.java | 20 +++++++++--------- .../core/ExceptionCatchingRunnable.java | 20 +++++++++--------- .../datastax/driver/core/ExceptionCode.java | 20 +++++++++--------- .../datastax/driver/core/ExecutionInfo.java | 20 +++++++++--------- .../java/com/datastax/driver/core/Frame.java | 20 +++++++++--------- .../datastax/driver/core/FrameCompressor.java | 20 +++++++++--------- .../driver/core/FunctionMetadata.java | 20 +++++++++--------- .../driver/core/GettableByIndexData.java | 20 +++++++++--------- .../driver/core/GettableByNameData.java | 20 +++++++++--------- .../datastax/driver/core/GettableData.java | 20 +++++++++--------- .../driver/core/GuavaCompatibility.java | 20 +++++++++--------- .../java/com/datastax/driver/core/Host.java | 20 +++++++++--------- .../driver/core/HostConnectionPool.java | 20 +++++++++--------- .../datastax/driver/core/HostDistance.java | 20 +++++++++--------- .../datastax/driver/core/IndexMetadata.java | 20 +++++++++--------- .../datastax/driver/core/JdkSSLOptions.java | 20 +++++++++--------- .../driver/core/KeyspaceMetadata.java | 20 +++++++++--------- .../datastax/driver/core/LZ4Compressor.java | 20 +++++++++--------- .../datastax/driver/core/LatencyTracker.java | 20 +++++++++--------- .../com/datastax/driver/core/LocalDate.java | 20 +++++++++--------- .../LoggingMonotonicTimestampGenerator.java | 20 +++++++++--------- .../com/datastax/driver/core/MD5Digest.java | 20 +++++++++--------- .../driver/core/MaterializedViewMetadata.java | 20 +++++++++--------- .../com/datastax/driver/core/Message.java | 20 +++++++++--------- .../com/datastax/driver/core/Metadata.java | 20 +++++++++--------- .../com/datastax/driver/core/Metrics.java | 20 +++++++++--------- .../datastax/driver/core/MetricsOptions.java | 20 +++++++++--------- .../java/com/datastax/driver/core/Native.java | 20 +++++++++--------- .../datastax/driver/core/NettyOptions.java | 20 +++++++++--------- .../datastax/driver/core/NettySSLOptions.java | 20 +++++++++--------- .../com/datastax/driver/core/NettyUtil.java | 20 +++++++++--------- .../datastax/driver/core/PagingIterable.java | 20 +++++++++--------- .../com/datastax/driver/core/PagingState.java | 21 +++++++++---------- .../com/datastax/driver/core/ParseUtils.java | 20 +++++++++--------- .../driver/core/PerHostPercentileTracker.java | 20 +++++++++--------- .../driver/core/PercentileTracker.java | 20 +++++++++--------- .../driver/core/PlainTextAuthProvider.java | 20 +++++++++--------- .../datastax/driver/core/PoolingOptions.java | 20 +++++++++--------- .../com/datastax/driver/core/PreparedId.java | 20 +++++++++--------- .../driver/core/PreparedStatement.java | 20 +++++++++--------- .../datastax/driver/core/ProtocolEvent.java | 20 +++++++++--------- .../datastax/driver/core/ProtocolOptions.java | 20 +++++++++--------- .../driver/core/ProtocolV1Authenticator.java | 20 +++++++++--------- .../datastax/driver/core/ProtocolVersion.java | 20 +++++++++--------- .../com/datastax/driver/core/QueryLogger.java | 20 +++++++++--------- .../datastax/driver/core/QueryOptions.java | 20 +++++++++--------- .../com/datastax/driver/core/QueryTrace.java | 20 +++++++++--------- .../driver/core/RegularStatement.java | 20 +++++++++--------- .../RemoteEndpointAwareJdkSSLOptions.java | 20 +++++++++--------- .../RemoteEndpointAwareNettySSLOptions.java | 20 +++++++++--------- .../core/RemoteEndpointAwareSSLOptions.java | 20 +++++++++--------- .../driver/core/ReplicationStategy.java | 20 +++++++++--------- .../datastax/driver/core/RequestHandler.java | 20 +++++++++--------- .../com/datastax/driver/core/Requests.java | 20 +++++++++--------- .../com/datastax/driver/core/Responses.java | 20 +++++++++--------- .../com/datastax/driver/core/ResultSet.java | 20 +++++++++--------- .../datastax/driver/core/ResultSetFuture.java | 20 +++++++++--------- .../java/com/datastax/driver/core/Row.java | 20 +++++++++--------- .../com/datastax/driver/core/SSLOptions.java | 20 +++++++++--------- .../driver/core/SchemaChangeListener.java | 20 +++++++++--------- .../driver/core/SchemaChangeListenerBase.java | 20 +++++++++--------- .../datastax/driver/core/SchemaElement.java | 20 +++++++++--------- .../datastax/driver/core/SchemaParser.java | 20 +++++++++--------- .../core/ServerSideTimestampGenerator.java | 20 +++++++++--------- .../com/datastax/driver/core/Session.java | 20 +++++++++--------- .../datastax/driver/core/SessionManager.java | 20 +++++++++--------- .../driver/core/SettableByIndexData.java | 20 +++++++++--------- .../driver/core/SettableByNameData.java | 20 +++++++++--------- .../datastax/driver/core/SettableData.java | 20 +++++++++--------- .../driver/core/SimpleJSONParser.java | 20 +++++++++--------- .../datastax/driver/core/SimpleStatement.java | 20 +++++++++--------- .../driver/core/SnappyCompressor.java | 20 +++++++++--------- .../datastax/driver/core/SocketOptions.java | 20 +++++++++--------- .../com/datastax/driver/core/Statement.java | 20 +++++++++--------- .../driver/core/StatementWrapper.java | 20 +++++++++--------- .../driver/core/StreamIdGenerator.java | 20 +++++++++--------- .../driver/core/SystemProperties.java | 20 +++++++++--------- .../datastax/driver/core/TableMetadata.java | 20 +++++++++--------- .../driver/core/TableOptionsMetadata.java | 20 +++++++++--------- ...hreadLocalMonotonicTimestampGenerator.java | 20 +++++++++--------- .../driver/core/ThreadingOptions.java | 20 +++++++++--------- .../driver/core/TimestampGenerator.java | 20 +++++++++--------- .../java/com/datastax/driver/core/Token.java | 20 +++++++++--------- .../com/datastax/driver/core/TokenRange.java | 20 +++++++++--------- .../com/datastax/driver/core/TupleType.java | 20 +++++++++--------- .../com/datastax/driver/core/TupleValue.java | 20 +++++++++--------- .../com/datastax/driver/core/TypeCodec.java | 20 +++++++++--------- .../com/datastax/driver/core/TypeTokens.java | 20 +++++++++--------- .../com/datastax/driver/core/UDTValue.java | 20 +++++++++--------- .../com/datastax/driver/core/UserType.java | 20 +++++++++--------- .../com/datastax/driver/core/VIntCoding.java | 20 +++++++++--------- .../datastax/driver/core/VersionNumber.java | 20 +++++++++--------- .../com/datastax/driver/core/WriteType.java | 20 +++++++++--------- .../exceptions/AlreadyExistsException.java | 20 +++++++++--------- .../exceptions/AuthenticationException.java | 20 +++++++++--------- .../exceptions/BootstrappingException.java | 20 +++++++++--------- .../exceptions/BusyConnectionException.java | 20 +++++++++--------- .../core/exceptions/BusyPoolException.java | 20 +++++++++--------- .../exceptions/CodecNotFoundException.java | 20 +++++++++--------- .../core/exceptions/ConnectionException.java | 20 +++++++++--------- .../core/exceptions/CoordinatorException.java | 20 +++++++++--------- .../core/exceptions/DriverException.java | 20 +++++++++--------- .../core/exceptions/DriverInternalError.java | 20 +++++++++--------- .../exceptions/FrameTooLongException.java | 20 +++++++++--------- .../FunctionExecutionException.java | 20 +++++++++--------- .../InvalidConfigurationInQueryException.java | 20 +++++++++--------- .../exceptions/InvalidQueryException.java | 20 +++++++++--------- .../core/exceptions/InvalidTypeException.java | 20 +++++++++--------- .../exceptions/NoHostAvailableException.java | 20 +++++++++--------- .../OperationTimedOutException.java | 20 +++++++++--------- .../core/exceptions/OverloadedException.java | 20 +++++++++--------- .../core/exceptions/PagingStateException.java | 20 +++++++++--------- .../driver/core/exceptions/ProtocolError.java | 20 +++++++++--------- .../exceptions/QueryConsistencyException.java | 20 +++++++++--------- .../exceptions/QueryExecutionException.java | 20 +++++++++--------- .../exceptions/QueryValidationException.java | 20 +++++++++--------- .../core/exceptions/ReadFailureException.java | 20 +++++++++--------- .../core/exceptions/ReadTimeoutException.java | 20 +++++++++--------- .../driver/core/exceptions/ServerError.java | 20 +++++++++--------- .../driver/core/exceptions/SyntaxError.java | 20 +++++++++--------- .../exceptions/TraceRetrievalException.java | 20 +++++++++--------- .../core/exceptions/TransportException.java | 20 +++++++++--------- .../core/exceptions/TruncateException.java | 20 +++++++++--------- .../exceptions/UnauthorizedException.java | 20 +++++++++--------- .../core/exceptions/UnavailableException.java | 20 +++++++++--------- .../core/exceptions/UnpreparedException.java | 20 +++++++++--------- .../UnresolvedUserTypeException.java | 20 +++++++++--------- .../UnsupportedFeatureException.java | 20 +++++++++--------- .../UnsupportedProtocolVersionException.java | 20 +++++++++--------- .../exceptions/WriteFailureException.java | 20 +++++++++--------- .../exceptions/WriteTimeoutException.java | 20 +++++++++--------- .../driver/core/exceptions/package-info.java | 20 +++++++++--------- .../datastax/driver/core/package-info.java | 20 +++++++++--------- .../core/policies/AddressTranslator.java | 20 +++++++++--------- .../ChainableLoadBalancingPolicy.java | 20 +++++++++--------- .../datastax/driver/core/policies/Clock.java | 20 +++++++++--------- .../policies/ConstantReconnectionPolicy.java | 20 +++++++++--------- .../ConstantSpeculativeExecutionPolicy.java | 20 +++++++++--------- .../policies/DCAwareRoundRobinPolicy.java | 20 +++++++++--------- .../core/policies/DefaultRetryPolicy.java | 20 +++++++++--------- .../DowngradingConsistencyRetryPolicy.java | 20 +++++++++--------- .../EC2MultiRegionAddressTranslator.java | 20 +++++++++--------- .../core/policies/ErrorAwarePolicy.java | 20 +++++++++--------- .../ExponentialReconnectionPolicy.java | 20 +++++++++--------- .../core/policies/FallthroughRetryPolicy.java | 20 +++++++++--------- .../core/policies/HostFilterPolicy.java | 20 +++++++++--------- .../policies/IdempotenceAwareRetryPolicy.java | 20 +++++++++--------- .../core/policies/IdentityTranslator.java | 20 +++++++++--------- .../core/policies/LatencyAwarePolicy.java | 20 +++++++++--------- .../core/policies/LoadBalancingPolicy.java | 20 +++++++++--------- .../core/policies/LoggingRetryPolicy.java | 20 +++++++++--------- .../NoSpeculativeExecutionPolicy.java | 20 +++++++++--------- .../PercentileSpeculativeExecutionPolicy.java | 20 +++++++++--------- .../driver/core/policies/Policies.java | 20 +++++++++--------- .../core/policies/ReconnectionPolicy.java | 20 +++++++++--------- .../driver/core/policies/RetryPolicy.java | 20 +++++++++--------- .../driver/core/policies/RollingCount.java | 20 +++++++++--------- .../core/policies/RoundRobinPolicy.java | 20 +++++++++--------- .../policies/SpeculativeExecutionPolicy.java | 20 +++++++++--------- .../core/policies/TokenAwarePolicy.java | 20 +++++++++--------- .../driver/core/policies/WhiteListPolicy.java | 20 +++++++++--------- .../driver/core/policies/package-info.java | 20 +++++++++--------- .../driver/core/querybuilder/Assignment.java | 20 +++++++++--------- .../driver/core/querybuilder/Batch.java | 20 +++++++++--------- .../driver/core/querybuilder/BindMarker.java | 20 +++++++++--------- .../core/querybuilder/BuiltStatement.java | 20 +++++++++--------- .../driver/core/querybuilder/Clause.java | 20 +++++++++--------- .../driver/core/querybuilder/Delete.java | 20 +++++++++--------- .../driver/core/querybuilder/Insert.java | 20 +++++++++--------- .../driver/core/querybuilder/Ordering.java | 20 +++++++++--------- .../core/querybuilder/QueryBuilder.java | 20 +++++++++--------- .../driver/core/querybuilder/Select.java | 20 +++++++++--------- .../driver/core/querybuilder/Truncate.java | 20 +++++++++--------- .../driver/core/querybuilder/Update.java | 20 +++++++++--------- .../driver/core/querybuilder/Using.java | 20 +++++++++--------- .../driver/core/querybuilder/Utils.java | 20 +++++++++--------- .../core/querybuilder/package-info.java | 20 +++++++++--------- .../AbstractCreateStatement.java | 20 +++++++++--------- .../driver/core/schemabuilder/Alter.java | 20 +++++++++--------- .../core/schemabuilder/AlterKeyspace.java | 20 +++++++++--------- .../driver/core/schemabuilder/ColumnType.java | 20 +++++++++--------- .../driver/core/schemabuilder/Create.java | 20 +++++++++--------- .../core/schemabuilder/CreateIndex.java | 20 +++++++++--------- .../core/schemabuilder/CreateKeyspace.java | 20 +++++++++--------- .../driver/core/schemabuilder/CreateType.java | 20 +++++++++--------- .../driver/core/schemabuilder/Drop.java | 20 +++++++++--------- .../core/schemabuilder/DropKeyspace.java | 20 +++++++++--------- .../core/schemabuilder/KeyspaceOptions.java | 20 +++++++++--------- .../core/schemabuilder/NativeColumnType.java | 20 +++++++++--------- .../core/schemabuilder/SchemaBuilder.java | 20 +++++++++--------- .../core/schemabuilder/SchemaStatement.java | 20 +++++++++--------- .../core/schemabuilder/StatementStart.java | 20 +++++++++--------- .../core/schemabuilder/TableOptions.java | 20 +++++++++--------- .../driver/core/schemabuilder/UDTType.java | 20 +++++++++--------- .../core/schemabuilder/package-info.java | 20 +++++++++--------- .../com/datastax/driver/core/utils/Bytes.java | 20 +++++++++--------- .../driver/core/utils/MoreFutures.java | 20 +++++++++--------- .../driver/core/utils/MoreObjects.java | 20 +++++++++--------- .../com/datastax/driver/core/utils/UUIDs.java | 20 +++++++++--------- .../datastax/driver/core/Driver.properties | 20 +++++++++--------- .../core/AbstractBatchIdempotencyTest.java | 20 +++++++++--------- .../driver/core/AbstractPoliciesTest.java | 20 +++++++++--------- .../core/AbstractReconnectionHandlerTest.java | 20 +++++++++--------- .../core/AbstractReplicationStrategyTest.java | 20 +++++++++--------- .../driver/core/AggregateMetadataAssert.java | 20 +++++++++--------- .../driver/core/AggregateMetadataTest.java | 20 +++++++++--------- .../com/datastax/driver/core/Assertions.java | 20 +++++++++--------- .../datastax/driver/core/AsyncQueryTest.java | 20 +++++++++--------- .../driver/core/AsyncResultSetTest.java | 20 +++++++++--------- ...AtomicMonotonicTimestampGeneratorTest.java | 20 +++++++++--------- .../driver/core/AuthenticationTest.java | 20 +++++++++--------- .../core/BatchStatementIdempotencyTest.java | 20 +++++++++--------- .../driver/core/BatchStatementTest.java | 20 +++++++++--------- .../driver/core/BoundStatementTest.java | 20 +++++++++--------- .../com/datastax/driver/core/CCMAccess.java | 20 +++++++++--------- .../com/datastax/driver/core/CCMBridge.java | 20 +++++++++--------- .../com/datastax/driver/core/CCMCache.java | 20 +++++++++--------- .../com/datastax/driver/core/CCMConfig.java | 20 +++++++++--------- .../datastax/driver/core/CCMException.java | 20 +++++++++--------- .../datastax/driver/core/CCMTestsSupport.java | 20 +++++++++--------- .../com/datastax/driver/core/CCMWorkload.java | 20 +++++++++--------- .../driver/core/CaseSensitivityTest.java | 20 +++++++++--------- .../driver/core/ClockFactoryTest.java | 20 +++++++++--------- .../datastax/driver/core/ClusterAssert.java | 20 +++++++++--------- .../datastax/driver/core/ClusterInitTest.java | 20 +++++++++--------- .../driver/core/ClusterStressTest.java | 20 +++++++++--------- .../ClusterWidePercentileTrackerTest.java | 20 +++++++++--------- .../driver/core/CodecRegistryTest.java | 20 +++++++++--------- .../driver/core/ColumnDefinitionsTest.java | 20 +++++++++--------- .../driver/core/ColumnMetadataAssert.java | 20 +++++++++--------- .../datastax/driver/core/CompressionTest.java | 20 +++++++++--------- .../driver/core/ConditionChecker.java | 20 +++++++++--------- .../driver/core/ConditionalUpdateTest.java | 20 +++++++++--------- .../driver/core/ConnectionReleaseTest.java | 20 +++++++++--------- .../datastax/driver/core/ConsistencyTest.java | 20 +++++++++--------- .../driver/core/ControlConnectionTest.java | 20 +++++++++--------- .../core/CountingReconnectionPolicy.java | 20 +++++++++--------- .../com/datastax/driver/core/CreateCCM.java | 20 +++++++++--------- .../driver/core/CustomPayloadTest.java | 20 +++++++++--------- .../core/CustomPercentileTrackerTest.java | 20 +++++++++--------- .../datastax/driver/core/CustomTypeTest.java | 20 +++++++++--------- .../datastax/driver/core/DataProviders.java | 20 +++++++++--------- .../datastax/driver/core/DataTypeAssert.java | 20 +++++++++--------- .../core/DataTypeClassNameParserTest.java | 20 +++++++++--------- .../core/DataTypeCqlNameParserTest.java | 20 +++++++++--------- .../driver/core/DataTypeIntegrationTest.java | 20 +++++++++--------- .../datastax/driver/core/DataTypeTest.java | 20 +++++++++--------- .../DelegatingClusterIntegrationTest.java | 20 +++++++++--------- .../driver/core/DelegatingClusterTest.java | 20 +++++++++--------- .../driver/core/DirectCompressionTest.java | 20 +++++++++--------- .../driver/core/DirectedGraphTest.java | 20 +++++++++--------- .../driver/core/DseCCMClusterTest.java | 20 +++++++++--------- .../driver/core/DurationCodecTest.java | 20 +++++++++--------- .../driver/core/DurationIntegrationTest.java | 20 +++++++++--------- .../datastax/driver/core/DurationTest.java | 20 +++++++++--------- .../core/EventDebouncerIntegrationTest.java | 20 +++++++++--------- .../driver/core/EventDebouncerTest.java | 20 +++++++++--------- .../core/ExtendedPeerCheckDisabledTest.java | 20 +++++++++--------- .../com/datastax/driver/core/FakeHost.java | 20 +++++++++--------- .../datastax/driver/core/FetchingTest.java | 20 +++++++++--------- .../datastax/driver/core/FrameLengthTest.java | 20 +++++++++--------- .../driver/core/FunctionMetadataAssert.java | 20 +++++++++--------- .../driver/core/FunctionMetadataTest.java | 20 +++++++++--------- .../core/GettableDataIntegrationTest.java | 20 +++++++++--------- .../driver/core/HeapCompressionTest.java | 20 +++++++++--------- .../datastax/driver/core/HeartbeatTest.java | 20 +++++++++--------- .../com/datastax/driver/core/HostAssert.java | 20 +++++++++--------- .../core/HostConnectionPoolMultiTest.java | 20 +++++++++--------- .../driver/core/HostConnectionPoolTest.java | 20 +++++++++--------- .../core/HostMetadataIntegrationTest.java | 20 +++++++++--------- .../driver/core/IndexMetadataAssert.java | 20 +++++++++--------- .../driver/core/IndexMetadataTest.java | 20 +++++++++--------- .../driver/core/Jdk8SSLEncryptionTest.java | 20 +++++++++--------- .../driver/core/KeyspaceMetadataAssert.java | 20 +++++++++--------- .../datastax/driver/core/LargeDataTest.java | 20 +++++++++--------- .../LoadBalancingPolicyBootstrapTest.java | 20 +++++++++--------- .../core/LoadBalancingPolicyRefreshTest.java | 20 +++++++++--------- .../datastax/driver/core/LocalDateAssert.java | 20 +++++++++--------- .../datastax/driver/core/LocalDateTest.java | 20 +++++++++--------- .../driver/core/M3PTokenFactoryTest.java | 20 +++++++++--------- .../driver/core/M3PTokenIntegrationTest.java | 20 +++++++++--------- .../core/M3PTokenVnodeIntegrationTest.java | 20 +++++++++--------- .../datastax/driver/core/MappingCodec.java | 20 +++++++++--------- .../core/MaterializedViewMetadataAssert.java | 20 +++++++++--------- .../core/MaterializedViewMetadataTest.java | 20 +++++++++--------- .../datastax/driver/core/MemoryAppender.java | 20 +++++++++--------- .../datastax/driver/core/MetadataTest.java | 20 +++++++++--------- .../com/datastax/driver/core/MetricsTest.java | 20 +++++++++--------- .../driver/core/MissingRpcAddressTest.java | 20 +++++++++--------- .../com/datastax/driver/core/MockClocks.java | 20 +++++++++--------- .../driver/core/NettyOptionsTest.java | 20 +++++++++--------- .../core/NetworkTopologyStrategyTest.java | 20 +++++++++--------- .../core/NodeListRefreshDebouncerTest.java | 20 +++++++++--------- .../driver/core/NodeRefreshDebouncerTest.java | 20 +++++++++--------- .../driver/core/OPPTokenFactoryTest.java | 20 +++++++++--------- .../driver/core/OPPTokenIntegrationTest.java | 20 +++++++++--------- .../core/OPPTokenVnodeIntegrationTest.java | 20 +++++++++--------- .../datastax/driver/core/PagingStateTest.java | 20 +++++++++--------- .../datastax/driver/core/ParseUtilsTest.java | 20 +++++++++--------- .../core/PerHostPercentileTrackerTest.java | 20 +++++++++--------- .../driver/core/PercentileTrackerTest.java | 20 +++++++++--------- .../core/PoolingOptionsIntegrationTest.java | 20 +++++++++--------- .../driver/core/PoolingOptionsTest.java | 20 +++++++++--------- .../datastax/driver/core/PreparedIdTest.java | 20 +++++++++--------- .../driver/core/PreparedStatementTest.java | 20 +++++++++--------- .../driver/core/PrimitiveTypeSamples.java | 20 +++++++++--------- .../driver/core/ProtocolBetaVersionTest.java | 20 +++++++++--------- .../driver/core/ProtocolOptionsTest.java | 20 +++++++++--------- .../datastax/driver/core/ProtocolV1Test.java | 20 +++++++++--------- .../ProtocolVersionRenegotiationTest.java | 20 +++++++++--------- .../driver/core/QueryLoggerErrorsTest.java | 20 +++++++++--------- .../datastax/driver/core/QueryLoggerTest.java | 20 +++++++++--------- .../driver/core/QueryOptionsTest.java | 20 +++++++++--------- .../driver/core/QueryTimestampTest.java | 20 +++++++++--------- .../datastax/driver/core/QueryTracker.java | 20 +++++++++--------- .../driver/core/RPTokenFactoryTest.java | 20 +++++++++--------- .../driver/core/RPTokenIntegrationTest.java | 20 +++++++++--------- .../core/RPTokenVnodeIntegrationTest.java | 20 +++++++++--------- .../datastax/driver/core/ReadTimeoutTest.java | 20 +++++++++--------- .../driver/core/RecommissionedNodeTest.java | 20 +++++++++--------- .../driver/core/ReconnectionPolicyTest.java | 20 +++++++++--------- .../driver/core/ReconnectionTest.java | 20 +++++++++--------- .../driver/core/RefreshConnectedHostTest.java | 20 +++++++++--------- .../driver/core/ReplicationStrategyTest.java | 20 +++++++++--------- .../driver/core/RequestHandlerTest.java | 20 +++++++++--------- .../datastax/driver/core/ResultSetAssert.java | 20 +++++++++--------- .../driver/core/ReusedStreamIdTest.java | 20 +++++++++--------- .../core/SSLAuthenticatedEncryptionTest.java | 20 +++++++++--------- .../driver/core/SSLEncryptionTest.java | 20 +++++++++--------- .../com/datastax/driver/core/SSLTestBase.java | 20 +++++++++--------- .../driver/core/ScassandraCluster.java | 20 +++++++++--------- .../driver/core/ScassandraTestBase.java | 20 +++++++++--------- .../driver/core/SchemaAgreementTest.java | 20 +++++++++--------- .../driver/core/SchemaChangesCCTest.java | 20 +++++++++--------- .../driver/core/SchemaChangesTest.java | 20 +++++++++--------- .../core/SchemaRefreshDebouncerTest.java | 20 +++++++++--------- .../datastax/driver/core/SessionAssert.java | 20 +++++++++--------- .../datastax/driver/core/SessionLeakTest.java | 20 +++++++++--------- .../driver/core/SessionStressTest.java | 20 +++++++++--------- .../com/datastax/driver/core/SessionTest.java | 20 +++++++++--------- .../driver/core/SimpleJSONParserTest.java | 20 +++++++++--------- .../core/SimpleStatementIntegrationTest.java | 20 +++++++++--------- .../driver/core/SimpleStatementTest.java | 20 +++++++++--------- .../driver/core/SimpleStrategyTest.java | 20 +++++++++--------- .../driver/core/SingleConnectionPoolTest.java | 20 +++++++++--------- .../core/SingleTokenIntegrationTest.java | 20 +++++++++--------- .../core/SortingLoadBalancingPolicy.java | 20 +++++++++--------- .../driver/core/SpeculativeExecutionTest.java | 20 +++++++++--------- .../driver/core/StateListenerBase.java | 20 +++++++++--------- .../driver/core/StateListenerTest.java | 20 +++++++++--------- .../driver/core/StatementIdempotenceTest.java | 20 +++++++++--------- .../driver/core/StatementWrapperTest.java | 20 +++++++++--------- .../driver/core/StreamIdGeneratorTest.java | 20 +++++++++--------- .../driver/core/TableMetadataAssert.java | 20 +++++++++--------- .../driver/core/TableMetadataCDCTest.java | 20 +++++++++--------- .../driver/core/TableMetadataTest.java | 20 +++++++++--------- .../datastax/driver/core/TestListener.java | 20 +++++++++--------- .../com/datastax/driver/core/TestUtils.java | 20 +++++++++--------- ...dLocalMonotonicTimestampGeneratorTest.java | 20 +++++++++--------- .../driver/core/ThreadingOptionsTest.java | 20 +++++++++--------- .../driver/core/TimeoutStressTest.java | 20 +++++++++--------- .../driver/core/TokenIntegrationTest.java | 20 +++++++++--------- .../driver/core/TokenRangeAssert.java | 20 +++++++++--------- .../datastax/driver/core/TokenRangeTest.java | 20 +++++++++--------- .../com/datastax/driver/core/TracingTest.java | 20 +++++++++--------- .../com/datastax/driver/core/TupleTest.java | 20 +++++++++--------- .../datastax/driver/core/TypeCodecAssert.java | 20 +++++++++--------- .../TypeCodecCollectionsIntegrationTest.java | 20 +++++++++--------- ...TypeCodecEncapsulationIntegrationTest.java | 20 +++++++++--------- ...CodecNestedCollectionsIntegrationTest.java | 20 +++++++++--------- ...CodecNestedUDTAndTupleIntegrationTest.java | 20 +++++++++--------- .../core/TypeCodecNumbersIntegrationTest.java | 20 +++++++++--------- ...decOverlappingJavaTypeIntegrationTest.java | 20 +++++++++--------- .../datastax/driver/core/TypeCodecTest.java | 20 +++++++++--------- .../core/TypeCodecTupleIntegrationTest.java | 20 +++++++++--------- .../core/TypeCodecUDTIntegrationTest.java | 20 +++++++++--------- .../driver/core/UnresolvedUserTypeTest.java | 20 +++++++++--------- .../datastax/driver/core/UserTypesTest.java | 20 +++++++++--------- .../driver/core/VersionNumberAssert.java | 20 +++++++++--------- .../driver/core/VersionNumberTest.java | 20 +++++++++--------- .../datastax/driver/core/WarningsTest.java | 20 +++++++++--------- .../exceptions/ConnectionExceptionTest.java | 20 +++++++++--------- .../exceptions/ExceptionsScassandraTest.java | 20 +++++++++--------- .../core/exceptions/ExceptionsTest.java | 20 +++++++++--------- .../FunctionExecutionExceptionTest.java | 20 +++++++++--------- .../NoHostAvailableExceptionTest.java | 20 +++++++++--------- .../ReadWriteFailureExceptionTest.java | 20 +++++++++--------- .../AbstractRetryPolicyIntegrationTest.java | 20 +++++++++--------- .../CloseableLoadBalancingPolicyTest.java | 20 +++++++++--------- .../CustomRetryPolicyIntegrationTest.java | 20 +++++++++--------- .../policies/DCAwareRoundRobinPolicyTest.java | 20 +++++++++--------- .../DefaultRetryPolicyIntegrationTest.java | 20 +++++++++--------- .../DelegatingLoadBalancingPolicy.java | 20 +++++++++--------- .../DelegatingSpeculativeExecutionPolicy.java | 20 +++++++++--------- ...ConsistencyRetryPolicyIntegrationTest.java | 20 +++++++++--------- .../EC2MultiRegionAddressTranslatorTest.java | 20 +++++++++--------- .../ErrorAwarePolicyIntegrationTest.java | 20 +++++++++--------- ...FallthroughRetryPolicyIntegrationTest.java | 20 +++++++++--------- .../core/policies/HostFilterPolicyTest.java | 20 +++++++++--------- ...otenceAwareRetryPolicyIntegrationTest.java | 20 +++++++++--------- .../core/policies/LatencyAwarePolicyTest.java | 20 +++++++++--------- .../policies/LimitingLoadBalancingPolicy.java | 20 +++++++++--------- .../LoggingRetryPolicyIntegrationTest.java | 20 +++++++++--------- .../core/policies/RetryDecisionTest.java | 20 +++++++++--------- .../core/policies/RollingCountTest.java | 20 +++++++++--------- .../core/policies/RoundRobinPolicyTest.java | 20 +++++++++--------- .../core/policies/TokenAwarePolicyTest.java | 20 +++++++++--------- .../core/policies/WhiteListPolicyTest.java | 20 +++++++++--------- .../querybuilder/BatchIdempotencyTest.java | 20 +++++++++--------- .../QueryBuilder21ExecutionTest.java | 20 +++++++++--------- .../QueryBuilderExecutionTest.java | 20 +++++++++--------- .../core/querybuilder/QueryBuilderITest.java | 20 +++++++++--------- .../QueryBuilderRoutingKeyTest.java | 20 +++++++++--------- .../core/querybuilder/QueryBuilderTest.java | 20 +++++++++--------- .../QueryBuilderTupleExecutionTest.java | 20 +++++++++--------- .../QueryBuilderUDTExecutionTest.java | 20 +++++++++--------- .../core/schemabuilder/AlterKeyspaceTest.java | 20 +++++++++--------- .../driver/core/schemabuilder/AlterTest.java | 20 +++++++++--------- .../schemabuilder/CompactionOptionsTest.java | 20 +++++++++--------- .../schemabuilder/CompressionOptionsTest.java | 20 +++++++++--------- .../core/schemabuilder/CreateIndexTest.java | 20 +++++++++--------- .../schemabuilder/CreateKeyspaceTest.java | 20 +++++++++--------- .../driver/core/schemabuilder/CreateTest.java | 20 +++++++++--------- .../core/schemabuilder/CreateTypeTest.java | 20 +++++++++--------- .../core/schemabuilder/DropKeyspaceTest.java | 20 +++++++++--------- .../driver/core/schemabuilder/DropTest.java | 20 +++++++++--------- .../core/schemabuilder/SchemaBuilderIT.java | 20 +++++++++--------- .../driver/core/utils/CassandraVersion.java | 20 +++++++++--------- .../driver/core/utils/DseVersion.java | 20 +++++++++--------- .../core/utils/SocketChannelMonitor.java | 20 +++++++++--------- .../core/utils/UUIDsPIDFromPropertyTest.java | 20 +++++++++--------- .../driver/core/utils/UUIDsPIDNativeTest.java | 20 +++++++++--------- .../utils/UUIDsPIDPropertyInvalidTest.java | 20 +++++++++--------- .../datastax/driver/core/utils/UUIDsTest.java | 20 +++++++++--------- .../src/test/resources/log4j.properties | 20 +++++++++--------- driver-dist/pom.xml | 20 +++++++++--------- driver-dist/src/assembly/binary-tarball.xml | 20 +++++++++--------- driver-examples/pom.xml | 20 +++++++++--------- .../basic/CreateAndPopulateKeyspace.java | 20 +++++++++--------- .../examples/basic/ReadCassandraVersion.java | 20 +++++++++--------- .../basic/ReadTopologyAndSchemaMetadata.java | 20 +++++++++--------- .../driver/examples/datatypes/Blobs.java | 20 +++++++++--------- .../examples/json/JacksonJsonColumn.java | 20 +++++++++--------- .../examples/json/JacksonJsonFunction.java | 20 +++++++++--------- .../driver/examples/json/JacksonJsonRow.java | 20 +++++++++--------- .../examples/json/Jsr353JsonColumn.java | 20 +++++++++--------- .../examples/json/Jsr353JsonFunction.java | 20 +++++++++--------- .../driver/examples/json/Jsr353JsonRow.java | 20 +++++++++--------- .../driver/examples/json/PlainTextJson.java | 20 +++++++++--------- .../examples/paging/ForwardPagingRestUi.java | 20 +++++++++--------- .../examples/paging/RandomPagingRestUi.java | 20 +++++++++--------- .../src/main/resources/logback.xml | 20 +++++++++--------- driver-extras/pom.xml | 20 +++++++++--------- .../driver/extras/codecs/MappingCodec.java | 20 +++++++++--------- .../driver/extras/codecs/ParsingCodec.java | 20 +++++++++--------- .../codecs/arrays/AbstractArrayCodec.java | 20 +++++++++--------- .../arrays/AbstractPrimitiveArrayCodec.java | 20 +++++++++--------- .../codecs/arrays/DoubleArrayCodec.java | 20 +++++++++--------- .../extras/codecs/arrays/FloatArrayCodec.java | 20 +++++++++--------- .../extras/codecs/arrays/IntArrayCodec.java | 20 +++++++++--------- .../extras/codecs/arrays/LongArrayCodec.java | 20 +++++++++--------- .../codecs/arrays/ObjectArrayCodec.java | 20 +++++++++--------- .../extras/codecs/arrays/package-info.java | 21 +++++++++---------- .../extras/codecs/date/SimpleDateCodec.java | 20 +++++++++--------- .../codecs/date/SimpleTimestampCodec.java | 20 +++++++++--------- .../extras/codecs/date/package-info.java | 21 +++++++++---------- .../extras/codecs/enums/EnumNameCodec.java | 20 +++++++++--------- .../extras/codecs/enums/EnumOrdinalCodec.java | 20 +++++++++--------- .../extras/codecs/enums/package-info.java | 21 +++++++++---------- .../extras/codecs/guava/OptionalCodec.java | 20 +++++++++--------- .../extras/codecs/guava/package-info.java | 21 +++++++++---------- .../codecs/jdk8/IgnoreJDK6Requirement.java | 20 +++++++++--------- .../extras/codecs/jdk8/InstantCodec.java | 20 +++++++++--------- .../extras/codecs/jdk8/LocalDateCodec.java | 20 +++++++++--------- .../extras/codecs/jdk8/LocalTimeCodec.java | 20 +++++++++--------- .../extras/codecs/jdk8/OptionalCodec.java | 20 +++++++++--------- .../codecs/jdk8/ZonedDateTimeCodec.java | 20 +++++++++--------- .../extras/codecs/jdk8/package-info.java | 21 +++++++++---------- .../extras/codecs/joda/DateTimeCodec.java | 20 +++++++++--------- .../extras/codecs/joda/InstantCodec.java | 20 +++++++++--------- .../extras/codecs/joda/LocalDateCodec.java | 20 +++++++++--------- .../extras/codecs/joda/LocalTimeCodec.java | 20 +++++++++--------- .../extras/codecs/joda/package-info.java | 21 +++++++++---------- .../extras/codecs/json/JacksonJsonCodec.java | 20 +++++++++--------- .../extras/codecs/json/Jsr353JsonCodec.java | 20 +++++++++--------- .../extras/codecs/json/package-info.java | 21 +++++++++---------- .../driver/extras/codecs/package-info.java | 21 +++++++++---------- .../extras/codecs/arrays/ArrayCodecsTest.java | 20 +++++++++--------- .../codecs/date/SimpleDateCodecTest.java | 20 +++++++++--------- .../codecs/date/SimpleDateCodecsTest.java | 20 +++++++++--------- .../codecs/date/SimpleTimestampCodecTest.java | 20 +++++++++--------- .../extras/codecs/enums/EnumCodecsTest.java | 20 +++++++++--------- .../codecs/guava/OptionalCodecTest.java | 20 +++++++++--------- .../extras/codecs/jdk8/InstantCodecTest.java | 20 +++++++++--------- .../codecs/jdk8/Jdk8TimeCodecsTest.java | 20 +++++++++--------- .../codecs/jdk8/LocalDateCodecTest.java | 20 +++++++++--------- .../codecs/jdk8/LocalTimeCodecTest.java | 20 +++++++++--------- .../extras/codecs/jdk8/OptionalCodecTest.java | 20 +++++++++--------- .../codecs/jdk8/ZonedDateTimeCodecTest.java | 20 +++++++++--------- .../extras/codecs/joda/DateTimeCodecTest.java | 20 +++++++++--------- .../extras/codecs/joda/InstantCodecTest.java | 20 +++++++++--------- .../codecs/joda/JodaTimeCodecsTest.java | 20 +++++++++--------- .../codecs/joda/LocalDateCodecTest.java | 20 +++++++++--------- .../codecs/joda/LocalTimeCodecTest.java | 20 +++++++++--------- .../codecs/json/JacksonJsonCodecTest.java | 20 +++++++++--------- .../codecs/json/Jsr353JsonCodecTest.java | 20 +++++++++--------- .../src/test/resources/log4j.properties | 20 +++++++++--------- driver-mapping/pom.xml | 20 +++++++++--------- .../mapping/AccessorInvocationHandler.java | 20 +++++++++--------- .../driver/mapping/AccessorMapper.java | 20 +++++++++--------- .../driver/mapping/AliasedMappedProperty.java | 20 +++++++++--------- .../driver/mapping/AnnotationChecks.java | 20 +++++++++--------- .../driver/mapping/AnnotationParser.java | 20 +++++++++--------- .../mapping/DefaultHierarchyScanStrategy.java | 20 +++++++++--------- .../driver/mapping/DefaultMappedProperty.java | 20 +++++++++--------- .../driver/mapping/DefaultNamingStrategy.java | 20 +++++++++--------- .../driver/mapping/DefaultPropertyMapper.java | 20 +++++++++--------- .../driver/mapping/DriverThrowables.java | 20 +++++++++--------- .../datastax/driver/mapping/EntityMapper.java | 20 +++++++++--------- .../driver/mapping/HierarchyScanStrategy.java | 20 +++++++++--------- ...appedClassesOnlyHierarchyScanStrategy.java | 20 +++++++++--------- .../driver/mapping/MappedProperty.java | 20 +++++++++--------- .../driver/mapping/MappedUDTCodec.java | 20 +++++++++--------- .../com/datastax/driver/mapping/Mapper.java | 20 +++++++++--------- .../driver/mapping/MapperBoundStatement.java | 20 +++++++++--------- .../driver/mapping/MappingConfiguration.java | 20 +++++++++--------- .../driver/mapping/MappingManager.java | 20 +++++++++--------- .../datastax/driver/mapping/MethodMapper.java | 20 +++++++++--------- .../driver/mapping/NamingConvention.java | 20 +++++++++--------- .../driver/mapping/NamingConventions.java | 20 +++++++++--------- .../driver/mapping/NamingStrategy.java | 20 +++++++++--------- .../mapping/PropertyAccessStrategy.java | 20 +++++++++--------- .../driver/mapping/PropertyMapper.java | 20 +++++++++--------- .../mapping/PropertyTransienceStrategy.java | 20 +++++++++--------- .../datastax/driver/mapping/QueryType.java | 20 +++++++++--------- .../driver/mapping/ReflectionUtils.java | 20 +++++++++--------- .../com/datastax/driver/mapping/Result.java | 20 +++++++++--------- .../datastax/driver/mapping/TypeMappings.java | 20 +++++++++--------- .../com/datastax/driver/mapping/Word.java | 20 +++++++++--------- .../driver/mapping/annotations/Accessor.java | 20 +++++++++--------- .../mapping/annotations/ClusteringColumn.java | 20 +++++++++--------- .../driver/mapping/annotations/Column.java | 20 +++++++++--------- .../driver/mapping/annotations/Computed.java | 20 +++++++++--------- .../driver/mapping/annotations/Defaults.java | 20 +++++++++--------- .../driver/mapping/annotations/Field.java | 20 +++++++++--------- .../driver/mapping/annotations/Frozen.java | 20 +++++++++--------- .../driver/mapping/annotations/FrozenKey.java | 20 +++++++++--------- .../mapping/annotations/FrozenValue.java | 20 +++++++++--------- .../driver/mapping/annotations/Param.java | 20 +++++++++--------- .../mapping/annotations/PartitionKey.java | 20 +++++++++--------- .../driver/mapping/annotations/Query.java | 20 +++++++++--------- .../mapping/annotations/QueryParameters.java | 20 +++++++++--------- .../driver/mapping/annotations/Table.java | 20 +++++++++--------- .../driver/mapping/annotations/Transient.java | 20 +++++++++--------- .../driver/mapping/annotations/UDT.java | 20 +++++++++--------- .../mapping/MapperAccessorParamsTest.java | 20 +++++++++--------- .../driver/mapping/MapperAccessorTest.java | 20 +++++++++--------- .../driver/mapping/MapperAsyncResultTest.java | 20 +++++++++--------- .../driver/mapping/MapperAsyncTest.java | 20 +++++++++--------- .../mapping/MapperCaseSensitivityTest.java | 20 +++++++++--------- .../mapping/MapperCompositeKeyTest.java | 20 +++++++++--------- .../mapping/MapperComputedFieldsTest.java | 20 +++++++++--------- .../driver/mapping/MapperCustomCodecTest.java | 20 +++++++++--------- .../mapping/MapperDefaultKeyspaceTest.java | 20 +++++++++--------- .../mapping/MapperInvalidAnnotationsTest.java | 20 +++++++++--------- .../mapping/MapperMaterializedViewTest.java | 20 +++++++++--------- .../mapping/MapperNestedCollectionsTest.java | 20 +++++++++--------- .../driver/mapping/MapperNestedUDTTest.java | 20 +++++++++--------- .../driver/mapping/MapperOptionTest.java | 20 +++++++++--------- .../mapping/MapperPolymorphismTest.java | 20 +++++++++--------- .../mapping/MapperPrimitiveTypes22Test.java | 20 +++++++++--------- .../mapping/MapperPrimitiveTypesTest.java | 20 +++++++++--------- .../mapping/MapperReconnectionTest.java | 20 +++++++++--------- .../mapping/MapperSaveNullFieldsTest.java | 20 +++++++++--------- .../datastax/driver/mapping/MapperTest.java | 20 +++++++++--------- .../mapping/MapperUDTCollectionsTest.java | 20 +++++++++--------- .../driver/mapping/MapperUDTTest.java | 20 +++++++++--------- ...onfigurationHierarchyScanStrategyTest.java | 20 +++++++++--------- ...appingConfigurationNamingStrategyTest.java | 20 +++++++++--------- ...appingConfigurationPropertyAccessTest.java | 20 +++++++++--------- ...ngConfigurationTransienceStrategyTest.java | 20 +++++++++--------- .../MappingConfigurationTransientTest.java | 20 +++++++++--------- .../driver/mapping/NamingConventionsTest.java | 20 +++++++++--------- .../mapping/SyntheticFieldsMapperTest.java | 20 +++++++++--------- .../driver/mapping/UDTFieldMapperTest.java | 20 +++++++++--------- .../src/test/resources/log4j.properties | 20 +++++++++--------- driver-tests/osgi/pom.xml | 20 +++++++++--------- .../driver/osgi/api/MailboxException.java | 20 +++++++++--------- .../driver/osgi/api/MailboxMessage.java | 20 +++++++++--------- .../driver/osgi/api/MailboxService.java | 20 +++++++++--------- .../datastax/driver/osgi/impl/Activator.java | 20 +++++++++--------- .../driver/osgi/impl/MailboxImpl.java | 20 +++++++++--------- .../datastax/driver/osgi/BundleOptions.java | 20 +++++++++--------- .../driver/osgi/CCMBridgeListener.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceDefaultIT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceGuava17IT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceGuava18IT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceGuava19IT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceGuava20IT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceGuava21IT.java | 20 +++++++++--------- .../osgi/MailboxServiceHdrHistogramIT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceLZ4IT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceShadedIT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceSnappyIT.java | 20 +++++++++--------- .../driver/osgi/MailboxServiceTests.java | 20 +++++++++--------- .../osgi/src/test/resources/exam.properties | 20 +++++++++--------- .../osgi/src/test/resources/logback.xml | 20 +++++++++--------- driver-tests/pom.xml | 20 +++++++++--------- driver-tests/stress/pom.xml | 20 +++++++++--------- .../driver/stress/AsynchronousConsumer.java | 20 +++++++++--------- .../driver/stress/BlockingConsumer.java | 20 +++++++++--------- .../stress/ConsistencyLevelConverter.java | 20 +++++++++--------- .../com/datastax/driver/stress/Consumer.java | 20 +++++++++--------- .../datastax/driver/stress/Generators.java | 20 +++++++++--------- .../driver/stress/QueryGenerator.java | 20 +++++++++--------- .../com/datastax/driver/stress/Reporter.java | 20 +++++++++--------- .../com/datastax/driver/stress/Stress.java | 20 +++++++++--------- pom.xml | 6 +++--- 661 files changed, 6603 insertions(+), 6612 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index c54a95cda33..7da5f85f55c 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -1,18 +1,18 @@ diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractAddressableByIndexData.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractAddressableByIndexData.java index fc795b29578..3cc9fb75592 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractAddressableByIndexData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractAddressableByIndexData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractData.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractData.java index 80eaed6a2c4..bbb349c5b6a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractGettableByIndexData.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractGettableByIndexData.java index 287de62cc46..d1b19741c19 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractGettableByIndexData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractGettableByIndexData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractGettableData.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractGettableData.java index a7cbe78abc5..1cd4898c588 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractGettableData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractGettableData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractMonotonicTimestampGenerator.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractMonotonicTimestampGenerator.java index 4b4688c1fc9..18ed00a0137 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractMonotonicTimestampGenerator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractMonotonicTimestampGenerator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractReconnectionHandler.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractReconnectionHandler.java index 64cea33230d..ad7234c9499 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractReconnectionHandler.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractReconnectionHandler.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractSession.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractSession.java index 599f4e96c4a..c74320540d9 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractSession.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractSession.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractTableMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractTableMetadata.java index 1c38a9abcc3..ee8b9205386 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractTableMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractTableMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java index 39699e6456d..bf8e6887943 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java b/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java index 8bae6c9e389..0bf225eed90 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedRow.java b/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedRow.java index e3bea24cb86..ca78e52481e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedRow.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedRow.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.java b/driver-core/src/main/java/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.java index 57ba547cab8..b5d1ce8a9e3 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/AuthProvider.java b/driver-core/src/main/java/com/datastax/driver/core/AuthProvider.java index ef735ec66ec..cef94ab2832 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AuthProvider.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AuthProvider.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Authenticator.java b/driver-core/src/main/java/com/datastax/driver/core/Authenticator.java index 19f15936afc..0936c2827e3 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Authenticator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Authenticator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/BatchStatement.java b/driver-core/src/main/java/com/datastax/driver/core/BatchStatement.java index d7dd037d8d7..481798a7174 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/BatchStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/BatchStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/BoundStatement.java b/driver-core/src/main/java/com/datastax/driver/core/BoundStatement.java index ad27aed86c9..45264e81165 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/BoundStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/BoundStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java b/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java index 620258dd0a4..0db58022b8d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ChainedResultSetFuture.java b/driver-core/src/main/java/com/datastax/driver/core/ChainedResultSetFuture.java index 0dfd0d161b5..872604312be 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ChainedResultSetFuture.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ChainedResultSetFuture.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Clock.java b/driver-core/src/main/java/com/datastax/driver/core/Clock.java index 47cb22f488c..a2d31b5b0c5 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Clock.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Clock.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java b/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java index 51effb25775..2588b9db077 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java index 4fd297d62ba..56b17601649 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ClusterNameMismatchException.java b/driver-core/src/main/java/com/datastax/driver/core/ClusterNameMismatchException.java index 946d06f58a4..d467d346f25 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ClusterNameMismatchException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ClusterNameMismatchException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ClusterWidePercentileTracker.java b/driver-core/src/main/java/com/datastax/driver/core/ClusterWidePercentileTracker.java index b77acd25ba7..8766106aaa1 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ClusterWidePercentileTracker.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ClusterWidePercentileTracker.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ClusteringOrder.java b/driver-core/src/main/java/com/datastax/driver/core/ClusteringOrder.java index 3b639c6093e..50cd74bc962 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ClusteringOrder.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ClusteringOrder.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/CodecRegistry.java b/driver-core/src/main/java/com/datastax/driver/core/CodecRegistry.java index 2e8ef03dfa7..c32f0ab607b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CodecRegistry.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CodecRegistry.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/CodecUtils.java b/driver-core/src/main/java/com/datastax/driver/core/CodecUtils.java index b59cef271af..2499b226bc5 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CodecUtils.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CodecUtils.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ColumnDefinitions.java b/driver-core/src/main/java/com/datastax/driver/core/ColumnDefinitions.java index a3721f74821..7b71ed799fe 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ColumnDefinitions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ColumnDefinitions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java index 851f7fad13a..ad1c503beb7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ColumnMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Configuration.java b/driver-core/src/main/java/com/datastax/driver/core/Configuration.java index 25e88d71b10..fc0e77a6888 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Configuration.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Configuration.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index 6c7d89b6745..50b33a0274f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ConsistencyLevel.java b/driver-core/src/main/java/com/datastax/driver/core/ConsistencyLevel.java index d6352bf4713..243978048bd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ConsistencyLevel.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ConsistencyLevel.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java b/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java index 1483190abb2..c1c5531d1ca 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ConvictionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/ConvictionPolicy.java index f1bd00ef123..0fce5d122fe 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ConvictionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ConvictionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DataType.java b/driver-core/src/main/java/com/datastax/driver/core/DataType.java index 1f29a9c7ab6..b7e7653006b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DataType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DataType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DataTypeClassNameParser.java b/driver-core/src/main/java/com/datastax/driver/core/DataTypeClassNameParser.java index f7741702bff..2e7f4c1bfe7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DataTypeClassNameParser.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DataTypeClassNameParser.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DataTypeCqlNameParser.java b/driver-core/src/main/java/com/datastax/driver/core/DataTypeCqlNameParser.java index 4a0bd6ed83c..4b36b07f638 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DataTypeCqlNameParser.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DataTypeCqlNameParser.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DefaultPreparedStatement.java b/driver-core/src/main/java/com/datastax/driver/core/DefaultPreparedStatement.java index 725347ad0b9..9680664944b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DefaultPreparedStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DefaultPreparedStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DefaultResultSetFuture.java b/driver-core/src/main/java/com/datastax/driver/core/DefaultResultSetFuture.java index 1ad214e5d33..ba2239337c8 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DefaultResultSetFuture.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DefaultResultSetFuture.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DelegatingCluster.java b/driver-core/src/main/java/com/datastax/driver/core/DelegatingCluster.java index a693308dfa6..bf8c06f6f4f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DelegatingCluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DelegatingCluster.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DirectedGraph.java b/driver-core/src/main/java/com/datastax/driver/core/DirectedGraph.java index dc76262c365..5987c511d71 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DirectedGraph.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DirectedGraph.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DriverThrowables.java b/driver-core/src/main/java/com/datastax/driver/core/DriverThrowables.java index ec4fb965708..9e692a2c506 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DriverThrowables.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DriverThrowables.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Duration.java b/driver-core/src/main/java/com/datastax/driver/core/Duration.java index d28e891c245..729b0c99543 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Duration.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Duration.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/EventDebouncer.java b/driver-core/src/main/java/com/datastax/driver/core/EventDebouncer.java index ef48c0dd953..a1acb26888e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/EventDebouncer.java +++ b/driver-core/src/main/java/com/datastax/driver/core/EventDebouncer.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ExceptionCatchingRunnable.java b/driver-core/src/main/java/com/datastax/driver/core/ExceptionCatchingRunnable.java index bc87885d32b..e14dc3a9b5f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ExceptionCatchingRunnable.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ExceptionCatchingRunnable.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ExceptionCode.java b/driver-core/src/main/java/com/datastax/driver/core/ExceptionCode.java index e162ff04d74..48a6c5822f2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ExceptionCode.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ExceptionCode.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ExecutionInfo.java b/driver-core/src/main/java/com/datastax/driver/core/ExecutionInfo.java index a4bf946eeff..f41f8259f46 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ExecutionInfo.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ExecutionInfo.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Frame.java b/driver-core/src/main/java/com/datastax/driver/core/Frame.java index 4b8abfeb776..36cd16fca8d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Frame.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Frame.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/FrameCompressor.java b/driver-core/src/main/java/com/datastax/driver/core/FrameCompressor.java index b2eda8d41af..58e91f0da3d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/FrameCompressor.java +++ b/driver-core/src/main/java/com/datastax/driver/core/FrameCompressor.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java index 397932a2dc2..22221728456 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/GettableByIndexData.java b/driver-core/src/main/java/com/datastax/driver/core/GettableByIndexData.java index c3ff0761e87..a0a4c63f414 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/GettableByIndexData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/GettableByIndexData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/GettableByNameData.java b/driver-core/src/main/java/com/datastax/driver/core/GettableByNameData.java index e30df850d7a..e13c522c20a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/GettableByNameData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/GettableByNameData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/GettableData.java b/driver-core/src/main/java/com/datastax/driver/core/GettableData.java index 7a974728dde..a2f62a6448c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/GettableData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/GettableData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java index d7b14539341..6f8c400c37a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java +++ b/driver-core/src/main/java/com/datastax/driver/core/GuavaCompatibility.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Host.java b/driver-core/src/main/java/com/datastax/driver/core/Host.java index af36f894207..0232eebc532 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Host.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Host.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java b/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java index 1dcfb336e6e..ac24228d633 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java +++ b/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/HostDistance.java b/driver-core/src/main/java/com/datastax/driver/core/HostDistance.java index 11ac2d1ca77..d1913d3408c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/HostDistance.java +++ b/driver-core/src/main/java/com/datastax/driver/core/HostDistance.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java index f77e70f89a7..d4a4bbd7b87 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/IndexMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java index b616d22e456..ee65aa0dcc5 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/JdkSSLOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java index 831fc549259..45ce2977dbf 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/LZ4Compressor.java b/driver-core/src/main/java/com/datastax/driver/core/LZ4Compressor.java index 595adac208f..19633c116df 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/LZ4Compressor.java +++ b/driver-core/src/main/java/com/datastax/driver/core/LZ4Compressor.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/LatencyTracker.java b/driver-core/src/main/java/com/datastax/driver/core/LatencyTracker.java index fb29c1a6f5d..b8b76670017 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/LatencyTracker.java +++ b/driver-core/src/main/java/com/datastax/driver/core/LatencyTracker.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/LocalDate.java b/driver-core/src/main/java/com/datastax/driver/core/LocalDate.java index b47f738df0b..424c87c3abb 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/LocalDate.java +++ b/driver-core/src/main/java/com/datastax/driver/core/LocalDate.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/LoggingMonotonicTimestampGenerator.java b/driver-core/src/main/java/com/datastax/driver/core/LoggingMonotonicTimestampGenerator.java index 5bb44e8a1c7..cae816324df 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/LoggingMonotonicTimestampGenerator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/LoggingMonotonicTimestampGenerator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/MD5Digest.java b/driver-core/src/main/java/com/datastax/driver/core/MD5Digest.java index 2ff526e3921..12f50bc13ad 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/MD5Digest.java +++ b/driver-core/src/main/java/com/datastax/driver/core/MD5Digest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java index 9ce1e8971cc..e232e248083 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Message.java b/driver-core/src/main/java/com/datastax/driver/core/Message.java index 09c0edd4085..d2ddba63248 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Message.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Message.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java index f31f2c5a209..15e82f2e5b9 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Metrics.java b/driver-core/src/main/java/com/datastax/driver/core/Metrics.java index c459b47ef0a..1debeb4a6e9 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Metrics.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Metrics.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/MetricsOptions.java b/driver-core/src/main/java/com/datastax/driver/core/MetricsOptions.java index 4c850ffd515..4b43027321c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/MetricsOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/MetricsOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Native.java b/driver-core/src/main/java/com/datastax/driver/core/Native.java index 96101304328..aba985b6426 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Native.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Native.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/NettyOptions.java b/driver-core/src/main/java/com/datastax/driver/core/NettyOptions.java index 0548ced056b..b4a8c619591 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/NettyOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/NettyOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/NettySSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/NettySSLOptions.java index b00cf264c56..88909609055 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/NettySSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/NettySSLOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/NettyUtil.java b/driver-core/src/main/java/com/datastax/driver/core/NettyUtil.java index 3776f2f8f80..66ac351395c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/NettyUtil.java +++ b/driver-core/src/main/java/com/datastax/driver/core/NettyUtil.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/PagingIterable.java b/driver-core/src/main/java/com/datastax/driver/core/PagingIterable.java index 1abd67aad05..4a7fdb90aa4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PagingIterable.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PagingIterable.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/PagingState.java b/driver-core/src/main/java/com/datastax/driver/core/PagingState.java index e591f25c712..708f74c92d6 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PagingState.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PagingState.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - package com.datastax.driver.core; import com.datastax.driver.core.exceptions.PagingStateException; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ParseUtils.java b/driver-core/src/main/java/com/datastax/driver/core/ParseUtils.java index a2d1ad2ce48..f9cefb0abbd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ParseUtils.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ParseUtils.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/PerHostPercentileTracker.java b/driver-core/src/main/java/com/datastax/driver/core/PerHostPercentileTracker.java index f86e8e9e398..081e2c9e06e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PerHostPercentileTracker.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PerHostPercentileTracker.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/PercentileTracker.java b/driver-core/src/main/java/com/datastax/driver/core/PercentileTracker.java index 9b177ca057b..6f60df2f1b2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PercentileTracker.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PercentileTracker.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/PlainTextAuthProvider.java b/driver-core/src/main/java/com/datastax/driver/core/PlainTextAuthProvider.java index 60935b73a58..67ef1781004 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PlainTextAuthProvider.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PlainTextAuthProvider.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java b/driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java index ec6544a3d20..7ffd5b06362 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PoolingOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/PreparedId.java b/driver-core/src/main/java/com/datastax/driver/core/PreparedId.java index 1755bd41826..9a0e255f380 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PreparedId.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PreparedId.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/PreparedStatement.java b/driver-core/src/main/java/com/datastax/driver/core/PreparedStatement.java index 5ffeb968b91..acf0dd3530c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PreparedStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PreparedStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ProtocolEvent.java b/driver-core/src/main/java/com/datastax/driver/core/ProtocolEvent.java index 5dc0958bf6d..863c0561c78 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ProtocolEvent.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ProtocolEvent.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ProtocolOptions.java b/driver-core/src/main/java/com/datastax/driver/core/ProtocolOptions.java index 9880c94687a..77848c0fc99 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ProtocolOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ProtocolOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ProtocolV1Authenticator.java b/driver-core/src/main/java/com/datastax/driver/core/ProtocolV1Authenticator.java index b0d6f33485f..007fe14c2db 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ProtocolV1Authenticator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ProtocolV1Authenticator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ProtocolVersion.java b/driver-core/src/main/java/com/datastax/driver/core/ProtocolVersion.java index 479ae776af1..e5836c5ca6d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ProtocolVersion.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ProtocolVersion.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/QueryLogger.java b/driver-core/src/main/java/com/datastax/driver/core/QueryLogger.java index 93873263307..32963fbd3ce 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/QueryLogger.java +++ b/driver-core/src/main/java/com/datastax/driver/core/QueryLogger.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java b/driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java index d71edc40f52..d7fc041649c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/QueryTrace.java b/driver-core/src/main/java/com/datastax/driver/core/QueryTrace.java index 0bb662473ff..1d59a4f201e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/QueryTrace.java +++ b/driver-core/src/main/java/com/datastax/driver/core/QueryTrace.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/RegularStatement.java b/driver-core/src/main/java/com/datastax/driver/core/RegularStatement.java index e157bfa8e18..cc2c9a6fc46 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RegularStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RegularStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.java index fa2916bcc0c..53364df646d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.java index 6047c658cae..a5740680275 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.java index 9a698e4e870..707ee189c3c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ReplicationStategy.java b/driver-core/src/main/java/com/datastax/driver/core/ReplicationStategy.java index 1f71302dd38..605d37335b3 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ReplicationStategy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ReplicationStategy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java index c68f76a0168..1c81102abb5 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Requests.java b/driver-core/src/main/java/com/datastax/driver/core/Requests.java index f2021936f61..a4b69d2e284 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Requests.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Requests.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Responses.java b/driver-core/src/main/java/com/datastax/driver/core/Responses.java index 98a120bf5cf..cecd1e1ae9f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Responses.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Responses.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ResultSet.java b/driver-core/src/main/java/com/datastax/driver/core/ResultSet.java index 582b517afed..3d058968ab2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ResultSet.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ResultSet.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ResultSetFuture.java b/driver-core/src/main/java/com/datastax/driver/core/ResultSetFuture.java index f91f3a10f81..6a246f69343 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ResultSetFuture.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ResultSetFuture.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Row.java b/driver-core/src/main/java/com/datastax/driver/core/Row.java index ea79b907018..69b935ce977 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Row.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Row.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SSLOptions.java b/driver-core/src/main/java/com/datastax/driver/core/SSLOptions.java index 74b1a8dae55..e621854a21f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SSLOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SSLOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SchemaChangeListener.java b/driver-core/src/main/java/com/datastax/driver/core/SchemaChangeListener.java index 15344b73b50..47cf82d1cbf 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SchemaChangeListener.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SchemaChangeListener.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SchemaChangeListenerBase.java b/driver-core/src/main/java/com/datastax/driver/core/SchemaChangeListenerBase.java index ffddc4dd9cc..a48579b8f8e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SchemaChangeListenerBase.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SchemaChangeListenerBase.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SchemaElement.java b/driver-core/src/main/java/com/datastax/driver/core/SchemaElement.java index b132ba72746..5443e67caa4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SchemaElement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SchemaElement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java b/driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java index fcd185971f4..09ea0e33037 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ServerSideTimestampGenerator.java b/driver-core/src/main/java/com/datastax/driver/core/ServerSideTimestampGenerator.java index 5560e2932ea..9ca292db118 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ServerSideTimestampGenerator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ServerSideTimestampGenerator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Session.java b/driver-core/src/main/java/com/datastax/driver/core/Session.java index 115194d0364..4a591693e34 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Session.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Session.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java b/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java index 8702d24589c..f313da4aa9a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SettableByIndexData.java b/driver-core/src/main/java/com/datastax/driver/core/SettableByIndexData.java index 67ee259734c..220256ab54e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SettableByIndexData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SettableByIndexData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SettableByNameData.java b/driver-core/src/main/java/com/datastax/driver/core/SettableByNameData.java index 98ee9a1da4c..1aaa2292b02 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SettableByNameData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SettableByNameData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SettableData.java b/driver-core/src/main/java/com/datastax/driver/core/SettableData.java index 438bf44c40b..878c025faa0 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SettableData.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SettableData.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SimpleJSONParser.java b/driver-core/src/main/java/com/datastax/driver/core/SimpleJSONParser.java index 57aaa677d80..a59bfffda7c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SimpleJSONParser.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SimpleJSONParser.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SimpleStatement.java b/driver-core/src/main/java/com/datastax/driver/core/SimpleStatement.java index cd539abbd80..6cf37e80f23 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SimpleStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SimpleStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SnappyCompressor.java b/driver-core/src/main/java/com/datastax/driver/core/SnappyCompressor.java index 68d355125aa..d3d4a432098 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SnappyCompressor.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SnappyCompressor.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SocketOptions.java b/driver-core/src/main/java/com/datastax/driver/core/SocketOptions.java index 8cf9f9eedb0..1f860f1b176 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SocketOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SocketOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Statement.java b/driver-core/src/main/java/com/datastax/driver/core/Statement.java index 5c0329cb9db..6eb3ba6db1d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Statement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Statement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/StatementWrapper.java b/driver-core/src/main/java/com/datastax/driver/core/StatementWrapper.java index 0c79b64fcf3..9443611376d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/StatementWrapper.java +++ b/driver-core/src/main/java/com/datastax/driver/core/StatementWrapper.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/StreamIdGenerator.java b/driver-core/src/main/java/com/datastax/driver/core/StreamIdGenerator.java index f5771919991..325cecffb45 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/StreamIdGenerator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/StreamIdGenerator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/SystemProperties.java b/driver-core/src/main/java/com/datastax/driver/core/SystemProperties.java index 5fd48c5586c..c9ed45ae9e4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SystemProperties.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SystemProperties.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java index 99cb877c69e..c8d133b0833 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/TableOptionsMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/TableOptionsMetadata.java index 49c1dfc7254..e6553957954 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TableOptionsMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TableOptionsMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.java b/driver-core/src/main/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.java index 591c8099dbb..cdfbe160ba9 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/ThreadingOptions.java b/driver-core/src/main/java/com/datastax/driver/core/ThreadingOptions.java index 3d75bc56165..f3f97032002 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ThreadingOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ThreadingOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/TimestampGenerator.java b/driver-core/src/main/java/com/datastax/driver/core/TimestampGenerator.java index 7cd09c2438c..361f9fff580 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TimestampGenerator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TimestampGenerator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/Token.java b/driver-core/src/main/java/com/datastax/driver/core/Token.java index 4686f51c093..c7014d57e01 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Token.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Token.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java b/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java index 2ae58a9d579..777f1fdbb6d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TokenRange.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/TupleType.java b/driver-core/src/main/java/com/datastax/driver/core/TupleType.java index b7f49592a69..ca9279e1959 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TupleType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TupleType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/TupleValue.java b/driver-core/src/main/java/com/datastax/driver/core/TupleValue.java index 485f5c0f403..478b059bec6 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TupleValue.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TupleValue.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java index 9a10702b7f6..b4f0a1bd1ff 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TypeCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/TypeTokens.java b/driver-core/src/main/java/com/datastax/driver/core/TypeTokens.java index 25df8eccc95..e9ceedde446 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TypeTokens.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TypeTokens.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/UDTValue.java b/driver-core/src/main/java/com/datastax/driver/core/UDTValue.java index 220c363c0e9..b6aa875e27e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/UDTValue.java +++ b/driver-core/src/main/java/com/datastax/driver/core/UDTValue.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/UserType.java b/driver-core/src/main/java/com/datastax/driver/core/UserType.java index f590fdda82e..25142374c8c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/UserType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/UserType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/VIntCoding.java b/driver-core/src/main/java/com/datastax/driver/core/VIntCoding.java index c90d5530be6..b11829a832a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/VIntCoding.java +++ b/driver-core/src/main/java/com/datastax/driver/core/VIntCoding.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ // Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. diff --git a/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java b/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java index 2efa03f136d..2f83dd18606 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java +++ b/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/WriteType.java b/driver-core/src/main/java/com/datastax/driver/core/WriteType.java index 06686ac62d3..80269211db9 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/WriteType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/WriteType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/AlreadyExistsException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/AlreadyExistsException.java index 6d1d084a782..4f70885e0c3 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/AlreadyExistsException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/AlreadyExistsException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/AuthenticationException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/AuthenticationException.java index 8fcb226d55c..599f808e41a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/AuthenticationException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/AuthenticationException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/BootstrappingException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/BootstrappingException.java index aa2631dc88d..124cff8558a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/BootstrappingException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/BootstrappingException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/BusyConnectionException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/BusyConnectionException.java index 262c56c1bd3..723c8b59442 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/BusyConnectionException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/BusyConnectionException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/BusyPoolException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/BusyPoolException.java index 88d2cc879b1..8bcd755e94e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/BusyPoolException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/BusyPoolException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/CodecNotFoundException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/CodecNotFoundException.java index b5482336c60..1a1f711c107 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/CodecNotFoundException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/CodecNotFoundException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ConnectionException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ConnectionException.java index 878d31d3ea0..10c379aa416 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ConnectionException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ConnectionException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/CoordinatorException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/CoordinatorException.java index 30c610eb30c..23432d75064 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/CoordinatorException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/CoordinatorException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/DriverException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/DriverException.java index 4ed44fe2bfb..7c8684053f7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/DriverException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/DriverException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/DriverInternalError.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/DriverInternalError.java index 371f18c844a..dba39851ecc 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/DriverInternalError.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/DriverInternalError.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/FrameTooLongException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/FrameTooLongException.java index bb1d6b6171b..7b3aced1768 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/FrameTooLongException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/FrameTooLongException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/FunctionExecutionException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/FunctionExecutionException.java index d97002c1f48..d4564dc7718 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/FunctionExecutionException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/FunctionExecutionException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.java index 59237f16dd5..8b64291e561 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidQueryException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidQueryException.java index a61d6e89df1..5bb8892afe5 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidQueryException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidQueryException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidTypeException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidTypeException.java index 1acb518e6bf..249e6a3cdca 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidTypeException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/InvalidTypeException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/NoHostAvailableException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/NoHostAvailableException.java index 7e9a6a3d363..e3dd6f49001 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/NoHostAvailableException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/NoHostAvailableException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/OperationTimedOutException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/OperationTimedOutException.java index 4fde95aa617..93f8f778d59 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/OperationTimedOutException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/OperationTimedOutException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/OverloadedException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/OverloadedException.java index 57cf274861f..fdbd658f900 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/OverloadedException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/OverloadedException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/PagingStateException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/PagingStateException.java index 1dd275426d8..8736fcd2674 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/PagingStateException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/PagingStateException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ProtocolError.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ProtocolError.java index 2495a84d8d9..3f5cc6a32b7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ProtocolError.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ProtocolError.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryConsistencyException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryConsistencyException.java index 2a15340d82f..018e41de652 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryConsistencyException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryConsistencyException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryExecutionException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryExecutionException.java index 248a380a4f3..4f38e49948f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryExecutionException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryExecutionException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryValidationException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryValidationException.java index 83d7277c216..8e6572f7e0d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryValidationException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryValidationException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadFailureException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadFailureException.java index db6ed9b73fa..43db5ef7aa9 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadFailureException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadFailureException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadTimeoutException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadTimeoutException.java index e0068ae7777..e1da94e098e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadTimeoutException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadTimeoutException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ServerError.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ServerError.java index a275e3eb5e6..87a503c18e8 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ServerError.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ServerError.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/SyntaxError.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/SyntaxError.java index 595cfdef688..51593cb06aa 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/SyntaxError.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/SyntaxError.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/TraceRetrievalException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/TraceRetrievalException.java index 6fc10832490..23a48824f52 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/TraceRetrievalException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/TraceRetrievalException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/TransportException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/TransportException.java index c811dc8a149..02ca568271d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/TransportException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/TransportException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/TruncateException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/TruncateException.java index d747e89131e..db7735504e4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/TruncateException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/TruncateException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnauthorizedException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnauthorizedException.java index a6e42fd0c54..846a2f49f07 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnauthorizedException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnauthorizedException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnavailableException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnavailableException.java index dd2bb0083d6..edaa8a20f9d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnavailableException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnavailableException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnpreparedException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnpreparedException.java index 81cf23300f2..95ecdb32dd1 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnpreparedException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnpreparedException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnresolvedUserTypeException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnresolvedUserTypeException.java index 3cfce404c60..752587ec46c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnresolvedUserTypeException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnresolvedUserTypeException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedFeatureException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedFeatureException.java index e069a76fffc..ec32cad3c18 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedFeatureException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedFeatureException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedProtocolVersionException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedProtocolVersionException.java index 409986b78dc..f1c8931d986 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedProtocolVersionException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedProtocolVersionException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteFailureException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteFailureException.java index b4ef62d5009..60d8d9acb89 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteFailureException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteFailureException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteTimeoutException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteTimeoutException.java index 913b9141334..df0c80916cc 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteTimeoutException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteTimeoutException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/package-info.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/package-info.java index 53524d5da2d..c76e4bae728 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/package-info.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/package-info.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** * Exceptions thrown by the DataStax Java driver for Cassandra. diff --git a/driver-core/src/main/java/com/datastax/driver/core/package-info.java b/driver-core/src/main/java/com/datastax/driver/core/package-info.java index c720b89f5cb..f5003da2160 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/package-info.java +++ b/driver-core/src/main/java/com/datastax/driver/core/package-info.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** * The main package for the DataStax Java driver for Cassandra. diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/AddressTranslator.java b/driver-core/src/main/java/com/datastax/driver/core/policies/AddressTranslator.java index 132eb8bf934..1555b6c3aec 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/AddressTranslator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/AddressTranslator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/ChainableLoadBalancingPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/ChainableLoadBalancingPolicy.java index 96f697c3a10..a9d2f1e56c7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/ChainableLoadBalancingPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/ChainableLoadBalancingPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/Clock.java b/driver-core/src/main/java/com/datastax/driver/core/policies/Clock.java index e54049bdb9d..a382332e4ac 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/Clock.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/Clock.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantReconnectionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantReconnectionPolicy.java index 59ff4e8d89a..e50d7eb0fe7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantReconnectionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantReconnectionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.java index f110ce36c6f..af22fcae30e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.java index 04e3c7d2d96..598e1ba7076 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/DefaultRetryPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/DefaultRetryPolicy.java index 8fd28dce56b..237f3595a77 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/DefaultRetryPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/DefaultRetryPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicy.java index 38488197228..413e119de1a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslator.java b/driver-core/src/main/java/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslator.java index bd84b1ad76b..ce92338c84c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/ErrorAwarePolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/ErrorAwarePolicy.java index f62bf3ec86a..adae2e1e933 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/ErrorAwarePolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/ErrorAwarePolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/ExponentialReconnectionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/ExponentialReconnectionPolicy.java index e4fe708c2c5..9ae41755036 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/ExponentialReconnectionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/ExponentialReconnectionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/FallthroughRetryPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/FallthroughRetryPolicy.java index d78e950a205..a7acb7feab1 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/FallthroughRetryPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/FallthroughRetryPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/HostFilterPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/HostFilterPolicy.java index 96a9ba2cd96..cacb4607d0f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/HostFilterPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/HostFilterPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicy.java index 9db16b833a6..c9777c79dfe 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/IdentityTranslator.java b/driver-core/src/main/java/com/datastax/driver/core/policies/IdentityTranslator.java index b523dd45ffc..2cdf935d96e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/IdentityTranslator.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/IdentityTranslator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java index b375957b22c..3191e653b95 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/LoadBalancingPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/LoadBalancingPolicy.java index 2f576a8820a..c03d59d69ef 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/LoadBalancingPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/LoadBalancingPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/LoggingRetryPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/LoggingRetryPolicy.java index 547afd6d796..ba882ccb758 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/LoggingRetryPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/LoggingRetryPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/NoSpeculativeExecutionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/NoSpeculativeExecutionPolicy.java index 045bf1edfc1..940839fecfd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/NoSpeculativeExecutionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/NoSpeculativeExecutionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.java index 4bd75ba4811..8b8b84ef5a7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java b/driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java index 20ede451e01..881b437e13b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/Policies.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/ReconnectionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/ReconnectionPolicy.java index 195f44350e2..acae1efa2ea 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/ReconnectionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/ReconnectionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/RetryPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/RetryPolicy.java index a894aba5344..78c47f4ee92 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/RetryPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/RetryPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/RollingCount.java b/driver-core/src/main/java/com/datastax/driver/core/policies/RollingCount.java index 02dca25cd1f..7cb53c1e027 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/RollingCount.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/RollingCount.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/RoundRobinPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/RoundRobinPolicy.java index b4101c5b485..6121da4c1b4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/RoundRobinPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/RoundRobinPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.java index 82462270119..f936ca78c5c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java index cef6fc33aee..d0b912c6127 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/WhiteListPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/WhiteListPolicy.java index 08c3a4c04bc..83ca10267d3 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/WhiteListPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/WhiteListPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/package-info.java b/driver-core/src/main/java/com/datastax/driver/core/policies/package-info.java index 0b506f2fbeb..986935a8d21 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/package-info.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/package-info.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** * Policies that allow to control some of the behavior of the DataStax Java driver for Cassandra. diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Assignment.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Assignment.java index d8156f35ecd..153baf7497b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Assignment.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Assignment.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Batch.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Batch.java index 16007bf9233..9b92c4ed83f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Batch.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Batch.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BindMarker.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BindMarker.java index 57c8d07d6f8..23e2cdff77d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BindMarker.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BindMarker.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BuiltStatement.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BuiltStatement.java index 7658f0cb170..9a852f5935d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BuiltStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/BuiltStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java index e90559e6ac4..8b1e83f1f9a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java index 5ce9c788e84..90d0ae2df57 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Delete.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java index b9c03737ffd..0968316f7b8 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Insert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Ordering.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Ordering.java index a68d91a8ae5..fd695f735bd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Ordering.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Ordering.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java index 2ad12540dc0..cc1a06a93a6 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java index f349db80097..b6fb5fce8dd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Truncate.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Truncate.java index e352d750e10..b76b8d4535a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Truncate.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Truncate.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Update.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Update.java index 8567566ec4d..5d3ffbbd2c2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Update.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Update.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Using.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Using.java index dc2dcd9f797..4f46ee3aa9b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Using.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Using.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java index d003a874414..da8d810dfdd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Utils.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/package-info.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/package-info.java index bf8de2800e5..722b304a97a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/package-info.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/package-info.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** * A CQL3 query builder. diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/AbstractCreateStatement.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/AbstractCreateStatement.java index e63bd1b23a5..101de6b873e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/AbstractCreateStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/AbstractCreateStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Alter.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Alter.java index c95959a74f0..89f416a5eca 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Alter.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Alter.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/AlterKeyspace.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/AlterKeyspace.java index 0ea6d51d9f5..a965ca84b9f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/AlterKeyspace.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/AlterKeyspace.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/ColumnType.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/ColumnType.java index 6923737c77c..a60225a154e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/ColumnType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/ColumnType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Create.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Create.java index 101473bf8b4..0224552f94a 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Create.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Create.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateIndex.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateIndex.java index ac63402bcf2..02433a3d1fe 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateIndex.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateIndex.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateKeyspace.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateKeyspace.java index 03d630e6a05..5108b16ae03 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateKeyspace.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateKeyspace.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateType.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateType.java index cf0cbc6c1a1..3bd09127d89 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/CreateType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Drop.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Drop.java index 452ca46beb9..144ab017b2a 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Drop.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/Drop.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/DropKeyspace.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/DropKeyspace.java index ff503ad323b..2bbbbd8b886 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/DropKeyspace.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/DropKeyspace.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/KeyspaceOptions.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/KeyspaceOptions.java index f2e39ae64b0..ae11e2280bb 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/KeyspaceOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/KeyspaceOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/NativeColumnType.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/NativeColumnType.java index f38755a66f5..f49ff9b1585 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/NativeColumnType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/NativeColumnType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaBuilder.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaBuilder.java index 3e40c5a84da..bad84a7acca 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaBuilder.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaBuilder.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaStatement.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaStatement.java index 931b88b1b26..f47df613a3b 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/StatementStart.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/StatementStart.java index 5a7bdf5469e..215d8a8f6e2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/StatementStart.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/StatementStart.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/TableOptions.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/TableOptions.java index 240f656c9f2..a05029e223f 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/TableOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/TableOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/UDTType.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/UDTType.java index b5dd0cfb891..fbbfbbad4c4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/UDTType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/UDTType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/package-info.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/package-info.java index 4bb9314e534..5302e30b207 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/package-info.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/package-info.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ /** * A CQL3 schema builder. diff --git a/driver-core/src/main/java/com/datastax/driver/core/utils/Bytes.java b/driver-core/src/main/java/com/datastax/driver/core/utils/Bytes.java index f4517e8c910..882b3103464 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/utils/Bytes.java +++ b/driver-core/src/main/java/com/datastax/driver/core/utils/Bytes.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/main/java/com/datastax/driver/core/utils/MoreFutures.java b/driver-core/src/main/java/com/datastax/driver/core/utils/MoreFutures.java index d0c4d159e24..ef22df145f2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/utils/MoreFutures.java +++ b/driver-core/src/main/java/com/datastax/driver/core/utils/MoreFutures.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/main/java/com/datastax/driver/core/utils/MoreObjects.java b/driver-core/src/main/java/com/datastax/driver/core/utils/MoreObjects.java index 4e7b32d1285..5d4230c113e 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/utils/MoreObjects.java +++ b/driver-core/src/main/java/com/datastax/driver/core/utils/MoreObjects.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java b/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java index 39d58247450..4f1737b6b09 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java +++ b/driver-core/src/main/java/com/datastax/driver/core/utils/UUIDs.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/main/resources/com/datastax/driver/core/Driver.properties b/driver-core/src/main/resources/com/datastax/driver/core/Driver.properties index 383b98e04b1..fe3c96a752e 100644 --- a/driver-core/src/main/resources/com/datastax/driver/core/Driver.properties +++ b/driver-core/src/main/resources/com/datastax/driver/core/Driver.properties @@ -1,17 +1,17 @@ # -# Copyright (C) 2012-2015 DataStax Inc. +# Copyright (C) 2012-2017 DataStax Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # driver.version=${project.version} \ No newline at end of file diff --git a/driver-core/src/test/java/com/datastax/driver/core/AbstractBatchIdempotencyTest.java b/driver-core/src/test/java/com/datastax/driver/core/AbstractBatchIdempotencyTest.java index 9f809a1a648..ed7ecf2e714 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AbstractBatchIdempotencyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AbstractBatchIdempotencyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AbstractPoliciesTest.java b/driver-core/src/test/java/com/datastax/driver/core/AbstractPoliciesTest.java index 5f575ae9665..2ad598918ee 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AbstractPoliciesTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AbstractPoliciesTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AbstractReconnectionHandlerTest.java b/driver-core/src/test/java/com/datastax/driver/core/AbstractReconnectionHandlerTest.java index 367ca32852f..a4ec8169ea9 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AbstractReconnectionHandlerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AbstractReconnectionHandlerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AbstractReplicationStrategyTest.java b/driver-core/src/test/java/com/datastax/driver/core/AbstractReplicationStrategyTest.java index 7f9139ea9b4..28d4c9ac6ec 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AbstractReplicationStrategyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AbstractReplicationStrategyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataAssert.java b/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataAssert.java index 6be43f48d1c..6148ab6997c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java index abf84a30ad2..6dbdde7abaf 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/Assertions.java b/driver-core/src/test/java/com/datastax/driver/core/Assertions.java index 2582412516e..86ecc081c14 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/Assertions.java +++ b/driver-core/src/test/java/com/datastax/driver/core/Assertions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java b/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java index 1054a767109..2c7da742fe5 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AsyncResultSetTest.java b/driver-core/src/test/java/com/datastax/driver/core/AsyncResultSetTest.java index fd440c25758..c2b1991d9e3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AsyncResultSetTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AsyncResultSetTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AtomicMonotonicTimestampGeneratorTest.java b/driver-core/src/test/java/com/datastax/driver/core/AtomicMonotonicTimestampGeneratorTest.java index 9d59bd49d8d..df7ae1c0ec3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AtomicMonotonicTimestampGeneratorTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AtomicMonotonicTimestampGeneratorTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java b/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java index c96cc6914f0..21e5faa15f2 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/BatchStatementIdempotencyTest.java b/driver-core/src/test/java/com/datastax/driver/core/BatchStatementIdempotencyTest.java index 40ee2fdf880..2dc933a4ec6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/BatchStatementIdempotencyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/BatchStatementIdempotencyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/BatchStatementTest.java b/driver-core/src/test/java/com/datastax/driver/core/BatchStatementTest.java index 76ad6abcdd4..360897cf1f6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/BatchStatementTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/BatchStatementTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/BoundStatementTest.java b/driver-core/src/test/java/com/datastax/driver/core/BoundStatementTest.java index fed52617183..d12eae8a14e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/BoundStatementTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/BoundStatementTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java b/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java index 4d3b52338f6..04e6648255b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java index 683f66ed8a9..e103f0d4c7e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java b/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java index 043190478fb..78eb8435202 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMConfig.java b/driver-core/src/test/java/com/datastax/driver/core/CCMConfig.java index c2469133a2d..e8350f1faa8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMConfig.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMConfig.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMException.java b/driver-core/src/test/java/com/datastax/driver/core/CCMException.java index 52a301ca2ec..2c4981c903a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMException.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java index 853d844d493..45ac66b91b7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMWorkload.java b/driver-core/src/test/java/com/datastax/driver/core/CCMWorkload.java index 9f0c6f78248..8dd96b65a04 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMWorkload.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMWorkload.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CaseSensitivityTest.java b/driver-core/src/test/java/com/datastax/driver/core/CaseSensitivityTest.java index d951f646840..098c41674ce 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CaseSensitivityTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CaseSensitivityTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ClockFactoryTest.java b/driver-core/src/test/java/com/datastax/driver/core/ClockFactoryTest.java index 58623e6332c..603912debbc 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ClockFactoryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ClockFactoryTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ClusterAssert.java b/driver-core/src/test/java/com/datastax/driver/core/ClusterAssert.java index 579af08a358..c4dd0fa98c1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ClusterAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ClusterAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java b/driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java index ea122092b94..a7e7230958c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ClusterInitTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ClusterStressTest.java b/driver-core/src/test/java/com/datastax/driver/core/ClusterStressTest.java index 90c001f67b0..f41c34f8407 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ClusterStressTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ClusterStressTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ClusterWidePercentileTrackerTest.java b/driver-core/src/test/java/com/datastax/driver/core/ClusterWidePercentileTrackerTest.java index b139962112d..dc3dd06161b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ClusterWidePercentileTrackerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ClusterWidePercentileTrackerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CodecRegistryTest.java b/driver-core/src/test/java/com/datastax/driver/core/CodecRegistryTest.java index 4285436ee07..7ab55aa4b1d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CodecRegistryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CodecRegistryTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ColumnDefinitionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/ColumnDefinitionsTest.java index 7a12faaaa26..7e6183f17eb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ColumnDefinitionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ColumnDefinitionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ColumnMetadataAssert.java b/driver-core/src/test/java/com/datastax/driver/core/ColumnMetadataAssert.java index c705993715e..223e57d332a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ColumnMetadataAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ColumnMetadataAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CompressionTest.java b/driver-core/src/test/java/com/datastax/driver/core/CompressionTest.java index 8112cf8e481..7b2c4623544 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CompressionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CompressionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConditionChecker.java b/driver-core/src/test/java/com/datastax/driver/core/ConditionChecker.java index de29e1b1636..c3e71664d09 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConditionChecker.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConditionChecker.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConditionalUpdateTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConditionalUpdateTest.java index 73ae78b2b8c..6c349c7b80b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConditionalUpdateTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConditionalUpdateTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java index 28334ecf1bd..3c091d0f7ce 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConnectionReleaseTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java index 3174e054749..1daa5490f9d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ConsistencyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ControlConnectionTest.java b/driver-core/src/test/java/com/datastax/driver/core/ControlConnectionTest.java index e2c12f6f0c8..1c8c2ef81b1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ControlConnectionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ControlConnectionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CountingReconnectionPolicy.java b/driver-core/src/test/java/com/datastax/driver/core/CountingReconnectionPolicy.java index fcf25cf23e6..2928bd6cb47 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CountingReconnectionPolicy.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CountingReconnectionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CreateCCM.java b/driver-core/src/test/java/com/datastax/driver/core/CreateCCM.java index b9727a4e476..878e84e0d67 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CreateCCM.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CreateCCM.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java b/driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java index c51575ee9db..c4c7a1eed1c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CustomPercentileTrackerTest.java b/driver-core/src/test/java/com/datastax/driver/core/CustomPercentileTrackerTest.java index f823c9d4432..904a072c11f 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CustomPercentileTrackerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CustomPercentileTrackerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/CustomTypeTest.java b/driver-core/src/test/java/com/datastax/driver/core/CustomTypeTest.java index f2ccece5c8b..ff62e4878c2 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CustomTypeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CustomTypeTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataProviders.java b/driver-core/src/test/java/com/datastax/driver/core/DataProviders.java index fe724e872e7..b58b9f7d47a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataProviders.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataProviders.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeAssert.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeAssert.java index 023edc48605..626789f5fad 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeClassNameParserTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeClassNameParserTest.java index 925524642f1..5194be6c3bb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeClassNameParserTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeClassNameParserTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeCqlNameParserTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeCqlNameParserTest.java index 31418f57d06..705f4256fb5 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeCqlNameParserTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeCqlNameParserTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java index d2ceddc7eac..b1e8a7f430d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java b/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java index 20f8df74ff6..ee979474308 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DataTypeTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DelegatingClusterIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/DelegatingClusterIntegrationTest.java index f8b36aa013c..bb4fc8fd5f7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DelegatingClusterIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DelegatingClusterIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DelegatingClusterTest.java b/driver-core/src/test/java/com/datastax/driver/core/DelegatingClusterTest.java index 327016df859..1a4481d32ed 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DelegatingClusterTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DelegatingClusterTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DirectCompressionTest.java b/driver-core/src/test/java/com/datastax/driver/core/DirectCompressionTest.java index c447de6b24d..d4aa82af679 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DirectCompressionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DirectCompressionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DirectedGraphTest.java b/driver-core/src/test/java/com/datastax/driver/core/DirectedGraphTest.java index b1384717c22..65d713ccd55 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DirectedGraphTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DirectedGraphTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DseCCMClusterTest.java b/driver-core/src/test/java/com/datastax/driver/core/DseCCMClusterTest.java index 9cbfaf91d3e..7c0e6b423d1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DseCCMClusterTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DseCCMClusterTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DurationCodecTest.java b/driver-core/src/test/java/com/datastax/driver/core/DurationCodecTest.java index dd86f4dcb24..e57d9e83aea 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DurationCodecTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DurationCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DurationIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/DurationIntegrationTest.java index dcbffb85095..3c8a01ba20b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DurationIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DurationIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/DurationTest.java b/driver-core/src/test/java/com/datastax/driver/core/DurationTest.java index bcaf683e224..558fe8b5f24 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DurationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DurationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/EventDebouncerIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/EventDebouncerIntegrationTest.java index 54217109c64..327ae7d1b51 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/EventDebouncerIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/EventDebouncerIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/EventDebouncerTest.java b/driver-core/src/test/java/com/datastax/driver/core/EventDebouncerTest.java index de54414640a..b6cd5cd07fe 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/EventDebouncerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/EventDebouncerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ExtendedPeerCheckDisabledTest.java b/driver-core/src/test/java/com/datastax/driver/core/ExtendedPeerCheckDisabledTest.java index ee5fc1642e8..bac2ada7564 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ExtendedPeerCheckDisabledTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ExtendedPeerCheckDisabledTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/FakeHost.java b/driver-core/src/test/java/com/datastax/driver/core/FakeHost.java index 76a162c35d5..1629edd5d22 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/FakeHost.java +++ b/driver-core/src/test/java/com/datastax/driver/core/FakeHost.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/FetchingTest.java b/driver-core/src/test/java/com/datastax/driver/core/FetchingTest.java index 98dc5fc020f..2a9e59738a8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/FetchingTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/FetchingTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/FrameLengthTest.java b/driver-core/src/test/java/com/datastax/driver/core/FrameLengthTest.java index 598a18e638a..4405ce1a6f8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/FrameLengthTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/FrameLengthTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataAssert.java b/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataAssert.java index 8fc6a1ea282..eec319000ed 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataTest.java index 7bc4433f394..83aee5a348c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/GettableDataIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/GettableDataIntegrationTest.java index 520e0aca336..21018c4baf0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/GettableDataIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/GettableDataIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/HeapCompressionTest.java b/driver-core/src/test/java/com/datastax/driver/core/HeapCompressionTest.java index a18bb889560..bf80cad0e14 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HeapCompressionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HeapCompressionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/HeartbeatTest.java b/driver-core/src/test/java/com/datastax/driver/core/HeartbeatTest.java index b8d55db661c..2ccb8009c58 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HeartbeatTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HeartbeatTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java b/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java index 1308f7cde2d..4f9573269ab 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolMultiTest.java b/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolMultiTest.java index 9e0e295bd45..90d91bc1446 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolMultiTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolMultiTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolTest.java b/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolTest.java index 33d85670827..63b2119e7b8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostConnectionPoolTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java index b0ca978f648..12f7649a991 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataAssert.java b/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataAssert.java index 18241cb1471..8607b4f2d13 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataTest.java index 4c5ff1fa873..3a1fa999cfb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/IndexMetadataTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/Jdk8SSLEncryptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/Jdk8SSLEncryptionTest.java index 6c8fdf39fc9..49df45e6c35 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/Jdk8SSLEncryptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/Jdk8SSLEncryptionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/KeyspaceMetadataAssert.java b/driver-core/src/test/java/com/datastax/driver/core/KeyspaceMetadataAssert.java index f3be9cba70d..77d014a8940 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/KeyspaceMetadataAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/KeyspaceMetadataAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/LargeDataTest.java b/driver-core/src/test/java/com/datastax/driver/core/LargeDataTest.java index 573a90c7475..94182794d6a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/LargeDataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/LargeDataTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java index ca649db9f93..bd4bf29ab2e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyRefreshTest.java b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyRefreshTest.java index 60fd78ef240..f8878d5e734 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyRefreshTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyRefreshTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/LocalDateAssert.java b/driver-core/src/test/java/com/datastax/driver/core/LocalDateAssert.java index 8b6f2b4f3e0..fb034b43efa 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/LocalDateAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/LocalDateAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/LocalDateTest.java b/driver-core/src/test/java/com/datastax/driver/core/LocalDateTest.java index 7cdf2d0040d..78a43e9cdb6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/LocalDateTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/LocalDateTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/M3PTokenFactoryTest.java b/driver-core/src/test/java/com/datastax/driver/core/M3PTokenFactoryTest.java index e838e986bd9..4e26fd74ac8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/M3PTokenFactoryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/M3PTokenFactoryTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/M3PTokenIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/M3PTokenIntegrationTest.java index efa5837fce2..4bed18eef75 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/M3PTokenIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/M3PTokenIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/M3PTokenVnodeIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/M3PTokenVnodeIntegrationTest.java index 9064431fcbf..82734bb92e0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/M3PTokenVnodeIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/M3PTokenVnodeIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/MappingCodec.java b/driver-core/src/test/java/com/datastax/driver/core/MappingCodec.java index 58e1352d531..6271dc78ee3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MappingCodec.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MappingCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/MaterializedViewMetadataAssert.java b/driver-core/src/test/java/com/datastax/driver/core/MaterializedViewMetadataAssert.java index 336668b06a1..d1356afaf14 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MaterializedViewMetadataAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MaterializedViewMetadataAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/MaterializedViewMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/MaterializedViewMetadataTest.java index 51cb1c0b97b..51eb73e00ec 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MaterializedViewMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MaterializedViewMetadataTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/MemoryAppender.java b/driver-core/src/test/java/com/datastax/driver/core/MemoryAppender.java index 1ccc34671f3..1e68e235136 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MemoryAppender.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MemoryAppender.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java index d7114cd4299..d101791c543 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/MetricsTest.java b/driver-core/src/test/java/com/datastax/driver/core/MetricsTest.java index c86acd49c21..0fce918f6c1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MetricsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MetricsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/MissingRpcAddressTest.java b/driver-core/src/test/java/com/datastax/driver/core/MissingRpcAddressTest.java index d4810a07e11..56253d9080b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MissingRpcAddressTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MissingRpcAddressTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/MockClocks.java b/driver-core/src/test/java/com/datastax/driver/core/MockClocks.java index ef6dc30a424..9d988e5f5f4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MockClocks.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MockClocks.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/NettyOptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/NettyOptionsTest.java index 8d9a94a29e5..520cf79f8f0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/NettyOptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/NettyOptionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/NetworkTopologyStrategyTest.java b/driver-core/src/test/java/com/datastax/driver/core/NetworkTopologyStrategyTest.java index efe6290db00..483c3a4d370 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/NetworkTopologyStrategyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/NetworkTopologyStrategyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/NodeListRefreshDebouncerTest.java b/driver-core/src/test/java/com/datastax/driver/core/NodeListRefreshDebouncerTest.java index 6779f450eca..12dbaca03f8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/NodeListRefreshDebouncerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/NodeListRefreshDebouncerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/NodeRefreshDebouncerTest.java b/driver-core/src/test/java/com/datastax/driver/core/NodeRefreshDebouncerTest.java index ae8e982fa38..3ac7c0ec8f9 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/NodeRefreshDebouncerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/NodeRefreshDebouncerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/OPPTokenFactoryTest.java b/driver-core/src/test/java/com/datastax/driver/core/OPPTokenFactoryTest.java index c74c484aced..33a325ade46 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/OPPTokenFactoryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/OPPTokenFactoryTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/OPPTokenIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/OPPTokenIntegrationTest.java index 91f3e8b51ff..cd89a27b909 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/OPPTokenIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/OPPTokenIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/OPPTokenVnodeIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/OPPTokenVnodeIntegrationTest.java index 0fae9a72718..5875bcbb8a4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/OPPTokenVnodeIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/OPPTokenVnodeIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/PagingStateTest.java b/driver-core/src/test/java/com/datastax/driver/core/PagingStateTest.java index c5bd16c77ac..27873fa1e2b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PagingStateTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PagingStateTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ParseUtilsTest.java b/driver-core/src/test/java/com/datastax/driver/core/ParseUtilsTest.java index 1071b07072e..6393f6ae3e9 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ParseUtilsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ParseUtilsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/PerHostPercentileTrackerTest.java b/driver-core/src/test/java/com/datastax/driver/core/PerHostPercentileTrackerTest.java index 95721256e55..e4febf6906a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PerHostPercentileTrackerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PerHostPercentileTrackerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/PercentileTrackerTest.java b/driver-core/src/test/java/com/datastax/driver/core/PercentileTrackerTest.java index 513639831b9..aa69faeeb7d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PercentileTrackerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PercentileTrackerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsIntegrationTest.java index 2ff257b8f14..d8092eeab43 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsTest.java index 98896689b26..eda425ff6f1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PoolingOptionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/PreparedIdTest.java b/driver-core/src/test/java/com/datastax/driver/core/PreparedIdTest.java index b6d0ea0c5f0..cfe007975d1 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PreparedIdTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PreparedIdTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementTest.java b/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementTest.java index a2dc022e5a8..329322f486c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java b/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java index 7624b560cb8..efb3351f586 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java +++ b/driver-core/src/test/java/com/datastax/driver/core/PrimitiveTypeSamples.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ProtocolBetaVersionTest.java b/driver-core/src/test/java/com/datastax/driver/core/ProtocolBetaVersionTest.java index ebb5ac5e2a0..a5da6d0b787 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ProtocolBetaVersionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ProtocolBetaVersionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ProtocolOptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/ProtocolOptionsTest.java index 78d27a3a0dd..2ef4c36e198 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ProtocolOptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ProtocolOptionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ProtocolV1Test.java b/driver-core/src/test/java/com/datastax/driver/core/ProtocolV1Test.java index 45ec9d131cc..07c2c2f2c1a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ProtocolV1Test.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ProtocolV1Test.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java b/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java index a1ffbacd821..38fe4d46c72 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ProtocolVersionRenegotiationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerErrorsTest.java b/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerErrorsTest.java index 5a04c16c10f..af549880a7e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerErrorsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerErrorsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerTest.java b/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerTest.java index 1d696c31e7a..c611af55a37 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/QueryLoggerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/QueryOptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/QueryOptionsTest.java index 776e0080a87..fe9bc882f47 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/QueryOptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/QueryOptionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/QueryTimestampTest.java b/driver-core/src/test/java/com/datastax/driver/core/QueryTimestampTest.java index 537284a1fb7..4f33b4dbe9e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/QueryTimestampTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/QueryTimestampTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/QueryTracker.java b/driver-core/src/test/java/com/datastax/driver/core/QueryTracker.java index 47cfcc3d8f5..a021cc7418c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/QueryTracker.java +++ b/driver-core/src/test/java/com/datastax/driver/core/QueryTracker.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/RPTokenFactoryTest.java b/driver-core/src/test/java/com/datastax/driver/core/RPTokenFactoryTest.java index 6c017a1cc69..42c3b78f00e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/RPTokenFactoryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/RPTokenFactoryTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/RPTokenIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/RPTokenIntegrationTest.java index 9c4ef4f3311..9fe94182a32 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/RPTokenIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/RPTokenIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/RPTokenVnodeIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/RPTokenVnodeIntegrationTest.java index a336fa1d348..47bf02ab509 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/RPTokenVnodeIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/RPTokenVnodeIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ReadTimeoutTest.java b/driver-core/src/test/java/com/datastax/driver/core/ReadTimeoutTest.java index 71777bce7e1..3a6247be515 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ReadTimeoutTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ReadTimeoutTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java b/driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java index cc52c764186..bc79426fd59 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/RecommissionedNodeTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ReconnectionPolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/ReconnectionPolicyTest.java index ab2dc369026..5e8f8b73e78 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ReconnectionPolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ReconnectionPolicyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ReconnectionTest.java b/driver-core/src/test/java/com/datastax/driver/core/ReconnectionTest.java index 6fed4ab4bc4..c455852a0eb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ReconnectionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ReconnectionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/RefreshConnectedHostTest.java b/driver-core/src/test/java/com/datastax/driver/core/RefreshConnectedHostTest.java index feb8c534bce..87fabe9b2b0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/RefreshConnectedHostTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/RefreshConnectedHostTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ReplicationStrategyTest.java b/driver-core/src/test/java/com/datastax/driver/core/ReplicationStrategyTest.java index e09ba42006f..6f11ebc46f3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ReplicationStrategyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ReplicationStrategyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java b/driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java index 1b903e8d3b0..6c9fb974e0b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/RequestHandlerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ResultSetAssert.java b/driver-core/src/test/java/com/datastax/driver/core/ResultSetAssert.java index 487309e66a8..b8863949206 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ResultSetAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ResultSetAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ReusedStreamIdTest.java b/driver-core/src/test/java/com/datastax/driver/core/ReusedStreamIdTest.java index 5aa63bf2553..8ed42d433ab 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ReusedStreamIdTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ReusedStreamIdTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SSLAuthenticatedEncryptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/SSLAuthenticatedEncryptionTest.java index 1371ecd416c..f96275a36ea 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SSLAuthenticatedEncryptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SSLAuthenticatedEncryptionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java index 36707fe7410..3e9c5d8c48e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SSLEncryptionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java b/driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java index 9c342dc7486..e470d5a7efa 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SSLTestBase.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java b/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java index 07478094a39..348eb8e7579 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java b/driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java index aa64c89fbec..50336327e90 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SchemaAgreementTest.java b/driver-core/src/test/java/com/datastax/driver/core/SchemaAgreementTest.java index c125e92b472..35b4eb2c559 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SchemaAgreementTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SchemaAgreementTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SchemaChangesCCTest.java b/driver-core/src/test/java/com/datastax/driver/core/SchemaChangesCCTest.java index f68186e0907..995c5b1bbd7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SchemaChangesCCTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SchemaChangesCCTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SchemaChangesTest.java b/driver-core/src/test/java/com/datastax/driver/core/SchemaChangesTest.java index 877ee9a59fb..23f06c8084e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SchemaChangesTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SchemaChangesTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SchemaRefreshDebouncerTest.java b/driver-core/src/test/java/com/datastax/driver/core/SchemaRefreshDebouncerTest.java index a5e82b276f4..80996624791 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SchemaRefreshDebouncerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SchemaRefreshDebouncerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SessionAssert.java b/driver-core/src/test/java/com/datastax/driver/core/SessionAssert.java index f59a83c9d36..83c44b42a55 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SessionAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SessionAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SessionLeakTest.java b/driver-core/src/test/java/com/datastax/driver/core/SessionLeakTest.java index 6d37222eb10..956ef8cf9b9 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SessionLeakTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SessionLeakTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SessionStressTest.java b/driver-core/src/test/java/com/datastax/driver/core/SessionStressTest.java index 1bb574dde10..a2827d37da0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SessionStressTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SessionStressTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SessionTest.java b/driver-core/src/test/java/com/datastax/driver/core/SessionTest.java index 9e14090e73f..89bc0197419 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SessionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SessionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SimpleJSONParserTest.java b/driver-core/src/test/java/com/datastax/driver/core/SimpleJSONParserTest.java index 0e7b5978edd..18e15390a73 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SimpleJSONParserTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SimpleJSONParserTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementIntegrationTest.java index 9f2e2f0a910..fd86faceebd 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementTest.java b/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementTest.java index 89271030a60..1030586bcf3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SimpleStatementTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SimpleStrategyTest.java b/driver-core/src/test/java/com/datastax/driver/core/SimpleStrategyTest.java index e50c7bf2cf2..df24ce8e447 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SimpleStrategyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SimpleStrategyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SingleConnectionPoolTest.java b/driver-core/src/test/java/com/datastax/driver/core/SingleConnectionPoolTest.java index 6e721c411ca..31d80abd662 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SingleConnectionPoolTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SingleConnectionPoolTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SingleTokenIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/SingleTokenIntegrationTest.java index 5229ba1f57e..f11e7798545 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SingleTokenIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SingleTokenIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SortingLoadBalancingPolicy.java b/driver-core/src/test/java/com/datastax/driver/core/SortingLoadBalancingPolicy.java index 92f2f2d1354..a0c45941ddb 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SortingLoadBalancingPolicy.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SortingLoadBalancingPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java index 3def90dcb54..c592f3bedc6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/StateListenerBase.java b/driver-core/src/test/java/com/datastax/driver/core/StateListenerBase.java index 6eac8c0f55f..c908d195026 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/StateListenerBase.java +++ b/driver-core/src/test/java/com/datastax/driver/core/StateListenerBase.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/StateListenerTest.java b/driver-core/src/test/java/com/datastax/driver/core/StateListenerTest.java index f8ae0226a05..462b8b61b30 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/StateListenerTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/StateListenerTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/StatementIdempotenceTest.java b/driver-core/src/test/java/com/datastax/driver/core/StatementIdempotenceTest.java index 90da1690abb..bea976cc049 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/StatementIdempotenceTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/StatementIdempotenceTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/StatementWrapperTest.java b/driver-core/src/test/java/com/datastax/driver/core/StatementWrapperTest.java index 27d1282981a..2abe0da0e9a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/StatementWrapperTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/StatementWrapperTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/StreamIdGeneratorTest.java b/driver-core/src/test/java/com/datastax/driver/core/StreamIdGeneratorTest.java index af9a04f4f27..e89ca757157 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/StreamIdGeneratorTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/StreamIdGeneratorTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataAssert.java b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataAssert.java index cd248d6fa7a..f7e7ff3d44c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataCDCTest.java b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataCDCTest.java index 6c1bc3cfe6a..76faa1394d7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataCDCTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataCDCTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataTest.java index d7c96f39ac3..6565c97a647 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TestListener.java b/driver-core/src/test/java/com/datastax/driver/core/TestListener.java index 60d3a12960c..fc379ff13b8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TestListener.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TestListener.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java index 1f86d95cb87..52d605844ba 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGeneratorTest.java b/driver-core/src/test/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGeneratorTest.java index 14b3b7cf6fe..4bb081e86c7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGeneratorTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ThreadLocalMonotonicTimestampGeneratorTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/ThreadingOptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/ThreadingOptionsTest.java index 73e84fd9cbf..637bc50ef98 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ThreadingOptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ThreadingOptionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TimeoutStressTest.java b/driver-core/src/test/java/com/datastax/driver/core/TimeoutStressTest.java index 3be087d7f05..05990129cf0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TimeoutStressTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TimeoutStressTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TokenIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TokenIntegrationTest.java index 899c225e177..701d06ef849 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TokenIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TokenIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TokenRangeAssert.java b/driver-core/src/test/java/com/datastax/driver/core/TokenRangeAssert.java index b41e4628687..eff51316542 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TokenRangeAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TokenRangeAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TokenRangeTest.java b/driver-core/src/test/java/com/datastax/driver/core/TokenRangeTest.java index d0185b4b31f..5f7e6b9b2b9 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TokenRangeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TokenRangeTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TracingTest.java b/driver-core/src/test/java/com/datastax/driver/core/TracingTest.java index e9b0e92f295..bd9531b7506 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TracingTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TracingTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java b/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java index 9bdffcce239..595716a28c4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TupleTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecAssert.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecAssert.java index 2afd1bf3669..c0a4305df21 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecCollectionsIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecCollectionsIntegrationTest.java index 2460578c905..094e052e134 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecCollectionsIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecCollectionsIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecEncapsulationIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecEncapsulationIntegrationTest.java index de3fd0578d4..c1dba310ff6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecEncapsulationIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecEncapsulationIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedCollectionsIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedCollectionsIntegrationTest.java index 07306c47d3b..fa2a9b05069 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedCollectionsIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedCollectionsIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedUDTAndTupleIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedUDTAndTupleIntegrationTest.java index 35930c51548..b9ed227e58e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedUDTAndTupleIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNestedUDTAndTupleIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNumbersIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNumbersIntegrationTest.java index 1d033805ecc..5f2851bd593 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNumbersIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecNumbersIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecOverlappingJavaTypeIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecOverlappingJavaTypeIntegrationTest.java index 7798f9b95f9..3e3a623f23f 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecOverlappingJavaTypeIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecOverlappingJavaTypeIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTest.java index 1a499b20fa1..7fc81fa4470 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTupleIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTupleIntegrationTest.java index c15074aa536..1d3aff4b16d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTupleIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecTupleIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecUDTIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecUDTIntegrationTest.java index 2d7f0aeab99..ce36e5c823b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TypeCodecUDTIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TypeCodecUDTIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/UnresolvedUserTypeTest.java b/driver-core/src/test/java/com/datastax/driver/core/UnresolvedUserTypeTest.java index 928b1ec3cfe..d721d61c9fd 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/UnresolvedUserTypeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/UnresolvedUserTypeTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java index 780e2bd9036..6751fe1150f 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/UserTypesTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/VersionNumberAssert.java b/driver-core/src/test/java/com/datastax/driver/core/VersionNumberAssert.java index e1614e7913b..9bfa3e7178d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/VersionNumberAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/VersionNumberAssert.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/VersionNumberTest.java b/driver-core/src/test/java/com/datastax/driver/core/VersionNumberTest.java index adea8166912..df1601b48b6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/VersionNumberTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/VersionNumberTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/WarningsTest.java b/driver-core/src/test/java/com/datastax/driver/core/WarningsTest.java index addd79e5a5b..190b728a8c2 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/WarningsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/WarningsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core; diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ConnectionExceptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ConnectionExceptionTest.java index d14b52fdb19..eb322a11ecf 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ConnectionExceptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ConnectionExceptionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java index fc905c43c0b..daa3347f234 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsTest.java index dfe2150edcd..d5b18085e5a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/FunctionExecutionExceptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/FunctionExecutionExceptionTest.java index a7c234aa382..a69a3f141c4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/FunctionExecutionExceptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/FunctionExecutionExceptionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/NoHostAvailableExceptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/NoHostAvailableExceptionTest.java index 79a2ff7adb2..3dc74c415ec 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/NoHostAvailableExceptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/NoHostAvailableExceptionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java index ed2a49770bb..4d92f1311c5 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ReadWriteFailureExceptionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.exceptions; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java index 606d3ca5f21..0c505d329dd 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/AbstractRetryPolicyIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/CloseableLoadBalancingPolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/CloseableLoadBalancingPolicyTest.java index a5ac2c13f0a..3b64a234d92 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/CloseableLoadBalancingPolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/CloseableLoadBalancingPolicyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/CustomRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/CustomRetryPolicyIntegrationTest.java index 6df66f13250..de2411276d9 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/CustomRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/CustomRetryPolicyIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicyTest.java index 12bc23ab59c..20ed08c23b2 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/DCAwareRoundRobinPolicyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/DefaultRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/DefaultRetryPolicyIntegrationTest.java index 77df6b68984..11084ae9339 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/DefaultRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/DefaultRetryPolicyIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/DelegatingLoadBalancingPolicy.java b/driver-core/src/test/java/com/datastax/driver/core/policies/DelegatingLoadBalancingPolicy.java index bb30f2992c4..58037669daa 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/DelegatingLoadBalancingPolicy.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/DelegatingLoadBalancingPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/DelegatingSpeculativeExecutionPolicy.java b/driver-core/src/test/java/com/datastax/driver/core/policies/DelegatingSpeculativeExecutionPolicy.java index 6ae9b8f72bd..e60c24ec604 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/DelegatingSpeculativeExecutionPolicy.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/DelegatingSpeculativeExecutionPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicyIntegrationTest.java index b1198664ca3..891c1b9d23e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicyIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslatorTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslatorTest.java index 95a7153df60..014341620c6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslatorTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslatorTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/ErrorAwarePolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/ErrorAwarePolicyIntegrationTest.java index 729b8d837d7..9e01658e125 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/ErrorAwarePolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/ErrorAwarePolicyIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/FallthroughRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/FallthroughRetryPolicyIntegrationTest.java index ae1eda50a74..45eb5be6ca4 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/FallthroughRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/FallthroughRetryPolicyIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/HostFilterPolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/HostFilterPolicyTest.java index f5a38fbf5c6..1107760f358 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/HostFilterPolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/HostFilterPolicyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java index b1d4409a41d..d473b022fca 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/IdempotenceAwareRetryPolicyIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/LatencyAwarePolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/LatencyAwarePolicyTest.java index ce2ddd5dd00..86042027aae 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/LatencyAwarePolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/LatencyAwarePolicyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java b/driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java index 8b869cdd784..ab14972d061 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/LimitingLoadBalancingPolicy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/LoggingRetryPolicyIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/LoggingRetryPolicyIntegrationTest.java index eb02662f4ad..147f278a05e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/LoggingRetryPolicyIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/LoggingRetryPolicyIntegrationTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/RetryDecisionTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/RetryDecisionTest.java index 6b653f8c623..00e192b146a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/RetryDecisionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/RetryDecisionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/RollingCountTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/RollingCountTest.java index fe80b41f1eb..5db8a8011be 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/RollingCountTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/RollingCountTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/RoundRobinPolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/RoundRobinPolicyTest.java index da8e2a159f6..073b313ab75 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/RoundRobinPolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/RoundRobinPolicyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/TokenAwarePolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/TokenAwarePolicyTest.java index 948067c149b..5a5810caf6d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/TokenAwarePolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/TokenAwarePolicyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/WhiteListPolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/WhiteListPolicyTest.java index 366b5152af8..537dd8bf010 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/WhiteListPolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/WhiteListPolicyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.policies; diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/BatchIdempotencyTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/BatchIdempotencyTest.java index 141a6ec9c31..76b4ff99b36 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/BatchIdempotencyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/BatchIdempotencyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilder21ExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilder21ExecutionTest.java index 832d6f7f1a2..dd73519d5a7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilder21ExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilder21ExecutionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java index 0519c047756..9977e80ee0c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderExecutionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderITest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderITest.java index 5327d9e2cd3..c2fd60405ef 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderITest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderITest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderRoutingKeyTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderRoutingKeyTest.java index e1fe83728df..03bba01621a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderRoutingKeyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderRoutingKeyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java index 1c8b6810e1b..ea857f106ac 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTupleExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTupleExecutionTest.java index 3a63f8be482..6db041c18a0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTupleExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTupleExecutionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderUDTExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderUDTExecutionTest.java index b648ccb817e..85a91f4df10 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderUDTExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderUDTExecutionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.querybuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/AlterKeyspaceTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/AlterKeyspaceTest.java index 26b88283dad..534bd281610 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/AlterKeyspaceTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/AlterKeyspaceTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/AlterTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/AlterTest.java index 263222bc6f1..3deb2ef57f7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/AlterTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/AlterTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompactionOptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompactionOptionsTest.java index 9ac13735533..b5f01a92d05 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompactionOptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompactionOptionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompressionOptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompressionOptionsTest.java index aedf32edbb9..9302adf9765 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompressionOptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompressionOptionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateIndexTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateIndexTest.java index babb8035305..1088b82d6ad 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateIndexTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateIndexTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateKeyspaceTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateKeyspaceTest.java index 4cf9208ea33..71983d504c8 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateKeyspaceTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateKeyspaceTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateTest.java index 2481a2dad05..d2f5f29f31b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateTypeTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateTypeTest.java index ebc0abff85b..fe4cd402a96 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateTypeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CreateTypeTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/DropKeyspaceTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/DropKeyspaceTest.java index 706822ead1b..b8329c06799 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/DropKeyspaceTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/DropKeyspaceTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/DropTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/DropTest.java index dd60190d99f..708a50b5dba 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/DropTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/DropTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/SchemaBuilderIT.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/SchemaBuilderIT.java index f2622163b03..14ce5073d73 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/SchemaBuilderIT.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/SchemaBuilderIT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.schemabuilder; diff --git a/driver-core/src/test/java/com/datastax/driver/core/utils/CassandraVersion.java b/driver-core/src/test/java/com/datastax/driver/core/utils/CassandraVersion.java index 0ff379c3b75..b1a50b82628 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/utils/CassandraVersion.java +++ b/driver-core/src/test/java/com/datastax/driver/core/utils/CassandraVersion.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/test/java/com/datastax/driver/core/utils/DseVersion.java b/driver-core/src/test/java/com/datastax/driver/core/utils/DseVersion.java index f03ddbb9833..bd1955e2b72 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/utils/DseVersion.java +++ b/driver-core/src/test/java/com/datastax/driver/core/utils/DseVersion.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/test/java/com/datastax/driver/core/utils/SocketChannelMonitor.java b/driver-core/src/test/java/com/datastax/driver/core/utils/SocketChannelMonitor.java index 93635d79b00..bc2d902cc46 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/utils/SocketChannelMonitor.java +++ b/driver-core/src/test/java/com/datastax/driver/core/utils/SocketChannelMonitor.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDFromPropertyTest.java b/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDFromPropertyTest.java index c24ee805cfb..22e919a627b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDFromPropertyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDFromPropertyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDNativeTest.java b/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDNativeTest.java index 013fa8eb572..6ce6b4c13be 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDNativeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDNativeTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDPropertyInvalidTest.java b/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDPropertyInvalidTest.java index 1007d0c14b0..7e81244d6e3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDPropertyInvalidTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsPIDPropertyInvalidTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsTest.java b/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsTest.java index 89b9a741847..432f06764fc 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/utils/UUIDsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.core.utils; diff --git a/driver-core/src/test/resources/log4j.properties b/driver-core/src/test/resources/log4j.properties index 8f9c901dcdb..7e4217014c7 100644 --- a/driver-core/src/test/resources/log4j.properties +++ b/driver-core/src/test/resources/log4j.properties @@ -1,17 +1,17 @@ # -# Copyright (C) 2012-2015 DataStax Inc. +# Copyright (C) 2012-2017 DataStax Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # Set root logger level to DEBUG and its only appender to A1. diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 682cb70f116..91a53d79a51 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -1,18 +1,18 @@ diff --git a/driver-dist/src/assembly/binary-tarball.xml b/driver-dist/src/assembly/binary-tarball.xml index 69ce0b3d35a..77c5f1d21fa 100644 --- a/driver-dist/src/assembly/binary-tarball.xml +++ b/driver-dist/src/assembly/binary-tarball.xml @@ -1,18 +1,18 @@ diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/basic/CreateAndPopulateKeyspace.java b/driver-examples/src/main/java/com/datastax/driver/examples/basic/CreateAndPopulateKeyspace.java index 61b11457a27..6a203f848a2 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/basic/CreateAndPopulateKeyspace.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/basic/CreateAndPopulateKeyspace.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.basic; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/basic/ReadCassandraVersion.java b/driver-examples/src/main/java/com/datastax/driver/examples/basic/ReadCassandraVersion.java index 69bac907119..3863058c54d 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/basic/ReadCassandraVersion.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/basic/ReadCassandraVersion.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.basic; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/basic/ReadTopologyAndSchemaMetadata.java b/driver-examples/src/main/java/com/datastax/driver/examples/basic/ReadTopologyAndSchemaMetadata.java index feebe7aa990..e08de798210 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/basic/ReadTopologyAndSchemaMetadata.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/basic/ReadTopologyAndSchemaMetadata.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.basic; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java b/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java index 388f7cad8a2..74e46c9ef8f 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.datatypes; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonColumn.java b/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonColumn.java index b8058c71c87..0d7212869ee 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonColumn.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonColumn.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.json; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonFunction.java b/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonFunction.java index f698990250c..5df584efb3e 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonFunction.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonFunction.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.json; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonRow.java b/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonRow.java index e656b260a7e..2bec1489efb 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonRow.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/json/JacksonJsonRow.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.json; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonColumn.java b/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonColumn.java index d44a875356b..de7c96a5f94 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonColumn.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonColumn.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.json; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonFunction.java b/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonFunction.java index 17dc9b287ae..78939090178 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonFunction.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonFunction.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.json; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonRow.java b/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonRow.java index b9dfd864735..2a7f8684c73 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonRow.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/json/Jsr353JsonRow.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.json; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/json/PlainTextJson.java b/driver-examples/src/main/java/com/datastax/driver/examples/json/PlainTextJson.java index cf2f9a0cb6a..baedca8e09a 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/json/PlainTextJson.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/json/PlainTextJson.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.json; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/paging/ForwardPagingRestUi.java b/driver-examples/src/main/java/com/datastax/driver/examples/paging/ForwardPagingRestUi.java index cfba625d3a7..bcfcebf8b55 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/paging/ForwardPagingRestUi.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/paging/ForwardPagingRestUi.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.paging; diff --git a/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java b/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java index b2553e70014..3944aca5c9f 100644 --- a/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java +++ b/driver-examples/src/main/java/com/datastax/driver/examples/paging/RandomPagingRestUi.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.examples.paging; diff --git a/driver-examples/src/main/resources/logback.xml b/driver-examples/src/main/resources/logback.xml index 3fb2dcf5269..25dd17c8687 100644 --- a/driver-examples/src/main/resources/logback.xml +++ b/driver-examples/src/main/resources/logback.xml @@ -1,18 +1,18 @@ diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 7c506c94882..e55e572d4e1 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -1,18 +1,18 @@ diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/MappingCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/MappingCodec.java index 340f2d5f321..83e938dd1a3 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/MappingCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/MappingCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/ParsingCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/ParsingCodec.java index d260c5bfeae..d716a6fc2a4 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/ParsingCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/ParsingCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/AbstractArrayCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/AbstractArrayCodec.java index 00edca53700..087ec67b3a8 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/AbstractArrayCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/AbstractArrayCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.arrays; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/AbstractPrimitiveArrayCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/AbstractPrimitiveArrayCodec.java index f7e769f8aaa..cecb33180d3 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/AbstractPrimitiveArrayCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/AbstractPrimitiveArrayCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.arrays; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/DoubleArrayCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/DoubleArrayCodec.java index 2ea2090ff5f..cf3d540b5c7 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/DoubleArrayCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/DoubleArrayCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.arrays; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/FloatArrayCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/FloatArrayCodec.java index 7d4e939be14..0925902e346 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/FloatArrayCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/FloatArrayCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.arrays; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/IntArrayCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/IntArrayCodec.java index c3e61d52f6c..bdebabee605 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/IntArrayCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/IntArrayCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.arrays; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/LongArrayCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/LongArrayCodec.java index f8b12d0fe71..4a344d0f38e 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/LongArrayCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/LongArrayCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.arrays; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/ObjectArrayCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/ObjectArrayCodec.java index baaea3d540f..3ca7151f873 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/ObjectArrayCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/ObjectArrayCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.arrays; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/package-info.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/package-info.java index cd32814dd24..556a9d0d3f8 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/package-info.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/arrays/package-info.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - /** * This package contains a collection of convenience * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/SimpleDateCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/SimpleDateCodec.java index 0c96700e1eb..57d32071eb8 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/SimpleDateCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/SimpleDateCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.date; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/SimpleTimestampCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/SimpleTimestampCodec.java index c3c794e2a5c..fa074f32a1c 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/SimpleTimestampCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/SimpleTimestampCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.date; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/package-info.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/package-info.java index 04577b9bc46..72f88752b67 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/package-info.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/date/package-info.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - /** * This package contains a collection of convenience * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/EnumNameCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/EnumNameCodec.java index b43df2a31db..f6a2c7b14c8 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/EnumNameCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/EnumNameCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.enums; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/EnumOrdinalCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/EnumOrdinalCodec.java index 92e649456b0..fbe29235d2e 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/EnumOrdinalCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/EnumOrdinalCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.enums; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/package-info.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/package-info.java index fb0d90c7387..22771b6d902 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/package-info.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/enums/package-info.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - /** * This package contains a collection of convenience * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/OptionalCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/OptionalCodec.java index ae083179811..1aa73ef5cc4 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/OptionalCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/OptionalCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.guava; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/package-info.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/package-info.java index 2e0ad0f8d7b..f3639d1bc11 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/package-info.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/guava/package-info.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - /** * This package contains a collection of convenience * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/IgnoreJDK6Requirement.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/IgnoreJDK6Requirement.java index c7318ce59be..b64f3fc98f1 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/IgnoreJDK6Requirement.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/IgnoreJDK6Requirement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/InstantCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/InstantCodec.java index 23cc642d710..2673c17c325 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/InstantCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/InstantCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.java index fab4c5a8a9e..99d38a23848 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.java index 9b6c8c53774..eb5bd92188b 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.java index a09ec3c6863..3d70848f7ee 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.java index 7149cb0ac45..525f4f05548 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/package-info.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/package-info.java index 894b475fba7..73b686b8508 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/package-info.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/jdk8/package-info.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - /** * This package contains a collection of convenience * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/DateTimeCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/DateTimeCodec.java index 1fcf68d1c63..c6c48eb95fb 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/DateTimeCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/DateTimeCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/InstantCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/InstantCodec.java index 9afac244285..8c81d4b7d1b 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/InstantCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/InstantCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalDateCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalDateCodec.java index befd7534e37..5ad74a45424 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalDateCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalDateCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.java index d97da7b682f..2fd45c8cbc4 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/package-info.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/package-info.java index f23ff999054..df951374521 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/package-info.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/joda/package-info.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - /** * This package contains a collection of convenience * {@link com.datastax.driver.core.TypeCodec TypeCodec} instances useful for diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.java index 907eed678c6..6584aa5081f 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.json; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.java index 324aa86d527..4ce87e10fc0 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.json; diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/package-info.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/package-info.java index 0ae86d6daf9..cf6352e24d5 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/package-info.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/json/package-info.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - /** * This package contains a collection of convenience * {@link com.datastax.driver.core.TypeCodec} instances useful for diff --git a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/package-info.java b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/package-info.java index 3b77d8d82ae..098086251fa 100644 --- a/driver-extras/src/main/java/com/datastax/driver/extras/codecs/package-info.java +++ b/driver-extras/src/main/java/com/datastax/driver/extras/codecs/package-info.java @@ -1,19 +1,18 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ - /** * This package and its subpackages contain several convenience {@link com.datastax.driver.core.TypeCodec TypeCodec}s. *

    diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/arrays/ArrayCodecsTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/arrays/ArrayCodecsTest.java index fc7804b88a6..79661ab02a7 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/arrays/ArrayCodecsTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/arrays/ArrayCodecsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.arrays; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleDateCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleDateCodecTest.java index 23f54cedad4..e7ff2c31c94 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleDateCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleDateCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.date; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleDateCodecsTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleDateCodecsTest.java index d5b64699e4e..65080fc85f7 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleDateCodecsTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleDateCodecsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.date; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleTimestampCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleTimestampCodecTest.java index 026f6b360ba..8a655df0f48 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleTimestampCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/date/SimpleTimestampCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.date; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/enums/EnumCodecsTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/enums/EnumCodecsTest.java index d88217265d7..0649efa75d6 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/enums/EnumCodecsTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/enums/EnumCodecsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.enums; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/guava/OptionalCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/guava/OptionalCodecTest.java index c85f6241a52..871ea8a7a8d 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/guava/OptionalCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/guava/OptionalCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.guava; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/InstantCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/InstantCodecTest.java index 14724f985c4..ce38457c28a 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/InstantCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/InstantCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/Jdk8TimeCodecsTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/Jdk8TimeCodecsTest.java index 3b9b277a698..cfd9db72b38 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/Jdk8TimeCodecsTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/Jdk8TimeCodecsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodecTest.java index 6295197d80d..bf0804a5171 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/LocalDateCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodecTest.java index b0b3deaf0dd..6f705f22a6a 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodecTest.java index 6a86d860a81..4f90a4ec848 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/OptionalCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodecTest.java index 7677fe493ed..997020418d9 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.jdk8; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/DateTimeCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/DateTimeCodecTest.java index 6e678303378..c1c1a6bb807 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/DateTimeCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/DateTimeCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/InstantCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/InstantCodecTest.java index 3ffc5647a90..fc1be3d59e4 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/InstantCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/InstantCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/JodaTimeCodecsTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/JodaTimeCodecsTest.java index 83dc02d395a..abc0e4e1ed9 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/JodaTimeCodecsTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/JodaTimeCodecsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/LocalDateCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/LocalDateCodecTest.java index 3c52ce42456..d76b50b6f33 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/LocalDateCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/LocalDateCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodecTest.java index 623446a65a8..973e82134ac 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/joda/LocalTimeCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.joda; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodecTest.java index cb172cb75c9..15cc3768405 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/JacksonJsonCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.json; diff --git a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodecTest.java b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodecTest.java index ccc1ea3f0ce..a79b76cc3d2 100644 --- a/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodecTest.java +++ b/driver-extras/src/test/java/com/datastax/driver/extras/codecs/json/Jsr353JsonCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.extras.codecs.json; diff --git a/driver-extras/src/test/resources/log4j.properties b/driver-extras/src/test/resources/log4j.properties index c6f34163424..a0990d815d2 100644 --- a/driver-extras/src/test/resources/log4j.properties +++ b/driver-extras/src/test/resources/log4j.properties @@ -1,17 +1,17 @@ # -# Copyright (C) 2012-2015 DataStax Inc. +# Copyright (C) 2012-2017 DataStax Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # Set root logger level to OFF and its only appender to A1. diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 08a81546a2a..6d27c1c3f33 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -1,18 +1,18 @@ diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AccessorInvocationHandler.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AccessorInvocationHandler.java index 38a3e076fa7..760ce92969c 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AccessorInvocationHandler.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AccessorInvocationHandler.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AccessorMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AccessorMapper.java index 68e6ca9e3c8..c59a0836cd0 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AccessorMapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AccessorMapper.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java index 676f7c05d5b..de9a7a003b3 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java index f57e75685a6..ebc6823844f 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationChecks.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java index 76694836b5b..d07108209bc 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultHierarchyScanStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultHierarchyScanStrategy.java index 02bc8c20cc9..6565cd4d8a5 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultHierarchyScanStrategy.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultHierarchyScanStrategy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultMappedProperty.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultMappedProperty.java index 5b3c4f68f4e..dea4ea005cb 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultMappedProperty.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultMappedProperty.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultNamingStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultNamingStrategy.java index 088e0440310..a6edf540b15 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultNamingStrategy.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultNamingStrategy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultPropertyMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultPropertyMapper.java index b973f2f2224..08fb988fc64 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultPropertyMapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DefaultPropertyMapper.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/DriverThrowables.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/DriverThrowables.java index dbb9db813ef..7e7da570e5f 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/DriverThrowables.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/DriverThrowables.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java index 87e1ad4a635..6f239b5e1b5 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/EntityMapper.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/HierarchyScanStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/HierarchyScanStrategy.java index b3ec589b14e..eb9d89f50ac 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/HierarchyScanStrategy.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/HierarchyScanStrategy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedClassesOnlyHierarchyScanStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedClassesOnlyHierarchyScanStrategy.java index 5a80a86d6d4..fb0c0a9f32e 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedClassesOnlyHierarchyScanStrategy.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedClassesOnlyHierarchyScanStrategy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedProperty.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedProperty.java index ed424f2ed4e..a48b2d0a156 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedProperty.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedProperty.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java index b26eaf3fddc..f6f430d9529 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappedUDTCodec.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java index 7562d5283a9..71715c66eba 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MapperBoundStatement.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MapperBoundStatement.java index d64cf81e22a..77f56128362 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MapperBoundStatement.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MapperBoundStatement.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingConfiguration.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingConfiguration.java index 76b75410987..3f851f89708 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingConfiguration.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingConfiguration.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java index 9dba8038731..8514466da8a 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MethodMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MethodMapper.java index c1e3441e57b..e6293677445 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MethodMapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MethodMapper.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConvention.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConvention.java index 89d221ccac0..025ee038fff 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConvention.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConvention.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConventions.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConventions.java index e0b0dde6cb8..72574640b9b 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConventions.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingConventions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingStrategy.java index 6758dfd7608..8fdb270fcc0 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingStrategy.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/NamingStrategy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyAccessStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyAccessStrategy.java index d1eda3178e2..97b82e1f52d 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyAccessStrategy.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyAccessStrategy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyMapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyMapper.java index f3969130f96..b83c1166357 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyMapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyMapper.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyTransienceStrategy.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyTransienceStrategy.java index 046e1a8af05..b26ae61aafd 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyTransienceStrategy.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/PropertyTransienceStrategy.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java index dab865ec90b..1c8e18fab98 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/QueryType.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/ReflectionUtils.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/ReflectionUtils.java index dcd024d466f..79b727ea771 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/ReflectionUtils.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/ReflectionUtils.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java index 78b81ffa2c6..4b08f18d1ff 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Result.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/TypeMappings.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/TypeMappings.java index e8def3dd0b7..0b19ae9c27b 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/TypeMappings.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/TypeMappings.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Word.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Word.java index a612ea80240..49a41c6741d 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Word.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Word.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Accessor.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Accessor.java index 80cf2c6c6df..a79580ebf41 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Accessor.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Accessor.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/ClusteringColumn.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/ClusteringColumn.java index 5b31a47f9e0..f47367a6165 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/ClusteringColumn.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/ClusteringColumn.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Column.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Column.java index e0043be99b9..0ceb561d60b 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Column.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Column.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Computed.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Computed.java index b83e40356cc..ec9d24b713c 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Computed.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Computed.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Defaults.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Defaults.java index 4908d8a6b04..8fdc82c9c70 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Defaults.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Defaults.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Field.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Field.java index 8cbc8862ba0..439b8b3b2dc 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Field.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Field.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Frozen.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Frozen.java index 9b2755a36ef..499c1cf1433 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Frozen.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Frozen.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/FrozenKey.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/FrozenKey.java index cb69a751cb2..7212426b8bf 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/FrozenKey.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/FrozenKey.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/FrozenValue.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/FrozenValue.java index 3d6ffc8a109..e863d56f3f4 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/FrozenValue.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/FrozenValue.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Param.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Param.java index 0efd60f608b..fee2bac59a3 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Param.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Param.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/PartitionKey.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/PartitionKey.java index ee430b8ee0a..1dc6db6f17e 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/PartitionKey.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/PartitionKey.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Query.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Query.java index 4f16bf211a9..9b41adb97de 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Query.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Query.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/QueryParameters.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/QueryParameters.java index 32657506658..e0c2defd7ce 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/QueryParameters.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/QueryParameters.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Table.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Table.java index ef3db4805e3..060616b46ca 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Table.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Table.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Transient.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Transient.java index 7f743354b44..d72a24b7472 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Transient.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/Transient.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/UDT.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/UDT.java index 3d4f24aedac..d947fdf0f6e 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/UDT.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/annotations/UDT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping.annotations; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAccessorParamsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAccessorParamsTest.java index 52da572e235..3f18c49ca8b 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAccessorParamsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAccessorParamsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAccessorTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAccessorTest.java index c28c8272c22..2f916869cf3 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAccessorTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAccessorTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java index 87bc75a50cb..81fae443965 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncResultTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncTest.java index 4087c77da6d..8ee04b1353d 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperAsyncTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java index a312cf995d1..988d9e4f73f 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCaseSensitivityTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCompositeKeyTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCompositeKeyTest.java index f0b30cfb629..6ffc283b282 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCompositeKeyTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCompositeKeyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperComputedFieldsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperComputedFieldsTest.java index 6722dcbf4a3..b5f47f8c374 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperComputedFieldsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperComputedFieldsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCustomCodecTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCustomCodecTest.java index 676e6086f36..daa93b2a895 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCustomCodecTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperCustomCodecTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java index 6a820125737..9a10cd9606a 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java index a6f3135246b..bdd12c124c0 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperMaterializedViewTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperMaterializedViewTest.java index f15ec3ec404..3921ae6e7cd 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperMaterializedViewTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperMaterializedViewTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedCollectionsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedCollectionsTest.java index b8fb15ed558..db5344bc033 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedCollectionsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedCollectionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedUDTTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedUDTTest.java index bebd4744c88..e3b9a06c891 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedUDTTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperNestedUDTTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperOptionTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperOptionTest.java index 8e17733ae8e..49558b243ee 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperOptionTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperOptionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPolymorphismTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPolymorphismTest.java index 38c165d790d..1463dee0a40 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPolymorphismTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPolymorphismTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPrimitiveTypes22Test.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPrimitiveTypes22Test.java index dc03cf0538d..f86f7e83a0c 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPrimitiveTypes22Test.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPrimitiveTypes22Test.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPrimitiveTypesTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPrimitiveTypesTest.java index a16f43755fe..d55b3370c08 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPrimitiveTypesTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperPrimitiveTypesTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperReconnectionTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperReconnectionTest.java index 7c325e59597..98bd34cbdf9 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperReconnectionTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperReconnectionTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java index bf9191fe35f..0d07c493291 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java index 751ec0a9847..be69c94cf61 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTCollectionsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTCollectionsTest.java index 90aa474aeb7..a53383503ea 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTCollectionsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTCollectionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java index d3933694ad9..1288609e5a1 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationHierarchyScanStrategyTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationHierarchyScanStrategyTest.java index 4a9826042b7..99db686d1d2 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationHierarchyScanStrategyTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationHierarchyScanStrategyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationNamingStrategyTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationNamingStrategyTest.java index f40339ffe08..0d3c7e7ce0e 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationNamingStrategyTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationNamingStrategyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationPropertyAccessTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationPropertyAccessTest.java index 8d0eea21dee..f2d50b7ffb8 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationPropertyAccessTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationPropertyAccessTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransienceStrategyTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransienceStrategyTest.java index f936befabb9..7235fdd35c0 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransienceStrategyTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransienceStrategyTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransientTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransientTest.java index 058fadf5f48..b5f43b24b34 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransientTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MappingConfigurationTransientTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/NamingConventionsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/NamingConventionsTest.java index 3c0f50fe5be..19570304107 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/NamingConventionsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/NamingConventionsTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/SyntheticFieldsMapperTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/SyntheticFieldsMapperTest.java index 4bc8dc3f713..f0c23c15b66 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/SyntheticFieldsMapperTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/SyntheticFieldsMapperTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/UDTFieldMapperTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/UDTFieldMapperTest.java index 4ad7106dfb9..e964c047351 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/UDTFieldMapperTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/UDTFieldMapperTest.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.mapping; diff --git a/driver-mapping/src/test/resources/log4j.properties b/driver-mapping/src/test/resources/log4j.properties index d4363e8347f..e861d4aaa0a 100644 --- a/driver-mapping/src/test/resources/log4j.properties +++ b/driver-mapping/src/test/resources/log4j.properties @@ -1,17 +1,17 @@ # -# Copyright (C) 2012-2015 DataStax Inc. +# Copyright (C) 2012-2017 DataStax Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # Set root logger level to DEBUG and its only appender to A1. diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index eda21c2df3e..688b2bcfa65 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -1,18 +1,18 @@ diff --git a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxException.java b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxException.java index ce6f8353486..35f01aa0a14 100644 --- a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxException.java +++ b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxException.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi.api; diff --git a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxMessage.java b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxMessage.java index 10ca08b12ee..bba7facf44e 100644 --- a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxMessage.java +++ b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxMessage.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi.api; diff --git a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxService.java b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxService.java index ec277c416a6..2ef8201b2d3 100644 --- a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxService.java +++ b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/api/MailboxService.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi.api; diff --git a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/impl/Activator.java b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/impl/Activator.java index 28d6539f88c..3037fb48be4 100644 --- a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/impl/Activator.java +++ b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/impl/Activator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi.impl; diff --git a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/impl/MailboxImpl.java b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/impl/MailboxImpl.java index 00f006f0ac1..0c4575b204e 100644 --- a/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/impl/MailboxImpl.java +++ b/driver-tests/osgi/src/main/java/com/datastax/driver/osgi/impl/MailboxImpl.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi.impl; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java index aa22917e1f5..ae2447951d6 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/CCMBridgeListener.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/CCMBridgeListener.java index 40a133b5922..69568819516 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/CCMBridgeListener.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/CCMBridgeListener.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceDefaultIT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceDefaultIT.java index 9c902e7cac3..13fd90b2fb1 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceDefaultIT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceDefaultIT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava17IT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava17IT.java index 78d8789e548..522f3197945 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava17IT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava17IT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava18IT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava18IT.java index 89deef732d1..ae0e8e335b9 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava18IT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava18IT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava19IT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava19IT.java index 5e08ef5b05a..b4047a533ce 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava19IT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava19IT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava20IT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava20IT.java index 833d71380f1..2e04a8e11a6 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava20IT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava20IT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava21IT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava21IT.java index 6235f5ef9ce..de4f3089a19 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava21IT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceGuava21IT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceHdrHistogramIT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceHdrHistogramIT.java index ac01c562e5b..e843432506b 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceHdrHistogramIT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceHdrHistogramIT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceLZ4IT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceLZ4IT.java index 7cb2c807467..6a1534c9290 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceLZ4IT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceLZ4IT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceShadedIT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceShadedIT.java index 105b24cb872..3b3ba679d42 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceShadedIT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceShadedIT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceSnappyIT.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceSnappyIT.java index 202e78aa4c9..bdaac645118 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceSnappyIT.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceSnappyIT.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceTests.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceTests.java index fea01f0ba3f..f0e7e2ef941 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceTests.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/MailboxServiceTests.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.osgi; diff --git a/driver-tests/osgi/src/test/resources/exam.properties b/driver-tests/osgi/src/test/resources/exam.properties index 8e8132ae582..5d82c0962c5 100644 --- a/driver-tests/osgi/src/test/resources/exam.properties +++ b/driver-tests/osgi/src/test/resources/exam.properties @@ -1,17 +1,17 @@ # -# Copyright (C) 2012-2015 DataStax Inc. +# Copyright (C) 2012-2017 DataStax Inc. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # pax.exam.system=test diff --git a/driver-tests/osgi/src/test/resources/logback.xml b/driver-tests/osgi/src/test/resources/logback.xml index 16d7dea332e..316e0d60a8f 100644 --- a/driver-tests/osgi/src/test/resources/logback.xml +++ b/driver-tests/osgi/src/test/resources/logback.xml @@ -1,18 +1,18 @@ diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 4a2858cb36f..39cb304ae82 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -1,18 +1,18 @@ diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 4c27c301f40..98102514c70 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -1,18 +1,18 @@ diff --git a/driver-tests/stress/src/main/java/com/datastax/driver/stress/AsynchronousConsumer.java b/driver-tests/stress/src/main/java/com/datastax/driver/stress/AsynchronousConsumer.java index 71c03e71dc6..60723ae7745 100644 --- a/driver-tests/stress/src/main/java/com/datastax/driver/stress/AsynchronousConsumer.java +++ b/driver-tests/stress/src/main/java/com/datastax/driver/stress/AsynchronousConsumer.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.stress; diff --git a/driver-tests/stress/src/main/java/com/datastax/driver/stress/BlockingConsumer.java b/driver-tests/stress/src/main/java/com/datastax/driver/stress/BlockingConsumer.java index d6bd47e5fa2..94cb6070471 100644 --- a/driver-tests/stress/src/main/java/com/datastax/driver/stress/BlockingConsumer.java +++ b/driver-tests/stress/src/main/java/com/datastax/driver/stress/BlockingConsumer.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.stress; diff --git a/driver-tests/stress/src/main/java/com/datastax/driver/stress/ConsistencyLevelConverter.java b/driver-tests/stress/src/main/java/com/datastax/driver/stress/ConsistencyLevelConverter.java index ef0b2102d02..0529f72cc80 100644 --- a/driver-tests/stress/src/main/java/com/datastax/driver/stress/ConsistencyLevelConverter.java +++ b/driver-tests/stress/src/main/java/com/datastax/driver/stress/ConsistencyLevelConverter.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.stress; diff --git a/driver-tests/stress/src/main/java/com/datastax/driver/stress/Consumer.java b/driver-tests/stress/src/main/java/com/datastax/driver/stress/Consumer.java index 244e2929945..b0092a15eda 100644 --- a/driver-tests/stress/src/main/java/com/datastax/driver/stress/Consumer.java +++ b/driver-tests/stress/src/main/java/com/datastax/driver/stress/Consumer.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.stress; diff --git a/driver-tests/stress/src/main/java/com/datastax/driver/stress/Generators.java b/driver-tests/stress/src/main/java/com/datastax/driver/stress/Generators.java index 2da610e2451..fb7ce31db0d 100644 --- a/driver-tests/stress/src/main/java/com/datastax/driver/stress/Generators.java +++ b/driver-tests/stress/src/main/java/com/datastax/driver/stress/Generators.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.stress; diff --git a/driver-tests/stress/src/main/java/com/datastax/driver/stress/QueryGenerator.java b/driver-tests/stress/src/main/java/com/datastax/driver/stress/QueryGenerator.java index 52345a1a042..13f2297cd1a 100644 --- a/driver-tests/stress/src/main/java/com/datastax/driver/stress/QueryGenerator.java +++ b/driver-tests/stress/src/main/java/com/datastax/driver/stress/QueryGenerator.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.stress; diff --git a/driver-tests/stress/src/main/java/com/datastax/driver/stress/Reporter.java b/driver-tests/stress/src/main/java/com/datastax/driver/stress/Reporter.java index cb0bc8f4565..891375a5685 100644 --- a/driver-tests/stress/src/main/java/com/datastax/driver/stress/Reporter.java +++ b/driver-tests/stress/src/main/java/com/datastax/driver/stress/Reporter.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.stress; diff --git a/driver-tests/stress/src/main/java/com/datastax/driver/stress/Stress.java b/driver-tests/stress/src/main/java/com/datastax/driver/stress/Stress.java index fd52717f7e5..6c756266fea 100644 --- a/driver-tests/stress/src/main/java/com/datastax/driver/stress/Stress.java +++ b/driver-tests/stress/src/main/java/com/datastax/driver/stress/Stress.java @@ -1,17 +1,17 @@ /* - * Copyright (C) 2012-2015 DataStax Inc. + * Copyright (C) 2012-2017 DataStax Inc. * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at * - * http://www.apache.org/licenses/LICENSE-2.0 + * http://www.apache.org/licenses/LICENSE-2.0 * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. */ package com.datastax.driver.stress; diff --git a/pom.xml b/pom.xml index 22cba164903..8e6bf58d4a2 100644 --- a/pom.xml +++ b/pom.xml @@ -1,12 +1,12 @@ + 4.0.0 + com.datastax.cassandra cassandra-driver-parent - 3.2.1-SNAPSHOT + 3.3.0-SNAPSHOT + cassandra-driver-core - bundle DataStax Java Driver for Apache Cassandra - Core - A driver for Apache Cassandra 1.2+ that works exclusively with the Cassandra Query Language version 3 + + A driver for Apache Cassandra 1.2+ that works exclusively with the Cassandra Query Language version 3 (CQL3) and Cassandra's binary protocol. - https://github.com/datastax/java-driver + io.netty netty-handler - ${netty.version} com.google.guava guava - ${guava.version} io.dropwizard.metrics metrics-core - ${metrics.version} org.slf4j slf4j-api - ${slf4j.version} com.github.jnr jnr-ffi - ${jnr-ffi.version} com.github.jnr jnr-posix - ${jnr-posix.version} @@ -73,14 +70,12 @@ org.xerial.snappy snappy-java - ${snappy.version} true net.jpountz.lz4 lz4 - ${lz4.version} true @@ -89,62 +84,48 @@ io.netty netty-transport-native-epoll - ${netty.version} true org.hdrhistogram HdrHistogram - ${hdr.version} true org.testng testng - ${testng.version} test org.assertj assertj-core - ${assertj.version} test org.mockito mockito-all - ${mockito.version} test org.scassandra java-client - ${scassandra.version} test - - - ch.qos.logback - logback-classic - - org.apache.commons commons-exec - ${commons-exec.version} test io.netty netty-tcnative - 2.0.1.Final ${os.detected.classifier} test @@ -152,191 +133,166 @@ log4j log4j - ${log4j.version} test org.slf4j slf4j-log4j12 - ${slf4j-log4j12.version} test + src/main/resources true + + - org.apache.maven.plugins maven-jar-plugin - 2.2 + + + ${project.build.outputDirectory}/META-INF/MANIFEST.MF + + + test-jar test-jar - test-compile + + org.apache.felix maven-bundle-plugin - true - 2.4.0 - com.datastax.driver.core - ${project.version} - <_include>-osgi.bnd - - - - - jar - bundle - pom - + + + true + + + + bundle-manifest + process-classes + + manifest + + + ${project.build.outputDirectory}/META-INF + + + + + + bundle-manifest-shaded - prepare-package + process-classes manifest ${project.build.directory}/META-INF-shaded - - - + + com.datastax.shaded.* + maven-shade-plugin - 2.3 + + true + + + io.netty:* + + + io.netty:netty-transport-native-epoll + + + + + io.netty + com.datastax.shaded.netty + + + + + + META-INF/MANIFEST.MF + META-INF/io.netty.versions.properties + META-INF/maven/io.netty/netty-buffer/pom.properties + META-INF/maven/io.netty/netty-buffer/pom.xml + META-INF/maven/io.netty/netty-codec/pom.properties + META-INF/maven/io.netty/netty-codec/pom.xml + META-INF/maven/io.netty/netty-common/pom.properties + META-INF/maven/io.netty/netty-common/pom.xml + META-INF/maven/io.netty/netty-handler/pom.properties + META-INF/maven/io.netty/netty-handler/pom.xml + META-INF/maven/io.netty/netty-transport/pom.properties + META-INF/maven/io.netty/netty-transport/pom.xml + + + + + META-INF/MANIFEST.MF + ${project.build.directory}/META-INF-shaded/MANIFEST.MF + + + package shade - - true - - - io.netty:* - - - io.netty:netty-transport-native-epoll - - - - - io.netty - com.datastax.shaded.netty - - - - - - META-INF/MANIFEST.MF - META-INF/io.netty.versions.properties - META-INF/maven/io.netty/netty-buffer/pom.properties - META-INF/maven/io.netty/netty-buffer/pom.xml - META-INF/maven/io.netty/netty-codec/pom.properties - META-INF/maven/io.netty/netty-codec/pom.xml - META-INF/maven/io.netty/netty-common/pom.properties - META-INF/maven/io.netty/netty-common/pom.xml - META-INF/maven/io.netty/netty-handler/pom.properties - META-INF/maven/io.netty/netty-handler/pom.xml - META-INF/maven/io.netty/netty-transport/pom.properties - META-INF/maven/io.netty/netty-transport/pom.xml - - - - - META-INF/MANIFEST.MF - ${project.build.directory}/META-INF-shaded/MANIFEST.MF - - - + - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-jar-plugin - [2.2,) - - test-jar - - - - - - - - - - - - - - - kr.motd.maven - os-maven-plugin - 1.4.1.Final - - + isolated - - default - - org.apache.maven.plugins maven-surefire-plugin - 2.16 false @@ -352,30 +308,8 @@ - - - - Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - Apache License Version 2.0 - - - - - scm:git:git@github.com:datastax/java-driver.git - scm:git:git@github.com:datastax/java-driver.git - https://github.com/datastax/java-driver - HEAD - - - - - Various - DataStax - - + diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 91a53d79a51..b73da2d821e 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -16,83 +16,48 @@ --> + 4.0.0 + com.datastax.cassandra cassandra-driver-parent - 3.2.1-SNAPSHOT + 3.3.0-SNAPSHOT - cassandra-driver-dist + cassandra-driver-dist jar - DataStax Java Driver for Apache Cassandra - Binary distribution - + + com.datastax.cassandra cassandra-driver-core - ${project.parent.version} com.datastax.cassandra cassandra-driver-mapping - ${project.parent.version} com.datastax.cassandra cassandra-driver-extras - ${project.parent.version} + cassandra-java-driver-${project.version} + - - maven-javadoc-plugin - 2.9.1 - - - dependencies-javadoc - package - - jar - - - true - - - - - - maven-assembly-plugin - 3.0.0 - - - assemble-binary-tarball - package - - single - - - - - false - - src/assembly/binary-tarball.xml - - posix - - + maven-jar-plugin - 3.0.2 @@ -101,24 +66,84 @@ + + + maven-source-plugin + + true + + + - org.apache.maven.plugins maven-install-plugin - 2.5.1 true + - org.apache.maven.plugins maven-deploy-plugin - 2.8.1 true + + + + + + release + + + + maven-javadoc-plugin + + + dependencies-javadoc + package + + jar + + + true + + + + + + maven-assembly-plugin + + + assemble-binary-tarball + package + + single + + + + + false + + src/assembly/binary-tarball.xml + + posix + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + true + + + + + + + + diff --git a/driver-dist/src/assembly/binary-tarball.xml b/driver-dist/src/assembly/binary-tarball.xml index 77c5f1d21fa..1b7b1a74b6b 100644 --- a/driver-dist/src/assembly/binary-tarball.xml +++ b/driver-dist/src/assembly/binary-tarball.xml @@ -67,6 +67,9 @@ com.datastax.cassandra:cassandra-driver-core com.datastax.cassandra:cassandra-driver-mapping com.datastax.cassandra:cassandra-driver-extras + + com.google.guava:guava + org.slf4j:slf4j-api true @@ -74,7 +77,7 @@ - + true @@ -92,6 +95,7 @@ com.datastax.cassandra:cassandra-driver-extras com.google.guava:guava + org.slf4j:slf4j-api true diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 923bc622224..dfb87d248b5 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -15,25 +15,19 @@ limitations under the License. --> - + + + 4.0.0 + - cassandra-driver-parent com.datastax.cassandra - 3.2.1-SNAPSHOT + cassandra-driver-parent + 3.3.0-SNAPSHOT - 4.0.0 cassandra-driver-examples - DataStax Java Driver for Apache Cassandra - Examples A collection of examples to demonstrate DataStax Java Driver for Apache Cassandra. - https://github.com/datastax/java-driver - - - 2.0.1 - 2.23.1 - 2.4.0-b34 - @@ -42,13 +36,11 @@ com.datastax.cassandra cassandra-driver-core - ${project.parent.version} com.datastax.cassandra cassandra-driver-extras - ${project.parent.version} true @@ -57,14 +49,12 @@ com.fasterxml.jackson.core jackson-annotations - ${jackson.version} true com.fasterxml.jackson.core jackson-databind - ${jackson-databind.version} true @@ -73,14 +63,12 @@ javax.json javax.json-api - ${jsr353-api.version} true org.glassfish javax.json - ${jsr353-ri.version} true runtime @@ -90,7 +78,6 @@ javax.ws.rs javax.ws.rs-api - ${jax-rs.version} true @@ -99,21 +86,18 @@ org.glassfish.jersey.core jersey-server - ${jersey.version} true org.glassfish.jersey.media jersey-media-json-jackson - ${jersey.version} true org.glassfish.jersey.containers jersey-container-jdk-http - ${jersey.version} true @@ -122,7 +106,6 @@ org.glassfish.hk2 hk2-api - ${hk2.version} true @@ -131,14 +114,12 @@ javax.inject javax.inject - 1 true javax.annotation javax.annotation-api - 1.2 true @@ -147,7 +128,6 @@ ch.qos.logback logback-classic - ${logback.version} @@ -159,7 +139,6 @@ org.codehaus.mojo animal-sniffer-maven-plugin - 1.15 true @@ -168,25 +147,34 @@ org.codehaus.mojo clirr-maven-plugin - 2.7 true - org.apache.maven.plugins + maven-javadoc-plugin + + true + + + + + maven-gpg-plugin + + true + + + + maven-install-plugin - 2.5.1 true - org.apache.maven.plugins maven-deploy-plugin - 2.8.1 true @@ -196,27 +184,23 @@ - - - Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - Apache License Version 2.0 - - - - - scm:git:git@github.com:datastax/java-driver.git - scm:git:git@github.com:datastax/java-driver.git - https://github.com/datastax/java-driver - HEAD - - - - - Various - DataStax - - + + + + release + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + true + + + + + + + diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index e55e572d4e1..340a4db9169 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -15,71 +15,60 @@ limitations under the License. --> - + + + 4.0.0 + - cassandra-driver-parent com.datastax.cassandra - 3.2.1-SNAPSHOT + cassandra-driver-parent + 3.3.0-SNAPSHOT - 4.0.0 cassandra-driver-extras bundle DataStax Java Driver for Apache Cassandra - Extras Extended functionality for the Java driver. - https://github.com/datastax/java-driver - - - unit - none - com.datastax.cassandra cassandra-driver-core - ${project.parent.version} com.google.guava guava - ${guava.version} com.fasterxml.jackson.core jackson-core - ${jackson.version} true com.fasterxml.jackson.core jackson-databind - ${jackson-databind.version} true joda-time joda-time - ${joda.version} true javax.json javax.json-api - ${jsr353-api.version} true com.datastax.cassandra cassandra-driver-core - ${project.parent.version} test-jar test @@ -87,63 +76,48 @@ com.datastax.cassandra cassandra-driver-mapping - ${project.parent.version} test org.testng testng - ${testng.version} test org.assertj assertj-core - ${assertj.version} - test - - - - org.mockito - mockito-all - ${mockito.version} test com.fasterxml.jackson.core jackson-annotations - ${jackson.version} test - org.apache.commons - commons-exec - ${commons-exec.version} + org.glassfish + javax.json test - org.glassfish - javax.json - ${jsr353-ri.version} + org.apache.commons + commons-exec test log4j log4j - ${log4j.version} test org.slf4j slf4j-log4j12 - ${slf4j-log4j12.version} test @@ -153,103 +127,14 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - ${jdk8.excludes} - - - ${jdk8.excludes} - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - - - check - process-classes - - check - - - - org.codehaus.mojo.signature - java16 - 1.0 - - - com.datastax.driver.extras.codecs.jdk8.IgnoreJDK6Requirement - - - - - check-jdk8 - process-classes - - check - - - - org.codehaus.mojo.signature - java18 - 1.0 - - - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.16 - - ${test.groups} - false - - ${cassandra.version} - ${ipprefix} - - - io.netty:netty-transport-native-epoll - - - ${jdk8.excludes} - - - - org.apache.felix maven-bundle-plugin - true - 2.4.0 - - - bundle-manifest - process-classes - - manifest - - - com.datastax.driver.extras - ${project.version} - <_include>-osgi.bnd - - jar - bundle - pom - @@ -257,59 +142,4 @@ - - - - short - - unit,short - - - - - long - - unit,short,long - - - - - - legacy-jdks - - [,1.8) - - - **/jdk8/*.java - - - - - - - - Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - Apache License Version 2.0 - - - - - scm:git:git@github.com:datastax/java-driver.git - scm:git:git@github.com:datastax/java-driver.git - https://github.com/datastax/java-driver - HEAD - - - - - Various - DataStax - - - diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 6d27c1c3f33..5f084a330cd 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -16,113 +16,101 @@ --> + 4.0.0 + com.datastax.cassandra cassandra-driver-parent - 3.2.1-SNAPSHOT + 3.3.0-SNAPSHOT + cassandra-driver-mapping bundle DataStax Java Driver for Apache Cassandra - Object Mapping Object mapper for the DataStax CQL Java Driver. - https://github.com/datastax/java-driver - - - 2.4.7 - - - com.datastax.cassandra - cassandra-driver-core - ${project.parent.version} - com.datastax.cassandra cassandra-driver-core - ${project.parent.version} - test-jar - test com.google.guava guava - ${guava.version} org.slf4j slf4j-api - ${slf4j.version} org.testng testng - ${testng.version} + test + + + + com.datastax.cassandra + cassandra-driver-core + test-jar test org.assertj assertj-core - ${assertj.version} test org.mockito mockito-all - ${mockito.version} test org.apache.commons commons-exec - ${commons-exec.version} test org.ow2.asm asm - 5.0.3 test log4j log4j - ${log4j.version} test org.slf4j slf4j-log4j12 - ${slf4j-log4j12.version} test org.codehaus.groovy groovy-all - ${groovy.version} test + + org.codehaus.mojo build-helper-maven-plugin - 1.12 add-source @@ -138,88 +126,26 @@ + org.apache.felix maven-bundle-plugin - true - 2.4.0 - - - bundle-manifest - process-classes - - manifest - - - com.datastax.driver.mapping - ${project.version} - <_include>-osgi.bnd - - jar - bundle - pom - + org.codehaus.gmaven gmaven-plugin - 1.5 - true - - - - testCompile - - - - - ${pom.basedir}/src/test/groovy - - **/*.groovy - - - - - - - - - org.codehaus.groovy - groovy-all - ${groovy.version} - - + + - - - Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - Apache License Version 2.0 - - - - - scm:git:git@github.com:datastax/java-driver.git - scm:git:git@github.com:datastax/java-driver.git - https://github.com/datastax/java-driver - HEAD - - - - - Various - DataStax - - diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 688b2bcfa65..64a89c72306 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -16,76 +16,69 @@ --> + 4.0.0 + com.datastax.cassandra cassandra-driver-tests-parent - 3.2.1-SNAPSHOT + 3.3.0-SNAPSHOT cassandra-driver-tests-osgi - jar DataStax Java Driver for Apache Cassandra Tests - OSGi A test for the DataStax Java Driver in an OSGi container. - https://github.com/datastax/java-driver - - - UTF-8 - 4.4.1 - - 3.6.0 - 2.4.0 - none - - true - com.datastax.cassandra cassandra-driver-core - ${project.parent.version} + + + com.github.jnr + jnr-ffi + + + com.github.jnr + jnr-posix + + com.datastax.cassandra cassandra-driver-mapping - ${project.parent.version} com.datastax.cassandra cassandra-driver-extras - ${project.parent.version} org.apache.felix org.apache.felix.framework - ${felix.version} + + + + io.dropwizard.metrics + metrics-core com.google.guava guava - ${guava.version} org.slf4j slf4j-api - ${slf4j.version} com.datastax.cassandra cassandra-driver-core - ${project.parent.version} test-jar test @@ -93,71 +86,60 @@ org.ops4j.pax.exam pax-exam - ${pax-exam.version} test org.ops4j.pax.exam pax-exam-testng - ${pax-exam.version} test org.ops4j.pax.exam pax-exam-container-forked - ${pax-exam.version} test org.ops4j.pax.exam pax-exam-link-mvn - ${pax-exam.version} test org.ops4j.pax.url pax-url-reference - ${url.version} test javax.transaction jta - 1.1 test javax.inject javax.inject - 1 test org.testng testng - ${testng.version} test org.apache.commons commons-exec - 1.3 test ch.qos.logback logback-classic - ${logback.version} - test @@ -172,25 +154,16 @@ get automatically passed to tests run with IntelliJ --> - org.apache.maven.plugins maven-surefire-plugin - 2.18.1 true - - ${cassandra.version} - ${ipprefix} - - org.apache.maven.plugins maven-failsafe-plugin - 2.18.1 - ${test.skip} - ${test.groups} + ${test.osgi.skip} ${cassandra.version} @@ -203,29 +176,18 @@ ${logback.version} ${metrics.version} ${testng.version} + ${jsr353-api.version} ${ipprefix} - - - default - - integration-test - verify - - - org.apache.felix maven-bundle-plugin - true - 2.4.0 com.datastax.driver.osgi - ${project.version} com.datastax.driver.osgi.api,!com.datastax.driver.osgi.impl com.datastax.driver.osgi.impl.Activator <_include>-osgi.bnd @@ -234,7 +196,7 @@ bundle-manifest - compile + process-classes manifest @@ -242,73 +204,9 @@ - - - org.ops4j - maven-pax-plugin - 1.6.0 - - felix - true - - --platform=felix - --version=${felix.version} - --log=debug - --systemPackages=sun.misc - - - - - - - - short - - unit,short - false - - - - - long - - unit,short,long - false - - - - - - - - Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - Apache License Version 2.0 - - - - - scm:git:git@github.com:datastax/java-driver.git - scm:git:git@github.com:datastax/java-driver.git - https://github.com/datastax/java-driver - HEAD - - - - - Various - DataStax - - diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java index ae2447951d6..718fe313414 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java @@ -20,16 +20,32 @@ import com.datastax.driver.core.ProtocolOptions; import com.datastax.driver.core.TestUtils; import com.google.common.collect.Lists; +import java.util.List; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.options.CompositeOption; import org.ops4j.pax.exam.options.MavenArtifactProvisionOption; import org.ops4j.pax.exam.options.UrlProvisionOption; import org.ops4j.pax.exam.util.PathUtils; -import java.util.List; - -import static org.ops4j.pax.exam.CoreOptions.*; - +import static org.ops4j.pax.exam.CoreOptions.bootDelegationPackage; +import static org.ops4j.pax.exam.CoreOptions.bundle; +import static org.ops4j.pax.exam.CoreOptions.mavenBundle; +import static org.ops4j.pax.exam.CoreOptions.options; +import static org.ops4j.pax.exam.CoreOptions.systemPackages; +import static org.ops4j.pax.exam.CoreOptions.systemProperty; + +/** + * To check that all driver bundles are correctly provisioned, or to debug provisioning problems, + * run the Maven Pax Runner plugin: + *

    + * mvn pax:run
    + * 
    + * The plugin will start a Felix Gogo interactive shell and attempt to provision the driver bundles. + *

    + * Note: you MUST run 'mvn install' on the entire project before! + * + * @see Apache Felix Gogo Documentation + */ public class BundleOptions { public static UrlProvisionOption driverBundle() { diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 39cb304ae82..32c81fb1ab5 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -16,46 +16,25 @@ --> + 4.0.0 + com.datastax.cassandra cassandra-driver-parent - 3.2.1-SNAPSHOT + 3.3.0-SNAPSHOT + cassandra-driver-tests-parent pom DataStax Java Driver for Apache Cassandra Tests Tests for the DataStax Java Driver for Apache Cassandra. - https://github.com/datastax/java-driver stress osgi - - - Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - Apache License Version 2.0 - - - - - scm:git:git@github.com:datastax/java-driver.git - scm:git:git@github.com:datastax/java-driver.git - https://github.com/datastax/java-driver - HEAD - - - - - Various - DataStax - - - @@ -63,25 +42,41 @@ org.codehaus.mojo clirr-maven-plugin - 2.7 true - org.apache.maven.plugins + maven-source-plugin + + true + + + + + maven-javadoc-plugin + + true + + + + + maven-gpg-plugin + + true + + + + maven-install-plugin - 2.5.1 true - org.apache.maven.plugins maven-deploy-plugin - 2.8.1 true @@ -91,4 +86,23 @@ + + + + release + + + + org.sonatype.plugins + nexus-staging-maven-plugin + + true + + + + + + + + diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 98102514c70..92194d02531 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -16,23 +16,29 @@ --> + 4.0.0 + com.datastax.cassandra cassandra-driver-tests-parent - 3.2.1-SNAPSHOT + 3.3.0-SNAPSHOT + cassandra-driver-tests-stress - jar DataStax Java Driver for Apache Cassandra Tests - Stress A stress test example for DataStax Java Driver for Apache Cassandra. - https://github.com/datastax/java-driver + com.datastax.cassandra cassandra-driver-core - 3.2.1-SNAPSHOT + + + + com.google.guava + guava @@ -50,21 +56,21 @@ log4j log4j - 1.2.17 org.slf4j slf4j-log4j12 - 1.7.5 + + + maven-assembly-plugin - 2.4 @@ -76,30 +82,10 @@ + + - - - Apache 2 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - Apache License Version 2.0 - - - - - scm:git:git@github.com:datastax/java-driver.git - scm:git:git@github.com:datastax/java-driver.git - https://github.com/datastax/java-driver - HEAD - - - - - Various - DataStax - - diff --git a/pom.xml b/pom.xml index 1772f1a5abf..bcd7743a477 100644 --- a/pom.xml +++ b/pom.xml @@ -16,23 +16,21 @@ --> + 4.0.0 - - org.sonatype.oss - oss-parent - 7 - - com.datastax.cassandra cassandra-driver-parent - 3.2.1-SNAPSHOT + 3.3.0-SNAPSHOT pom DataStax Java Driver for Apache Cassandra - A driver for Apache Cassandra 1.2+ that works exclusively with the Cassandra Query Language version 3 + + A driver for Apache Cassandra 1.2+ that works exclusively with the Cassandra Query Language version 3 (CQL3) and Cassandra's binary protocol. + https://github.com/datastax/java-driver + 2012 @@ -46,6 +44,7 @@ UTF-8 + UTF-8 3.10 1.6 1.2.17 @@ -57,7 +56,6 @@ 1.1.2.6 1.3.0 2.1.9 - 2.8.8 2.7.9.1 @@ -66,7 +64,14 @@ 1.0.4 2.0.7 3.0.27 - + 2.4.7 + 2.0.1 + 2.23.1 + 2.4.0-b34 + 4.4.1 + + 3.6.0 + 2.4.0 6.8.8 1.7.0 1.10.8 @@ -74,82 +79,841 @@ 1.1.2 1.2.3 127.0.1. + unit - + true - - - default - - default - unit - - - true - - + - - doclint-java8-disable - - [1.8,) - - - -Xdoclint:none - - + + + + com.datastax.cassandra + cassandra-driver-core + ${project.parent.version} + + + + com.datastax.cassandra + cassandra-driver-core + ${project.parent.version} + test-jar + + + + com.datastax.cassandra + cassandra-driver-mapping + ${project.parent.version} + + + + com.datastax.cassandra + cassandra-driver-extras + ${project.parent.version} + + + + com.google.guava + guava + ${guava.version} + + + + io.netty + netty-handler + ${netty.version} + + + + io.dropwizard.metrics + metrics-core + ${metrics.version} + + + + org.slf4j + slf4j-api + ${slf4j.version} + + + + com.github.jnr + jnr-ffi + ${jnr-ffi.version} + + + + com.github.jnr + jnr-posix + ${jnr-posix.version} + + + + org.xerial.snappy + snappy-java + ${snappy.version} + + + + net.jpountz.lz4 + lz4 + ${lz4.version} + + + + io.netty + netty-transport-native-epoll + ${netty.version} + + + + org.hdrhistogram + HdrHistogram + ${hdr.version} + + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind.version} + + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + + org.glassfish + javax.json + ${jsr353-ri.version} + + + + javax.json + javax.json-api + ${jsr353-api.version} + + + + javax.ws.rs + javax.ws.rs-api + ${jax-rs.version} + + + + org.glassfish.jersey.core + jersey-server + ${jersey.version} + + + + org.glassfish.jersey.media + jersey-media-json-jackson + ${jersey.version} + + + + org.glassfish.jersey.containers + jersey-container-jdk-http + ${jersey.version} + + + + org.glassfish.hk2 + hk2-api + ${hk2.version} + + + + javax.inject + javax.inject + 1 + + + + javax.annotation + javax.annotation-api + 1.2 + + + + javax.transaction + jta + 1.1 + + + + joda-time + joda-time + ${joda.version} + + + + org.apache.felix + org.apache.felix.framework + ${felix.version} + + + + org.ops4j.pax.exam + pax-exam + ${pax-exam.version} + + + + org.ops4j.pax.exam + pax-exam-testng + ${pax-exam.version} + + + + org.ops4j.pax.exam + pax-exam-container-forked + ${pax-exam.version} + + + + org.ops4j.pax.exam + pax-exam-link-mvn + ${pax-exam.version} + + + + org.ops4j.pax.url + pax-url-reference + ${url.version} + + + + org.testng + testng + ${testng.version} + + + + org.assertj + assertj-core + ${assertj.version} + + + + org.mockito + mockito-all + ${mockito.version} + + + + org.scassandra + java-client + ${scassandra.version} + + + ch.qos.logback + logback-classic + + + + + + org.apache.commons + commons-exec + ${commons-exec.version} + + + + io.netty + netty-tcnative + 2.0.1.Final + ${os.detected.classifier} + + + + log4j + log4j + ${log4j.version} + + + + org.slf4j + slf4j-log4j12 + ${slf4j-log4j12.version} + + + + ch.qos.logback + logback-classic + ${logback.version} + + + + org.ow2.asm + asm + 5.0.3 + + + + org.codehaus.groovy + groovy-all + ${groovy.version} + + + + + + + + + + + + kr.motd.maven + os-maven-plugin + 1.4.1.Final + + + + + + + + + + + maven-clean-plugin + 3.0.0 + + + + maven-resources-plugin + 3.0.2 + + + + maven-site-plugin + 3.6 + + + + org.codehaus.mojo + build-helper-maven-plugin + + 1.9.1 + + + + maven-enforcer-plugin + 1.4.1 + + + + maven-compiler-plugin + 3.6.1 + + ${java.version} + ${java.version} + true + true + true + + -Xlint:-options + + false + + + + + org.codehaus.gmaven + gmaven-plugin + 1.5 + true + + + + testCompile + + + + + ${pom.basedir}/src/test/groovy + + **/*.groovy + + + + + + + + + org.codehaus.groovy + groovy-all + ${groovy.version} + + + + + + maven-source-plugin + 3.0.1 + + + attach-sources + package + + jar-no-fork + + + + + + + maven-javadoc-plugin + 2.10.4 + true + + true + false + ${javadoc.opts} + + https://docs.oracle.com/javase/8/docs/api/ + https://google.github.io/guava/releases/19.0/api/docs/ + http://netty.io/4.0/api/ + http://www.joda.org/joda-time/apidocs/ + http://fasterxml.github.io/jackson-core/javadoc/2.8/ + http://fasterxml.github.io/jackson-databind/javadoc/2.7/ + https://javaee-spec.java.net/nonav/javadocs/ + + + + + org.xerial.snappy + snappy-java + ${snappy.version} + + + net.jpountz.lz4 + lz4 + ${lz4.version} + + + org.hdrhistogram + HdrHistogram + ${hdr.version} + + + com.fasterxml.jackson.core + jackson-core + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-annotations + ${jackson.version} + + + com.fasterxml.jackson.core + jackson-databind + ${jackson-databind.version} + + + joda-time + joda-time + ${joda.version} + + + javax.json + javax.json-api + ${jsr353-api.version} + + + + + + attach-javadocs + + jar + + + + + + + maven-jar-plugin + 3.0.2 + + + + org.apache.felix + maven-bundle-plugin + true + + 2.5.4 + + + ${project.version} + <_include>-osgi.bnd + + + jar + bundle + pom + + + + + + maven-shade-plugin + 3.0.0 + + + + maven-release-plugin + 2.5.3 + + @{project.version} + true + false + release + deploy + + + + + maven-assembly-plugin + 3.0.0 + + + + maven-install-plugin + 2.5.2 + + + + maven-deploy-plugin + 2.8.2 + + + + org.codehaus.mojo + clirr-maven-plugin + + 2.7 + + + compile + + check + + + + + 3.2.0 + ../clirr-ignores.xml + + com/datastax/shaded/** + + + + + + com.google.code.findbugs + bcel-findbugs + 6.0 + + + + + + com.mycila + license-maven-plugin + 3.0 + + + + + src/**/*.java + src/**/*.xml + src/**/*.properties + **/pom.xml + + + SLASHSTAR_STYLE + SCRIPT_STYLE + + true + + + + check-license + initialize + + check + + + + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + 1.15 + + + check-jdk6 + process-classes + + check + + + + org.codehaus.mojo.signature + java16 + 1.0 + + + com.datastax.driver.extras.codecs.jdk8.IgnoreJDK6Requirement + + + + + + check-jdk8 + + check + + + + org.codehaus.mojo.signature + java18 + 1.0 + + + + + + + + maven-surefire-plugin + + 2.18 + + ${test.groups} + false + + ${cassandra.version} + ${ipprefix} + 60 + + + io.netty:netty-transport-native-epoll + + + + usedefaultlisteners + false + + + + + configfailurepolicy + continue + + + + + + + maven-failsafe-plugin + + 2.18 + + ${test.groups} + false + + ${cassandra.version} + ${ipprefix} + 60 + + + io.netty:netty-transport-native-epoll + + + + usedefaultlisteners + false + + + + + configfailurepolicy + continue + + + + + + + integration-test + verify + + + + + + + maven-gpg-plugin + 1.5 + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + true + + + + org.ops4j + maven-pax-plugin + 1.6.0 + + felix + true + + --platform=felix + --version=${felix.version} + --log=debug + --systemPackages=sun.misc + + + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + maven-jar-plugin + [2.2,) + + test-jar + + + + + + + + + + + + + + + + + + + org.codehaus.mojo + animal-sniffer-maven-plugin + + + + org.codehaus.mojo + clirr-maven-plugin + + + + + + + short - default unit,short + false + long - default unit,short,long + false + duration - default unit,short,long,duration + false + doc - default unit,doc + + - isolated - default isolated - org.apache.maven.plugins maven-surefire-plugin - 2.16 - - - usedefaultlisteners - false - - - true 1 false @@ -157,21 +921,23 @@ - + + - enforce-java8 + release - org.apache.maven.plugins maven-enforcer-plugin - 1.4.1 enforce-java8 @@ -188,18 +954,65 @@ + + maven-source-plugin + + + attach-sources + + jar-no-fork + + + + + + maven-javadoc-plugin + + + attach-javadocs + + jar + + + + + + maven-gpg-plugin + + + sign-artifacts + verify + + sign + + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + true + + ossrh + https://oss.sonatype.org/ + false + true + + - + + modern-jdks + + [1.8,) + + + -Xdoclint:none + + + legacy-jdks @@ -208,23 +1021,18 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - **/Jdk8*.java - - - - - + and tests are ran with JDK6 or 7. + Note that running CCM tests with a legacy JDK require + setting two system properties: ccm.java.home and ccm.path; + both should point to a valid JDK8+ installation. + --> maven-surefire-plugin - 2.16 + **/jdk8/*.java **/Jdk8*.java @@ -235,273 +1043,12 @@ - - - - maven-compiler-plugin - 3.3 - - ${java.version} - ${java.version} - true - true - true - - -Xlint:-options - - false - - - - org.apache.maven.plugins - maven-source-plugin - 2.2.1 - - - attach-sources - package - - jar-no-fork - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - 2.9.1 - true - - true - false - ${javadoc.opts} - - https://docs.oracle.com/javase/8/docs/api/ - https://google.github.io/guava/releases/19.0/api/docs/ - http://netty.io/4.0/api/ - - http://www.joda.org/joda-time/apidocs/ - http://fasterxml.github.io/jackson-core/javadoc/2.8/ - http://fasterxml.github.io/jackson-databind/javadoc/2.7/ - https://javaee-spec.java.net/nonav/javadocs/ - - - - - org.xerial.snappy - snappy-java - ${snappy.version} - - - net.jpountz.lz4 - lz4 - ${lz4.version} - - - org.hdrhistogram - HdrHistogram - ${hdr.version} - - - com.fasterxml.jackson.core - jackson-core - ${jackson.version} - - - com.fasterxml.jackson.core - jackson-annotations - ${jackson.version} - - - com.fasterxml.jackson.core - jackson-databind - ${jackson-databind.version} - - - joda-time - joda-time - ${joda.version} - - - javax.json - javax.json-api - ${jsr353-api.version} - - - - - - attach-javadocs - - jar - - - - - - org.apache.maven.plugins - maven-release-plugin - 2.5 - - @{project.version} - clean verify -Penforce-java8 - - - - - org.codehaus.mojo - clirr-maven-plugin - 2.7 - - - compile - - check - - - - - 3.1.4 - ../clirr-ignores.xml - - - - - com.google.code.findbugs - bcel-findbugs - 6.0 - - - - - com.mycila - license-maven-plugin - 3.0 - - - - - src/**/*.java - src/**/*.xml - src/**/*.properties - **/pom.xml - - - SLASHSTAR_STYLE - SCRIPT_STYLE - - true - - - - check-license - initialize - - check - - - - - - org.codehaus.mojo - animal-sniffer-maven-plugin - 1.15 - - - org.codehaus.mojo.signature - java16 - 1.0 - - - - - check - compile - - check - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.16 - - ${test.groups} - false - - ${cassandra.version} - ${ipprefix} - 60 - - - io.netty:netty-transport-native-epoll - - - - usedefaultlisteners - false - - - - - configfailurepolicy - continue - - - - - - org.apache.maven.plugins - maven-failsafe-plugin - 2.16 - - ${test.groups} - false - - ${cassandra.version} - ${ipprefix} - 60 - - - io.netty:netty-transport-native-epoll - - - - - configfailurepolicy - continue - - - - - - + + + ossrh + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + @@ -525,4 +1072,5 @@ limitations under the License. DataStax + From ec0b124a019d109d8994f1d8367f6483d2d1722a Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Thu, 23 Mar 2017 17:26:26 +0100 Subject: [PATCH 114/512] JAVA-1431: Improve error handling during pool initialization This commit also adds tests for errors during pool initialization using the byteman library. --- changelog/README.md | 1 + driver-core/pom.xml | 13 +++ .../com/datastax/driver/core/CloseFuture.java | 2 +- .../com/datastax/driver/core/Connection.java | 8 +- .../driver/core/HostConnectionPool.java | 5 +- .../datastax/driver/core/SessionManager.java | 23 ++-- .../driver/core/AuthenticationTest.java | 35 ++++++ .../datastax/driver/core/MemoryAppender.java | 46 ++++++++ .../driver/core/SessionErrorTest.java | 107 ++++++++++++++++++ .../com/datastax/driver/core/TestUtils.java | 16 +++ pom.xml | 1 + 11 files changed, 244 insertions(+), 13 deletions(-) create mode 100644 driver-core/src/test/java/com/datastax/driver/core/SessionErrorTest.java diff --git a/changelog/README.md b/changelog/README.md index 23bb2eaa900..b77ead2240d 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -17,6 +17,7 @@ - [improvement] JAVA-1458: Check thread in mapper sync methods. - [improvement] JAVA-1488: Upgrade Netty to 4.0.47.Final. - [improvement] JAVA-1460: Add speculative execution number to ExecutionInfo +- [improvement] JAVA-1431: Improve error handling during pool initialization. ### 3.2.0 diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 32c22c09883..47f3b0dedcc 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -142,6 +142,19 @@ test + + org.jboss.byteman + byteman-bmunit + test + ${byteman.version} + + + org.testng + testng + + + + diff --git a/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java b/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java index 2588b9db077..a1fbb4c5524 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CloseFuture.java @@ -51,7 +51,7 @@ public CloseFuture force() { * Try to force the completion of the shutdown this is a future of. *

    * This method will do its best to expedite the shutdown process. In - * particular, all connections will be closed right away, even if there is + * particular, all connections will be closed right away, even if there are * ongoing queries at the time this method is called. *

    * Note that this method does not block. The completion of this method does diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index 50b33a0274f..73cff42a968 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -193,8 +193,8 @@ public ListenableFuture apply(Throwable t) throws Exception { future.setException(t); } else { // Defunct to ensure that the error will be signaled (marking the host down) - Exception e = (t instanceof ConnectionException || t instanceof DriverException || t instanceof InterruptedException) - ? (Exception) t + Throwable e = (t instanceof ConnectionException || t instanceof DriverException || t instanceof InterruptedException || t instanceof Error) + ? t : new ConnectionException(Connection.this.address, String.format("Unexpected error during transport initialization (%s)", t), t); @@ -422,7 +422,7 @@ int maxAvailableStreams() { return dispatcher.streamIdHandler.maxAvailableStreams(); } - E defunct(E e) { + E defunct(E e) { if (isDefunct.compareAndSet(false, true)) { if (Host.statesLogger.isTraceEnabled()) @@ -846,6 +846,8 @@ static RuntimeException launderAsyncInitException(ExecutionException e) throws C throw (ClusterNameMismatchException) t; if (t instanceof DriverException) throw (DriverException) t; + if (t instanceof Error) + throw (Error) t; return new RuntimeException("Unexpected exception during connection initialization", t); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java b/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java index ac24228d633..662305b3ea4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java +++ b/driver-core/src/main/java/com/datastax/driver/core/HostConnectionPool.java @@ -174,11 +174,14 @@ public ListenableFuture apply(Throwable t) throws Exception { // accordingly in SessionManager#maybeAddPool. Throwables.propagateIfInstanceOf(t, ClusterNameMismatchException.class); Throwables.propagateIfInstanceOf(t, UnsupportedProtocolVersionException.class); + Throwables.propagateIfInstanceOf(t, AuthenticationException.class); // We don't want to swallow Errors either as they probably indicate a more serious issue (OOME...) Throwables.propagateIfInstanceOf(t, Error.class); - // Otherwise, return success. The pool will simply ignore this connection when it sees that it's been closed. + // Otherwise, log the exception but return success. + // The pool will simply ignore this connection when it sees that it's been closed. + logger.warn("Error creating connection to " + host, t); return MoreFutures.VOID_SUCCESS; } }, executor); diff --git a/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java b/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java index f313da4aa9a..6b56248f69a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java @@ -376,8 +376,16 @@ public void onFailure(Throwable t) { cluster.manager.triggerOnDown(host, false); } else { logger.warn("Error creating pool to " + host, t); + // do not mark the host down, as there could be other connections to it + // (e.g. the control connection, or another session pool). + // The conviction policy will mark it down if it has no more active connections. } - future.set(false); + // propagate errors; for all other exceptions, consider the pool init failed + // but allow the session init process to continue normally + if (t instanceof Error) + future.setException(t); + else + future.set(false); } }); return future; @@ -431,7 +439,7 @@ ListenableFuture updateCreatedPools() { } // Wait pool creation before removing, so we don't lose connectivity - ListenableFuture allPoolsCreatedFuture = Futures.successfulAsList(poolCreatedFutures); + ListenableFuture allPoolsCreatedFuture = Futures.allAsList(poolCreatedFutures); return GuavaCompatibility.INSTANCE.transformAsync(allPoolsCreatedFuture, new AsyncFunction>() { @Override @@ -452,11 +460,7 @@ void updateCreatedPools(Host h) { try { if (pool == null) { if (dist != HostDistance.IGNORED && h.state == Host.State.UP) - try { - maybeAddPool(h, null).get(); - } catch (ExecutionException e) { - // Ignore, maybeAddPool has already handled the error - } + maybeAddPool(h, null).get(); } else if (dist != pool.hostDistance) { if (dist == HostDistance.IGNORED) { removePool(h).get(); @@ -468,7 +472,10 @@ void updateCreatedPools(Host h) { } catch (InterruptedException e) { Thread.currentThread().interrupt(); } catch (ExecutionException e) { - logger.error("Unexpected error while refreshing connection pools", e.getCause()); + Throwable cause = e.getCause(); + logger.error("Unexpected error while refreshing connection pools", cause); + if (cause instanceof Error) + throw ((Error) cause); } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java b/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java index 21e5faa15f2..fa01f49e9d3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AuthenticationTest.java @@ -17,6 +17,7 @@ import com.datastax.driver.core.exceptions.AuthenticationException; import com.google.common.util.concurrent.Uninterruptibles; +import org.apache.log4j.Level; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -132,4 +133,38 @@ public void run() { }, 2000); } + /** + * Ensures that when a host replies with AuthenticationException + * during connection pool initialization the pool creation is aborted. + * + * @jira_ticket JAVA-1431 + */ + @Test(groups = "short") + public void should_not_create_pool_with_wrong_credentials() throws InterruptedException { + PlainTextAuthProvider authProvider = new PlainTextAuthProvider("cassandra", "cassandra"); + Cluster cluster = register(Cluster.builder() + .addContactPoints(getContactPoints()) + .withPort(ccm().getBinaryPort()) + .withAuthProvider(authProvider) + .build()); + cluster.init(); + authProvider.setPassword("wrong"); + Level previous = TestUtils.setLogLevel(Session.class, Level.WARN); + MemoryAppender logs = new MemoryAppender().enableFor(Session.class); + Session session; + try { + session = cluster.connect(); + } finally { + TestUtils.setLogLevel(Session.class, previous); + logs.disableFor(Session.class); + } + assertThat(session.getState().getConnectedHosts()).isEmpty(); + InetSocketAddress host = ccm().addressOfNode(1); + assertThat(logs.get()) + .contains( + "Error creating pool to " + host, + "Authentication error on host " + host, + AuthenticationException.class.getSimpleName()); + } + } diff --git a/driver-core/src/test/java/com/datastax/driver/core/MemoryAppender.java b/driver-core/src/test/java/com/datastax/driver/core/MemoryAppender.java index 1e68e235136..cc4bfbdf5b3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MemoryAppender.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MemoryAppender.java @@ -15,6 +15,7 @@ */ package com.datastax.driver.core; +import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.apache.log4j.WriterAppender; import org.apache.log4j.spi.LoggingEvent; @@ -95,4 +96,49 @@ public String getNext() { nextLogIdx += next.length(); return next; } + + public MemoryAppender enableFor(Class... loggers) { + for (Class logger : loggers) { + enableFor(logger.getName()); + } + return this; + } + + public MemoryAppender enableFor(org.slf4j.Logger... loggers) { + for (org.slf4j.Logger logger : loggers) { + enableFor(logger.getName()); + } + return this; + } + + public MemoryAppender enableFor(String... loggers) { + for (String logger : loggers) { + Logger log4jLogger = Logger.getLogger(logger); + log4jLogger.addAppender(this); + } + return this; + } + + public MemoryAppender disableFor(Class... loggers) { + for (Class logger : loggers) { + disableFor(logger.getName()); + } + return this; + } + + public MemoryAppender disableFor(org.slf4j.Logger... loggers) { + for (org.slf4j.Logger logger : loggers) { + disableFor(logger.getName()); + } + return this; + } + + public MemoryAppender disableFor(String... loggers) { + for (String logger : loggers) { + Logger log4jLogger = Logger.getLogger(logger); + log4jLogger.removeAppender(this); + } + return this; + } + } diff --git a/driver-core/src/test/java/com/datastax/driver/core/SessionErrorTest.java b/driver-core/src/test/java/com/datastax/driver/core/SessionErrorTest.java new file mode 100644 index 00000000000..d40b800e8b0 --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/SessionErrorTest.java @@ -0,0 +1,107 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import org.apache.log4j.Level; +import org.jboss.byteman.contrib.bmunit.BMNGListener; +import org.jboss.byteman.contrib.bmunit.BMRule; +import org.jboss.byteman.contrib.bmunit.BMUnitConfig; +import org.testng.annotations.AfterClass; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.Listeners; +import org.testng.annotations.Test; + +import static com.datastax.driver.core.Cluster.builder; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +/** + * Simple test of the Sessions methods against a one node cluster. + */ +@BMUnitConfig(loadDirectory = "target/test-classes") +@Listeners(BMNGListener.class) +@CCMConfig(createCluster = false) +public class SessionErrorTest extends ScassandraTestBase { + + private ScassandraCluster scassandra; + private Cluster cluster; + + @BeforeClass(groups = "short") + public void setUp() throws Exception { + scassandra = ScassandraCluster.builder().withNodes(2).build(); + scassandra.init(); + cluster = builder() + .addContactPoints(scassandra.address(1).getAddress()) + .withPort(scassandra.getBinaryPort()) + .build(); + cluster.init(); + } + + @AfterClass(groups = "short") + public void tearDown() throws Exception { + cluster.close(); + scassandra.stop(); + } + + @Test(groups = "short") + @BMRule(name = "emulate OOME", + targetClass = "com.datastax.driver.core.Connection$4", + targetMethod = "apply(Void)", + action = "throw new OutOfMemoryError(\"not really\")" + ) + public void should_propagate_errors() { + try { + cluster.connect(); + fail("Expecting OOME"); + } catch (OutOfMemoryError e) { + assertThat(e).hasMessage("not really"); + } + } + + @Test(groups = "short") + @BMRule(name = "emulate NPE", + targetClass = "com.datastax.driver.core.Connection$4", + targetMethod = "apply(Void)", + action = "throw new NullPointerException(\"not really\")" + ) + public void should_not_propagate_unchecked_exceptions() { + Level previous = TestUtils.setLogLevel(HostConnectionPool.class, Level.WARN); + MemoryAppender logs = new MemoryAppender().enableFor(HostConnectionPool.class); + try { + Session session = cluster.connect(); + // Pool to host1 should be still open because host1 is the control host, + // but its pool should have no active connection + // Pool to host2 should have been closed because host2 has no + // more active connections + Session.State state = session.getState(); + Host host1 = scassandra.host(cluster, 1, 1); + Host host2 = scassandra.host(cluster, 1, 2); + assertThat(state.getConnectedHosts()).hasSize(1).containsExactly(host1); + assertThat(state.getOpenConnections(host1)).isEqualTo(0); // pool open but empty + assertThat(state.getOpenConnections(host2)).isEqualTo(0); // pool closed + assertThat(logs.get()) + .contains( + "Unexpected error during transport initialization", + "not really", + NullPointerException.class.getSimpleName(), + "com.datastax.driver.core.Connection$4.apply"); + } finally { + TestUtils.setLogLevel(HostConnectionPool.class, previous); + logs.disableFor(HostConnectionPool.class); + } + } + +} diff --git a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java index 52d605844ba..5ae5818e08b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java @@ -24,6 +24,7 @@ import com.google.common.util.concurrent.Uninterruptibles; import com.sun.management.OperatingSystemMXBean; import io.netty.channel.EventLoopGroup; +import org.apache.log4j.Level; import org.scassandra.Scassandra; import org.scassandra.ScassandraFactory; import org.slf4j.Logger; @@ -916,4 +917,19 @@ public static ByteBuffer serializeForCompositeType(Object... params) { return res; } + public static Level setLogLevel(Class logger, Level newLevel) { + return setLogLevel(logger.getName(), newLevel); + } + + public static Level setLogLevel(Logger logger, Level newLevel) { + return setLogLevel(logger.getName(), newLevel); + } + + public static Level setLogLevel(String logger, Level newLevel) { + org.apache.log4j.Logger log4jLogger = org.apache.log4j.Logger.getLogger(logger); + Level oldLevel = log4jLogger.getLevel(); + log4jLogger.setLevel(newLevel); + return oldLevel; + } + } diff --git a/pom.xml b/pom.xml index bcd7743a477..f675d679ec1 100644 --- a/pom.xml +++ b/pom.xml @@ -78,6 +78,7 @@ 1.3 1.1.2 1.2.3 + 3.0.8 127.0.1. unit From 840936ae9709890662a85b6c91ae2abcba514bb8 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Mon, 12 Jun 2017 10:01:27 -0500 Subject: [PATCH 115/512] Close cluster2 in should_init_cluster_and_session_if_needed Cluster was not being closed, which was causing later tests to fail since it was able to send heartbeats to cached ccm cluster. --- .../datastax/driver/core/AsyncQueryTest.java | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java b/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java index 2c7da742fe5..b6904475644 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AsyncQueryTest.java @@ -20,7 +20,10 @@ import com.google.common.base.Function; import com.google.common.base.Throwables; import com.google.common.collect.Lists; -import com.google.common.util.concurrent.*; +import com.google.common.util.concurrent.AsyncFunction; +import com.google.common.util.concurrent.Futures; +import com.google.common.util.concurrent.ListenableFuture; +import com.google.common.util.concurrent.Uninterruptibles; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.testng.annotations.DataProvider; @@ -83,15 +86,19 @@ public void should_init_cluster_and_session_if_needed() throws Exception { Cluster cluster2 = register(Cluster.builder() .addContactPointsWithPorts(Lists.newArrayList(host.getSocketAddress())) .build()); - Session session2 = cluster2.newSession(); + try { + Session session2 = cluster2.newSession(); - // Neither cluster2 nor session2 are initialized at this point - assertThat(cluster2.manager.metadata).isNull(); + // Neither cluster2 nor session2 are initialized at this point + assertThat(cluster2.manager.metadata).isNull(); - ResultSetFuture future = session2.executeAsync("select release_version from system.local"); - Row row = Uninterruptibles.getUninterruptibly(future).one(); + ResultSetFuture future = session2.executeAsync("select release_version from system.local"); + Row row = Uninterruptibles.getUninterruptibly(future).one(); - assertThat(row.getString(0)).isNotEmpty(); + assertThat(row.getString(0)).isNotEmpty(); + } finally { + cluster2.close(); + } } @Test(groups = "short", dataProvider = "keyspace", enabled = false, From 5b9b13b1a0d8fbc476024042802b7393d9278350 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Tue, 13 Jun 2017 13:26:03 -0500 Subject: [PATCH 116/512] Remove use of dependsOnMethods The use of dependsOnMethods causes surefire/TestNG to run tests in a somewhat arbitrary ordering (see: https://github.com/cbeust/testng/issues/1291). Since we were not using it extensively, remove all use of it to prevent this. --- .../LoadBalancingPolicyBootstrapTest.java | 5 +++-- .../driver/core/ScassandraTestBase.java | 22 +++++++------------ 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java index bd4bf29ab2e..0395009290b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/LoadBalancingPolicyBootstrapTest.java @@ -19,7 +19,6 @@ import com.datastax.driver.core.policies.LoadBalancingPolicy; import com.datastax.driver.core.policies.RoundRobinPolicy; import com.datastax.driver.core.utils.MoreObjects; -import com.google.common.base.Objects; import com.google.common.collect.Lists; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -28,11 +27,13 @@ import java.util.Collection; import java.util.List; +import static com.datastax.driver.core.CreateCCM.TestMode.PER_METHOD; import static com.datastax.driver.core.LoadBalancingPolicyBootstrapTest.HistoryPolicy.Action.*; import static com.datastax.driver.core.LoadBalancingPolicyBootstrapTest.HistoryPolicy.entry; import static org.assertj.core.api.Assertions.assertThat; @CCMConfig(numberOfNodes = 2, dirtiesContext = true, createCluster = false) +@CreateCCM(PER_METHOD) public class LoadBalancingPolicyBootstrapTest extends CCMTestsSupport { private static final Logger logger = LoggerFactory.getLogger(LoadBalancingPolicyBootstrapTest.class); @@ -76,7 +77,7 @@ public void should_init_policy_with_up_contact_points() throws Exception { * @jira_ticket JAVA-613 * @since 2.0.10, 2.1.5 */ - @Test(groups = "short", dependsOnMethods = "should_init_policy_with_up_contact_points") + @Test(groups = "long") public void should_send_down_notifications_after_init_when_contact_points_are_down() throws Exception { // In order to validate this behavior, we need to stop the first node that would be attempted to be diff --git a/driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java b/driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java index 50336327e90..140592174cd 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ScassandraTestBase.java @@ -51,7 +51,7 @@ public abstract class ScassandraTestBase { protected static String ip = TestUtils.ipOfNode(1); @BeforeClass(groups = {"short", "long"}) - public void startScassandra() { + public void beforeTestClass() { scassandra = TestUtils.createScassandraServer(); scassandra.start(); primingClient = scassandra.primingClient(); @@ -61,7 +61,7 @@ public void startScassandra() { } @AfterClass(groups = {"short", "long"}) - public void stopScassandra() { + public void afterTestClass() { if (scassandra != null) scassandra.stop(); } @@ -105,26 +105,20 @@ public static abstract class PerClassCluster extends ScassandraTestBase { protected Host host; - @BeforeClass(groups = {"short", "long"}, dependsOnMethods = "startScassandra") - public void initCluster() { + @BeforeClass(groups = {"short", "long"}) + public void beforeTestClass() { + super.beforeTestClass(); Cluster.Builder builder = createClusterBuilder(); cluster = builder.build(); host = retrieveSingleHost(cluster); session = cluster.connect(); } - @AfterClass(groups = {"short", "long"}, alwaysRun = true) - public void closeCluster() { + @AfterClass(groups = {"short", "long"}) + public void afterTestClass() { if (cluster != null) cluster.close(); + super.afterTestClass(); } - - @AfterClass(groups = {"short", "long"}, dependsOnMethods = "closeCluster", alwaysRun = true) - @Override - public void stopScassandra() { - super.stopScassandra(); - } - } - } From 5f856dfeeca0e78e33c2c68cb87c4ce581486f88 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Tue, 13 Jun 2017 22:43:14 +0200 Subject: [PATCH 117/512] Fix failing test after JAVA-1431 (#855) --- .../java/com/datastax/driver/core/SessionErrorTest.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/SessionErrorTest.java b/driver-core/src/test/java/com/datastax/driver/core/SessionErrorTest.java index d40b800e8b0..aaa3418e00c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SessionErrorTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SessionErrorTest.java @@ -86,10 +86,10 @@ public void should_not_propagate_unchecked_exceptions() { // but its pool should have no active connection // Pool to host2 should have been closed because host2 has no // more active connections - Session.State state = session.getState(); Host host1 = scassandra.host(cluster, 1, 1); Host host2 = scassandra.host(cluster, 1, 2); - assertThat(state.getConnectedHosts()).hasSize(1).containsExactly(host1); + TestUtils.waitForDown(TestUtils.ipOfNode(2), cluster); + Session.State state = session.getState(); assertThat(state.getOpenConnections(host1)).isEqualTo(0); // pool open but empty assertThat(state.getOpenConnections(host2)).isEqualTo(0); // pool closed assertThat(logs.get()) @@ -98,6 +98,11 @@ public void should_not_propagate_unchecked_exceptions() { "not really", NullPointerException.class.getSimpleName(), "com.datastax.driver.core.Connection$4.apply"); + HostConnectionPool pool1 = ((SessionManager)session).pools.get(host1); + HostConnectionPool pool2 = ((SessionManager)session).pools.get(host2); + assertThat(pool1).isNotNull(); + assertThat(pool1.isClosed()).isFalse(); + assertThat(pool2).isNull(); // pool2 should have been removed } finally { TestUtils.setLogLevel(HostConnectionPool.class, previous); logs.disableFor(HostConnectionPool.class); From e1bec3d78336896b6669eb7ffbf4756520d33992 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Thu, 22 Jun 2017 17:09:55 +0200 Subject: [PATCH 118/512] Enable license plugin by default --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index f675d679ec1..7d7d8869f51 100644 --- a/pom.xml +++ b/pom.xml @@ -857,6 +857,11 @@ limitations under the License. + + com.mycila + license-maven-plugin + + org.codehaus.mojo animal-sniffer-maven-plugin From d962bf603682ed0e8b8defc01f2a99643b79320b Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 22 Jun 2017 22:38:56 -0500 Subject: [PATCH 119/512] Set priority on should_unset_flag_on_failed_agreement to 1 This test should run last as it makes a schema change and then immediately checks schema agreement. Subsequent tests that run, such as should_check_agreement_through_cluster_metadata may observe schemas don't agree when they run at fail. --- .../test/java/com/datastax/driver/core/SchemaAgreementTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/SchemaAgreementTest.java b/driver-core/src/test/java/com/datastax/driver/core/SchemaAgreementTest.java index 35b4eb2c559..99fcc00fc0d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SchemaAgreementTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SchemaAgreementTest.java @@ -48,7 +48,7 @@ public void should_set_flag_on_non_schema_altering_statement() { assertThat(rs.getExecutionInfo().isSchemaInAgreement()).isTrue(); } - @Test(groups = "short") + @Test(groups = "short", priority = 1) public void should_unset_flag_on_failed_agreement() { // Setting to 0 results in no query being set, so agreement fails ProtocolOptions protocolOptions = cluster().getConfiguration().getProtocolOptions(); From 0c909d98fcda693d11c9283f74221710c3eb2f67 Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 26 Jun 2017 11:15:45 -0700 Subject: [PATCH 120/512] Update version in docs --- README.md | 14 +++++++------- changelog/README.md | 2 +- docs.yaml | 3 +++ faq/README.md | 2 +- manual/compression/README.md | 2 +- manual/custom_codecs/extras/README.md | 2 +- manual/object_mapper/README.md | 2 +- manual/shaded_jar/README.md | 6 +++--- 8 files changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 787d944d38c..a64441e7943 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ not yet have been released. You can find the documentation for latest version through [Java driver docs](http://datastax.github.io/java-driver/) or via the release tags, [e.g. -3.2.0](https://github.com/datastax/java-driver/tree/3.2.0).* +3.3.0](https://github.com/datastax/java-driver/tree/3.3.0).* A modern, [feature-rich](manual/) and highly tunable Java client library for Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using @@ -55,7 +55,7 @@ The driver contains the following modules: start material and technical details about the driver and its features. - API: http://www.datastax.com/drivers/java/3.2 - [changelog](changelog/) -- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.2.0.tar.gz) +- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.0.tar.gz) **Feeback requested:** help us focus our efforts, provide your input on the [Platform and Runtime Survey](http://goo.gl/forms/qwUE6qnL7U) (we kept it short). @@ -68,7 +68,7 @@ it in your application using the following Maven dependency: com.datastax.cassandra cassandra-driver-core - 3.2.0 + 3.3.0 ``` @@ -78,7 +78,7 @@ Note that the object mapper is published as a separate artifact: com.datastax.cassandra cassandra-driver-mapping - 3.2.0 + 3.3.0 ``` @@ -88,7 +88,7 @@ The 'extras' module is also published as a separate artifact: com.datastax.cassandra cassandra-driver-extras - 3.2.0 + 3.3.0 ``` @@ -97,12 +97,12 @@ We also provide a [shaded JAR](manual/shaded_jar/) to avoid the explicit dependency to Netty. If you can't use a dependency management tool, a -[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.2.0.tar.gz) +[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.0.tar.gz) is available for download. ## Compatibility -The Java client driver 3.2.0 ([branch 3.x](https://github.com/datastax/java-driver/tree/3.x)) is compatible with Apache +The Java client driver 3.3.0 ([branch 3.x](https://github.com/datastax/java-driver/tree/3.x)) is compatible with Apache Cassandra 1.2, 2.0, 2.1, 2.2 and 3.0 (see [this page](http://datastax.github.io/java-driver/manual/native_protocol) for the most up-to-date compatibility information). diff --git a/changelog/README.md b/changelog/README.md index b77ead2240d..3320ae0f026 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,6 +1,6 @@ ## Changelog -### 3.3.0 (in progress) +### 3.3.0 - [bug] JAVA-1469: Update LoggingRetryPolicy to deal with SLF4J-353. - [improvement] JAVA-1203: Upgrade Metrics to allow usage in OSGi. diff --git a/docs.yaml b/docs.yaml index 8ba7f5e1403..d11efc65a17 100644 --- a/docs.yaml +++ b/docs.yaml @@ -45,12 +45,15 @@ links: - title: Releases href: https://github.com/datastax/java-driver/releases api_docs: + 3.3: http://docs.datastax.com/en/drivers/java/3.3 3.2: http://docs.datastax.com/en/drivers/java/3.2 3.1: http://docs.datastax.com/en/drivers/java/3.1 3.0: http://docs.datastax.com/en/drivers/java/3.0 2.1: http://docs.datastax.com/en/drivers/java/2.1 2.0: http://docs.datastax.com/en/drivers/java/2.0 versions: + - name: '3.3' + ref: '3.3.0' - name: '3.2' ref: '3.2_docfixes' - name: '3.1' diff --git a/faq/README.md b/faq/README.md index 317c76e072f..22f6a5ecf61 100644 --- a/faq/README.md +++ b/faq/README.md @@ -216,7 +216,7 @@ fields set to `null`. This also causes tombstones to be inserted unless setting `saveNullFields` option to false. See [Mapper options] for more details. -[Blobs.java]: https://github.com/datastax/java-driver/tree/3.2.0/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java +[Blobs.java]: https://github.com/datastax/java-driver/tree/3.3.0/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java [CASSANDRA-7304]: https://issues.apache.org/jira/browse/CASSANDRA-7304 [Parameters and Binding]: ../manual/statements/prepared/#parameters-and-binding [Mapper options]: ../manual/object_mapper/using/#mapper-options diff --git a/manual/compression/README.md b/manual/compression/README.md index 6fc87a06134..dad0e5e5b94 100644 --- a/manual/compression/README.md +++ b/manual/compression/README.md @@ -85,4 +85,4 @@ cluster = Cluster.builder() .build(); ``` -[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.2.0/cassandra-driver-parent-3.2.0.pom +[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.3.0/cassandra-driver-parent-3.3.0.pom diff --git a/manual/custom_codecs/extras/README.md b/manual/custom_codecs/extras/README.md index 26c97064acb..0441cd82d60 100644 --- a/manual/custom_codecs/extras/README.md +++ b/manual/custom_codecs/extras/README.md @@ -10,7 +10,7 @@ The module is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-extras - 3.2.0 + 3.3.0 ``` diff --git a/manual/object_mapper/README.md b/manual/object_mapper/README.md index 27867088ce4..08e5f18797a 100644 --- a/manual/object_mapper/README.md +++ b/manual/object_mapper/README.md @@ -11,7 +11,7 @@ The mapper is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-mapping - 3.2.0 + 3.3.0 ``` diff --git a/manual/shaded_jar/README.md b/manual/shaded_jar/README.md index 38ee468c8c2..6319c1a10fb 100644 --- a/manual/shaded_jar/README.md +++ b/manual/shaded_jar/README.md @@ -12,7 +12,7 @@ package name: com.datastax.cassandra cassandra-driver-core - 3.2.0 + 3.3.0 shaded @@ -32,7 +32,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-core - 3.2.0 + 3.3.0 shaded @@ -44,7 +44,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-mapping - 3.2.0 + 3.3.0 com.datastax.cassandra From f3656c8d0c94261075f83846eab0b3f11f29716a Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 26 Jun 2017 12:07:15 -0700 Subject: [PATCH 121/512] [maven-release-plugin] prepare release 3.3.0 --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 8 ++++---- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 47f3b0dedcc..e7f15c84e4f 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0-SNAPSHOT + 3.3.0 cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index b73da2d821e..64d07a2430a 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0-SNAPSHOT + 3.3.0 cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index dfb87d248b5..c233e37b3eb 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0-SNAPSHOT + 3.3.0 cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 340a4db9169..ee60b35eb86 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0-SNAPSHOT + 3.3.0 cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 5f084a330cd..16c92e44eb0 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0-SNAPSHOT + 3.3.0 cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 64a89c72306..c85ecfcd97e 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.0-SNAPSHOT + 3.3.0 cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 32c81fb1ab5..82d9ae8ad2c 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0-SNAPSHOT + 3.3.0 cassandra-driver-tests-parent diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 92194d02531..105b67f1913 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.0-SNAPSHOT + 3.3.0 cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index 7d7d8869f51..150b9464af5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0-SNAPSHOT + 3.3.0 pom DataStax Java Driver for Apache Cassandra @@ -843,7 +843,7 @@ limitations under the License. - + @@ -927,7 +927,7 @@ limitations under the License. - + @@ -1069,7 +1069,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - HEAD + 3.3.0 From 50e7708363e8f2049a47e0d3ca874944d589b81c Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 26 Jun 2017 12:07:53 -0700 Subject: [PATCH 122/512] [maven-release-plugin] prepare for next development iteration --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 9 files changed, 10 insertions(+), 10 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index e7f15c84e4f..0cb71e8ef08 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0 + 3.4.0-SNAPSHOT cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 64d07a2430a..765631a4adf 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0 + 3.4.0-SNAPSHOT cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index c233e37b3eb..185b84ac29c 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0 + 3.4.0-SNAPSHOT cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index ee60b35eb86..cfcc92c8285 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0 + 3.4.0-SNAPSHOT cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 16c92e44eb0..9311f2e63cf 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0 + 3.4.0-SNAPSHOT cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index c85ecfcd97e..cda762fdd8b 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.0 + 3.4.0-SNAPSHOT cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 82d9ae8ad2c..8c3b59037d8 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0 + 3.4.0-SNAPSHOT cassandra-driver-tests-parent diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 105b67f1913..94fcdf763e2 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.0 + 3.4.0-SNAPSHOT cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index 150b9464af5..897867bfa5a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.0 + 3.4.0-SNAPSHOT pom DataStax Java Driver for Apache Cassandra @@ -1069,7 +1069,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - 3.3.0 + HEAD From ff0d44676ef63bc607fa8bc408d91c28027a4d0b Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Wed, 19 Jul 2017 14:08:38 -0500 Subject: [PATCH 123/512] JAVA-1555: Include VIEW and CDC in WriteType --- changelog/README.md | 4 ++++ .../java/com/datastax/driver/core/WriteType.java | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/changelog/README.md b/changelog/README.md index 3320ae0f026..7079ab025bb 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,5 +1,9 @@ ## Changelog +### 3.4.0 (In progress) + +- [bug] JAVA-1555: Include VIEW and CDC in WriteType. + ### 3.3.0 - [bug] JAVA-1469: Update LoggingRetryPolicy to deal with SLF4J-353. diff --git a/driver-core/src/main/java/com/datastax/driver/core/WriteType.java b/driver-core/src/main/java/com/datastax/driver/core/WriteType.java index 80269211db9..cf4cca8a73a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/WriteType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/WriteType.java @@ -48,5 +48,15 @@ public enum WriteType { * A conditional write. If a timeout has this {@code WriteType}, the timeout has happened while doing the compare-and-swap for * an conditional update. In this case, the update may or may not have been applied. */ - CAS; + CAS, + /** + * Indicates that the timeout was related to acquiring locks needed for updating materialized + * views affected by write operation. + */ + VIEW, + /** + * Indicates that the timeout was related to acquiring space for change data capture logs for cdc + * tracked tables. + */ + CDC; } From 52521a21c9c8951721ffebd449b15987c084ed80 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Tue, 25 Jul 2017 15:33:34 +0200 Subject: [PATCH 124/512] Add disclaimer in README file about running on big-endian systems --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a64441e7943..25b0d4754d7 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,7 @@ Other features are available only when using Apache Cassandra 2.0 or higher (e.g Trying to use these with a cluster running Cassandra 1.2 will result in an [UnsupportedFeatureException](https://github.com/datastax/java-driver/blob/3.x/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedFeatureException.java) being thrown. +__Note__: DataStax products do not support big-endian systems. ## Upgrading from previous versions From 318749b54dae2b82dd5464e09910f98a76f89d79 Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 31 Jul 2017 11:00:52 -0700 Subject: [PATCH 125/512] Add 4.0.0-alpha1 to docs --- docs.yaml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docs.yaml b/docs.yaml index d11efc65a17..8b47643224b 100644 --- a/docs.yaml +++ b/docs.yaml @@ -35,17 +35,16 @@ links: - title: Code href: https://github.com/datastax/java-driver/ - title: Docs - href: http://datastax.github.io/java-driver/ + href: http://docs.datastax.com/en/developer/java-driver/ - title: Issues href: https://datastax-oss.atlassian.net/browse/JAVA/ - title: Mailing List href: https://groups.google.com/a/lists.datastax.com/forum/#!forum/java-driver-user - - title: IRC Channel - href: irc://irc.freenode.net/datastax-drivers - title: Releases - href: https://github.com/datastax/java-driver/releases + href: http://downloads.datastax.com/java-driver/ api_docs: 3.3: http://docs.datastax.com/en/drivers/java/3.3 + 4.0-alpha: http://docs.datastax.com/en/drivers/java/4.0 3.2: http://docs.datastax.com/en/drivers/java/3.2 3.1: http://docs.datastax.com/en/drivers/java/3.1 3.0: http://docs.datastax.com/en/drivers/java/3.0 @@ -54,6 +53,8 @@ api_docs: versions: - name: '3.3' ref: '3.3.0' + - name: '4.0-alpha' + ref: '4.0.0-alpha1' - name: '3.2' ref: '3.2_docfixes' - name: '3.1' From 4d8dbaf14be9dddf442080e80b8cf9d7e5bdab0c Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Wed, 9 Aug 2017 10:06:20 -0500 Subject: [PATCH 126/512] Disable commit status checks from internal jenkins jobs --- build.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/build.yaml b/build.yaml index ae3992c1d84..4a5ee0da4ea 100644 --- a/build.yaml +++ b/build.yaml @@ -79,3 +79,4 @@ build: - xunit: - "**/target/surefire-reports/TEST-*.xml" - "**/target/failsafe-reports/TEST-*.xml" +disable_commit_status: true From 8fb95d478b5795f681e1254d87f382fcbc66dfda Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Wed, 9 Aug 2017 10:07:34 -0500 Subject: [PATCH 127/512] Use smaller jenkins instance size --- build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.yaml b/build.yaml index 4a5ee0da4ea..c85bec6f2fe 100644 --- a/build.yaml +++ b/build.yaml @@ -32,7 +32,7 @@ java: - oraclejdk7 - oraclejdk8 os: - - ubuntu/trusty64 + - ubuntu/trusty64/m3.large cassandra: - '1.2' - '2.0' From 2cf253d67c46ac32d62c2e14f00451871b22b502 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Wed, 9 Aug 2017 12:39:51 -0500 Subject: [PATCH 128/512] Fix disable_commit_status callout in build.yaml --- build.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.yaml b/build.yaml index c85bec6f2fe..956c97fe3b2 100644 --- a/build.yaml +++ b/build.yaml @@ -11,6 +11,7 @@ schedules: cassandra: ['1.2', '2.0', '2.1', '2.2', '3.0'] env_vars: | TEST_GROUP="short" + disable_commit_status: true nightly: # Run full suite nightly on change for all primary branches if they have changes. schedule: nightly @@ -19,6 +20,7 @@ schedules: include: ["/\\d+(\\.[\\dx]+)+/"] env_vars: | TEST_GROUP="long" + disable_commit_status: true adhoc: # Adhoc job for non-primary braches that doesn't have a schedule but may be used to run all configs. schedule: adhoc @@ -27,6 +29,7 @@ schedules: exclude: ["/\\d+(\\.[\\dx]+)+/"] env_vars: | TEST_GROUP="long" + disable_commit_status: true java: - openjdk6 - oraclejdk7 @@ -79,4 +82,3 @@ build: - xunit: - "**/target/surefire-reports/TEST-*.xml" - "**/target/failsafe-reports/TEST-*.xml" -disable_commit_status: true From 19f0dca0960d84f451512f7d431179dd152388bd Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 14 Jul 2017 09:56:25 -0500 Subject: [PATCH 129/512] JAVA-1550: FAQ Entry for BusyPoolException --- faq/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/faq/README.md b/faq/README.md index 22f6a5ecf61..60a62864f7d 100644 --- a/faq/README.md +++ b/faq/README.md @@ -216,7 +216,30 @@ fields set to `null`. This also causes tombstones to be inserted unless setting `saveNullFields` option to false. See [Mapper options] for more details. +### I am encountering `BusyPoolException`, what does this mean and how do I avoid it? + +Often while writing a bulk loading program or an application that does many concurrent operations a user may encounter +exceptions such as the following: + +> com.datastax.driver.core.exceptions.BusyPoolException: [/X.X.X.X] Pool is busy (no available connection and the queue +> has reached its max size 256) + +This typically means that your application is submitting too many concurrent requests and not enforcing any limitation +on the number of requests that are being processed at once. A common mistake users might make is firing off a bunch +of queries using `executeAsync` and not waiting for them to complete before submitting more. + +One simple approach to remedying this is to use something like a [Semaphore] to limit the number of concurrent +`executeAsync` requests at a time. Alternatively, one could submit requests X at a time and collect the returned +`ResultSetFuture`s from `executeAsync` and use [Futures.allAsList] and wait on completion of the resulting future +before submitting the next batch. + +See the [Acquisition queue] section of the Pooling section in the manual for explanation of how the driver enqueues +requests when connections are over-utilized. + [Blobs.java]: https://github.com/datastax/java-driver/tree/3.3.0/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java [CASSANDRA-7304]: https://issues.apache.org/jira/browse/CASSANDRA-7304 [Parameters and Binding]: ../manual/statements/prepared/#parameters-and-binding [Mapper options]: ../manual/object_mapper/using/#mapper-options +[Acquisition queue]: ../manual/pooling/#acquisition-queue +[Semaphore]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Semaphore.html +[Futures.allAsList]: https://google.github.io/guava/releases/19.0/api/docs/com/google/common/util/concurrent/Futures.html#allAsList(java.lang.Iterable) \ No newline at end of file From 2b196a94e7c664db22910856cc4e99a9d9156303 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 10 Aug 2017 12:49:02 -0500 Subject: [PATCH 130/512] Version restrict MapperSaveNullFieldsTest Since test depends on timestamp behavior which is inconsistent with 2.0 (may reuse same timestamp), require 2.1. --- .../com/datastax/driver/mapping/MapperSaveNullFieldsTest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java index 0d07c493291..4b9c0bdaeed 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java @@ -17,7 +17,6 @@ import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.CCMTestsSupport; -import com.datastax.driver.core.ProtocolVersion; import com.datastax.driver.core.utils.CassandraVersion; import com.datastax.driver.mapping.Mapper.Option; import com.datastax.driver.mapping.annotations.PartitionKey; @@ -28,6 +27,7 @@ import static org.assertj.core.api.Assertions.assertThat; @SuppressWarnings("unused") +@CassandraVersion("2.1.0") public class MapperSaveNullFieldsTest extends CCMTestsSupport { Mapper mapper; @@ -42,7 +42,6 @@ public void setup() { mapper = new MappingManager(session()).mapper(User.class); } - @CassandraVersion("2.1.0") @Test(groups = "short") void should_save_null_fields_if_requested() { should_save_null_fields(true, Option.saveNullFields(true)); From be7bad8cdecb4fd69c58804e890eae14a78b146b Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 10 Aug 2017 12:51:29 -0500 Subject: [PATCH 131/512] Fix should_fail_when_io_thread_used get requires primary keys, not the actual entity itself. --- .../src/test/java/com/datastax/driver/mapping/MapperTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java index d65615b4f4b..15280c145cf 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperTest.java @@ -396,7 +396,7 @@ public void should_fail_when_io_thread_used() throws Exception { executeFunctionAndTestForException(u, mapper, new Function() { @Override public Thread apply(Void v) { - mapper.get(u); + mapper.get(u.getUserId()); return Thread.currentThread(); } }); From b80f2c6ae511e257c7ffe0d2feb6f53a71417dbb Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 7 Sep 2017 16:13:37 -0500 Subject: [PATCH 132/512] Use precise distribution for java6 and 7 support Default distribution (trusty) does not support openjdk6 or oraclejdk7 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 489a813b9f1..3b8087aa084 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,7 @@ jdk: - oraclejdk7 - oraclejdk8 sudo: false +dist: precise before_install: # Require JDK8 for compiling - jdk_switcher use oraclejdk8 From 1288562c4a154cb0af36aa077a0f0a865d0ccef2 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 8 Sep 2017 10:06:43 -0500 Subject: [PATCH 133/512] Update travis.yml to work with trusty distribution. Precise distribution being phased out, trusty distribution lacks openjdk6 and oraclejdk7. Replace with openjdk7. Jenkins and Appveyor builds will be used to verify jdk6 support. --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3b8087aa084..0292d381cdd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,8 @@ language: java jdk: -- openjdk6 -- oraclejdk7 +- openjdk7 - oraclejdk8 sudo: false -dist: precise before_install: # Require JDK8 for compiling - jdk_switcher use oraclejdk8 From fa359a8f9cb302ea069783936aeb4dcfa9b48bab Mon Sep 17 00:00:00 2001 From: Collin Sauve Date: Fri, 22 Sep 2017 17:52:23 -0400 Subject: [PATCH 134/512] JAVA-1587: Deterministic ordering of columns used in mapper query (#864) --- changelog/README.md | 2 + .../driver/mapping/AliasedMappedProperty.java | 9 +++- .../com/datastax/driver/mapping/Mapper.java | 2 +- .../mapping/MapperSaveNullFieldsTest.java | 53 +++++++++++++++++++ 4 files changed, 64 insertions(+), 2 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 7079ab025bb..3439a457150 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -3,6 +3,8 @@ ### 3.4.0 (In progress) - [bug] JAVA-1555: Include VIEW and CDC in WriteType. +- [improvement] JAVA-1587: Deterministic ordering of columns used in Mapper#saveQuery + ### 3.3.0 diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java index de9a7a003b3..bcf0b9834ed 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AliasedMappedProperty.java @@ -15,7 +15,7 @@ */ package com.datastax.driver.mapping; -class AliasedMappedProperty { +class AliasedMappedProperty implements Comparable { final MappedProperty mappedProperty; final String alias; @@ -25,4 +25,11 @@ class AliasedMappedProperty { this.mappedProperty = (MappedProperty) mappedProperty; this.alias = alias; } + + @Override + public int compareTo(AliasedMappedProperty that) { + String thisColName = mappedProperty.getMappedName(); + String thatColName = that.mappedProperty.getMappedName(); + return thisColName.compareTo(thatColName); + } } diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java index 03a6cd76f85..e2c0d90a3b3 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/Mapper.java @@ -221,7 +221,7 @@ public Statement saveQuery(T entity, Option... options) { } private ListenableFuture saveQueryAsync(T entity, final EnumMap options) { - final Map columnToValue = new HashMap(); + final Map columnToValue = new TreeMap(); final boolean useUnsetForNullValue = !shouldSaveNullFields(options) && manager.protocolVersionAsInt >= 4; final boolean includeColumnsWithNullValue = shouldSaveNullFields(options) || useUnsetForNullValue; diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java index 4b9c0bdaeed..a8a5a2ebb61 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperSaveNullFieldsTest.java @@ -17,10 +17,15 @@ import com.datastax.driver.core.BoundStatement; import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.core.Session; import com.datastax.driver.core.utils.CassandraVersion; import com.datastax.driver.mapping.Mapper.Option; import com.datastax.driver.mapping.annotations.PartitionKey; import com.datastax.driver.mapping.annotations.Table; +import com.google.common.collect.Lists; +import com.google.common.collect.Sets; +import java.util.List; +import java.util.Set; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; @@ -42,6 +47,54 @@ public void setup() { mapper = new MappingManager(session()).mapper(User.class); } + /** + * ensure that queries generated between different sessions consistently generates the same prepared statement + * query for different permutations of null columns being present and saved. + * + * @jira_ticket JAVA-1587 + */ + @Test(groups = "short") + public void should_order_save_query_prepared_statement_columns_consistently() { + List> allSessionStatements = Lists.newArrayList(); + for (int i = 0; i < 5; i++) { + Session session = cluster().connect(keyspace); + Mapper userMapper = new MappingManager(session()).mapper(User.class); + + List statements = Lists.newArrayList(); + + // generate a variety of permutations of columns being present + // both present + statements.add(getQuery(userMapper, false, false, Option.saveNullFields(false))); + // neither name or phone present + statements.add(getQuery(userMapper, true, true, Option.saveNullFields(false))); + // name not present + statements.add(getQuery(userMapper, true, false, Option.saveNullFields(false))); + // phone not present + statements.add(getQuery(userMapper, false, true, Option.saveNullFields(false))); + + allSessionStatements.add(statements); + session.close(); + } + + int statementCount = allSessionStatements.iterator().next().size(); + for (int i = 0; i < statementCount; i++) { + Set uniqueStatements = Sets.newTreeSet(); + for (List statements : allSessionStatements) { + uniqueStatements.add(statements.get(i)); + } + assertThat(uniqueStatements).as("Expected only one statement permutation, must not be ordered consistently.").hasSize(1); + } + } + + private String getQuery(Mapper mapper, boolean nullName, boolean nullPhone, Option... options) { + String newName = nullName ? null : "new_name"; + String newPhone = nullPhone ? null : "new_phone"; + User newUser = new User("test_login", newName, newPhone); + + return ((BoundStatement) mapper.saveQuery(newUser, options)).preparedStatement().getQueryString(); + } + + @CassandraVersion("2.1.0") @Test(groups = "short") void should_save_null_fields_if_requested() { should_save_null_fields(true, Option.saveNullFields(true)); From 1abad4123b05ec1ca44d2ba139257dc311f6c8a4 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 22 Sep 2017 16:54:57 -0500 Subject: [PATCH 135/512] JAVA-1599: exportAsString improvements (sort, format, clustering order) (#863) JAVA-1407 improved exportAsString to ensure that user types were described in topological order. However a side effect of this change is that User Types are not always consistently ordered as it depended on undefined Map ordering behavior which may vary based on JDK implementation. While this is not a functional issue, it would be preferable that the same order were always returned. This implementation ensures this by ordering the adjacency list of a vertex by alphabetical name of the user type. If there are no dependencies between user types, the result of this change is that user types are ordered alphabetically. --- build.yaml | 2 +- changelog/README.md | 1 + .../driver/core/AbstractTableMetadata.java | 29 +-- .../driver/core/AggregateMetadata.java | 5 +- .../datastax/driver/core/DirectedGraph.java | 21 +- .../driver/core/FunctionMetadata.java | 4 +- .../driver/core/KeyspaceMetadata.java | 72 +++++- .../driver/core/MaterializedViewMetadata.java | 24 +- .../datastax/driver/core/SchemaParser.java | 20 +- .../datastax/driver/core/TableMetadata.java | 41 +++- .../com/datastax/driver/core/UserType.java | 13 +- .../driver/core/AggregateMetadataTest.java | 20 +- .../driver/core/DirectedGraphTest.java | 77 ++++-- .../driver/core/ExportAsStringTest.java | 224 ++++++++++++++++++ .../driver/core/FunctionMetadataTest.java | 31 ++- .../driver/core/UnresolvedUserTypeTest.java | 75 ++++-- .../resources/export_as_string_test_2.0.cql | 42 ++++ .../resources/export_as_string_test_2.1.cql | 64 +++++ .../resources/export_as_string_test_2.2.cql | 110 +++++++++ .../resources/export_as_string_test_3.0.cql | 173 ++++++++++++++ .../resources/export_as_string_test_3.11.cql | 179 ++++++++++++++ 21 files changed, 1104 insertions(+), 123 deletions(-) create mode 100644 driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java create mode 100644 driver-core/src/test/resources/export_as_string_test_2.0.cql create mode 100644 driver-core/src/test/resources/export_as_string_test_2.1.cql create mode 100644 driver-core/src/test/resources/export_as_string_test_2.2.cql create mode 100644 driver-core/src/test/resources/export_as_string_test_3.0.cql create mode 100644 driver-core/src/test/resources/export_as_string_test_3.11.cql diff --git a/build.yaml b/build.yaml index 956c97fe3b2..9c9e7860806 100644 --- a/build.yaml +++ b/build.yaml @@ -42,7 +42,7 @@ cassandra: - '2.1' - '2.2' - '3.0' - - '3.10' + - '3.11' build: - script: | . /usr/local/bin/jdk_switcher.sh diff --git a/changelog/README.md b/changelog/README.md index 3439a457150..a49dabc82da 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -3,6 +3,7 @@ ### 3.4.0 (In progress) - [bug] JAVA-1555: Include VIEW and CDC in WriteType. +- [bug] JAVA-1599: exportAsString improvements (sort, format, clustering order) - [improvement] JAVA-1587: Deterministic ordering of columns used in Mapper#saveQuery diff --git a/driver-core/src/main/java/com/datastax/driver/core/AbstractTableMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/AbstractTableMetadata.java index ee8b9205386..e79ec65cf37 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AbstractTableMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AbstractTableMetadata.java @@ -33,6 +33,14 @@ public int compare(ColumnMetadata c1, ColumnMetadata c2) { } }; + // comparator for ordering tables and views by name. + static final Comparator byNameComparator = new Comparator() { + @Override + public int compare(AbstractTableMetadata o1, AbstractTableMetadata o2) { + return o1.getName().compareTo(o2.getName()); + } + }; + static final Predicate isAscending = new Predicate() { @Override public boolean apply(ClusteringOrder o) { @@ -237,10 +245,10 @@ public String asCQLQuery() { protected StringBuilder appendOptions(StringBuilder sb, boolean formatted) { // Options - sb.append(" WITH "); + sb.append("WITH "); if (options.isCompactStorage()) and(sb.append("COMPACT STORAGE"), formatted); - if (!Iterables.all(clusteringOrder, isAscending)) + if (!clusteringOrder.isEmpty()) and(appendClusteringOrder(sb), formatted); sb.append("read_repair_chance = ").append(options.getReadRepairChance()); and(sb, formatted).append("dclocal_read_repair_chance = ").append(options.getLocalReadRepairChance()); @@ -285,7 +293,7 @@ private StringBuilder appendClusteringOrder(StringBuilder sb) { sb.append("CLUSTERING ORDER BY ("); for (int i = 0; i < clusteringColumns.size(); i++) { if (i > 0) sb.append(", "); - sb.append(clusteringColumns.get(i).getName()).append(' ').append(clusteringOrder.get(i)); + sb.append(Metadata.quoteIfNecessary(clusteringColumns.get(i).getName())).append(' ').append(clusteringOrder.get(i)); } return sb.append(')'); } @@ -310,18 +318,7 @@ private static String formatOptionMap(Map m) { } private StringBuilder and(StringBuilder sb, boolean formatted) { - return newLine(sb, formatted).append(spaces(2, formatted)).append(" AND "); - } - - static String spaces(int n, boolean formatted) { - if (!formatted) - return ""; - - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < n; i++) - sb.append(' '); - - return sb.toString(); + return spaceOrNewLine(sb, formatted).append("AND "); } static StringBuilder newLine(StringBuilder sb, boolean formatted) { @@ -331,7 +328,7 @@ static StringBuilder newLine(StringBuilder sb, boolean formatted) { } static StringBuilder spaceOrNewLine(StringBuilder sb, boolean formatted) { - sb.append(formatted ? '\n' : ' '); + sb.append(formatted ? "\n " : ' '); return sb; } diff --git a/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java index bf8e6887943..a08f624d0d7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/AggregateMetadata.java @@ -202,8 +202,9 @@ private String asCQLQuery(boolean formatted) { TableMetadata.spaceOrNewLine(sb, formatted) .append("SFUNC ") - .append(Metadata.quoteIfNecessary(stateFuncSimpleName)) - .append(" STYPE ") + .append(Metadata.quoteIfNecessary(stateFuncSimpleName)); + TableMetadata.spaceOrNewLine(sb, formatted) + .append("STYPE ") .append(stateType.asFunctionParameterString()); if (finalFuncSimpleName != null) diff --git a/driver-core/src/main/java/com/datastax/driver/core/DirectedGraph.java b/driver-core/src/main/java/com/datastax/driver/core/DirectedGraph.java index 5987c511d71..a0aa7cdca6f 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DirectedGraph.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DirectedGraph.java @@ -33,8 +33,10 @@ class DirectedGraph { final Map vertices; final Multimap adjacencyList; boolean wasSorted; + final Comparator comparator; - DirectedGraph(List vertices) { + DirectedGraph(Comparator comparator, List vertices) { + this.comparator = comparator; this.vertices = Maps.newHashMapWithExpectedSize(vertices.size()); this.adjacencyList = HashMultimap.create(); @@ -43,8 +45,8 @@ class DirectedGraph { } } - DirectedGraph(V... vertices) { - this(Arrays.asList(vertices)); + DirectedGraph(Comparator comparator, V... vertices) { + this(comparator, Arrays.asList(vertices)); } /** @@ -65,16 +67,21 @@ List topologicalSort() { Queue queue = new LinkedList(); - for (Map.Entry entry : vertices.entrySet()) { - if (entry.getValue() == 0) - queue.add(entry.getKey()); + // Sort vertices so order of evaluation is always the same (instead of depending on undefined map order behavior) + List orderedVertices = new ArrayList(vertices.keySet()); + Collections.sort(orderedVertices, comparator); + for (V v : orderedVertices) { + if (vertices.get(v) == 0) + queue.add(v); } List result = Lists.newArrayList(); while (!queue.isEmpty()) { V vertex = queue.remove(); result.add(vertex); - for (V successor : adjacencyList.get(vertex)) { + List adjacentVertices = new ArrayList(adjacencyList.get(vertex)); + Collections.sort(adjacentVertices, comparator); + for (V successor : adjacentVertices) { if (decrementAndGetCount(successor) == 0) queue.add(successor); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java index 22221728456..f229ee1d8fe 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/FunctionMetadata.java @@ -174,11 +174,9 @@ private String asCQLQuery(boolean formatted) { first = false; else sb.append(','); - TableMetadata.newLine(sb, formatted); String name = entry.getKey(); DataType type = entry.getValue(); sb - .append(TableMetadata.spaces(4, formatted)) .append(Metadata.quoteIfNecessary(name)) .append(' ') .append(type.asFunctionParameterString()); @@ -190,7 +188,7 @@ private String asCQLQuery(boolean formatted) { TableMetadata.spaceOrNewLine(sb, formatted) .append("RETURNS ") - .append(returnType); + .append(returnType.asFunctionParameterString()); TableMetadata.spaceOrNewLine(sb, formatted) .append("LANGUAGE ") diff --git a/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java index 45ce2977dbf..d827cd9fffd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java @@ -16,6 +16,7 @@ package com.datastax.driver.core; import com.google.common.annotations.VisibleForTesting; +import com.google.common.collect.ImmutableSortedSet; import com.google.common.collect.Lists; import java.util.*; @@ -243,6 +244,29 @@ AggregateMetadata removeAggregate(String fullName) { return aggregates.remove(fullName); } + // comparators for ordering types in cqlsh output. + + private static final Comparator typeByName = new Comparator() { + @Override + public int compare(UserType o1, UserType o2) { + return o1.getTypeName().compareTo(o2.getTypeName()); + } + }; + + private static final Comparator functionByName = new Comparator() { + @Override + public int compare(FunctionMetadata o1, FunctionMetadata o2) { + return o1.getSimpleName().compareTo(o2.getSimpleName()); + } + }; + + private static final Comparator aggregateByName = new Comparator() { + @Override + public int compare(AggregateMetadata o1, AggregateMetadata o2) { + return o1.getSimpleName().compareTo(o2.getSimpleName()); + } + }; + /** * Returns a {@code String} containing CQL queries representing this * keyspace and the user types and tables it contains. @@ -262,21 +286,61 @@ public String exportAsString() { sb.append(asCQLQuery()).append('\n'); - for (UserType udt : userTypes.values()) + // include types, tables, views, functions and aggregates, each ordered by name, with one small exception + // being that user types are ordered topologically and then by name within same level. + for (UserType udt : getSortedUserTypes()) sb.append('\n').append(udt.exportAsString()).append('\n'); - for (TableMetadata tm : tables.values()) + for (AbstractTableMetadata tm : ImmutableSortedSet.orderedBy(AbstractTableMetadata.byNameComparator).addAll(tables.values()).build()) sb.append('\n').append(tm.exportAsString()).append('\n'); - for (FunctionMetadata fm : functions.values()) + for (FunctionMetadata fm : ImmutableSortedSet.orderedBy(functionByName).addAll(functions.values()).build()) sb.append('\n').append(fm.exportAsString()).append('\n'); - for (AggregateMetadata am : aggregates.values()) + for (AggregateMetadata am : ImmutableSortedSet.orderedBy(aggregateByName).addAll(aggregates.values()).build()) sb.append('\n').append(am.exportAsString()).append('\n'); return sb.toString(); } + private List getSortedUserTypes() { + // rebuilds dependency tree of user types so they may be sorted within each dependency level. + List unsortedTypes = new ArrayList(userTypes.values()); + DirectedGraph graph = new DirectedGraph(typeByName, unsortedTypes); + for (UserType from : unsortedTypes) { + for (UserType to : unsortedTypes) { + if (from != to && dependsOn(to, from)) + graph.addEdge(from, to); + } + } + return graph.topologicalSort(); + } + + private boolean dependsOn(UserType udt1, UserType udt2) { + for (String fieldName : udt1.getFieldNames()) { + DataType fieldType = udt1.getFieldType(fieldName); + if (references(fieldType, udt2)) + return true; + } + return false; + } + + private boolean references(DataType dataType, DataType udtType) { + if (dataType.equals(udtType)) + return true; + for (DataType arg : dataType.getTypeArguments()) { + if (references(arg, udtType)) + return true; + } + if (dataType instanceof TupleType) { + for (DataType arg : ((TupleType) dataType).getComponentTypes()) { + if (references(arg, udtType)) + return true; + } + } + return false; + } + /** * Returns a CQL query representing this keyspace. *

    diff --git a/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java index e232e248083..f5d102d0424 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/MaterializedViewMetadata.java @@ -162,34 +162,32 @@ protected String asCQLQuery(boolean formatted) { StringBuilder sb = new StringBuilder(); sb.append("CREATE MATERIALIZED VIEW ") .append(keyspaceName).append('.').append(viewName) - .append(" AS "); - newLine(sb, formatted); + .append(" AS"); // SELECT - sb.append("SELECT "); + spaceOrNewLine(sb, formatted).append("SELECT "); if (includeAllColumns) { - sb.append(" * "); + sb.append("*"); } else { Iterator it = columns.values().iterator(); while (it.hasNext()) { ColumnMetadata column = it.next(); - sb.append(spaces(4, formatted)).append(Metadata.quoteIfNecessary(column.getName())); - if (it.hasNext()) sb.append(","); - sb.append(" "); - newLine(sb, formatted); + sb.append(Metadata.quoteIfNecessary(column.getName())); + if (it.hasNext()) sb.append(", "); } } // FROM - newLine(sb.append("FROM ").append(keyspaceName).append('.').append(baseTableName).append(" "), formatted); + spaceOrNewLine(sb, formatted).append("FROM ").append(keyspaceName).append('.').append(baseTableName); // WHERE // the CQL grammar allows missing WHERE clauses, although C* currently disallows it - if (whereClause != null && !whereClause.isEmpty()) - newLine(sb.append("WHERE ").append(whereClause).append(' '), formatted); + if (whereClause != null && !whereClause.isEmpty()) { + spaceOrNewLine(sb, formatted).append("WHERE ").append(whereClause); + } // PK - sb.append("PRIMARY KEY ("); + spaceOrNewLine(sb, formatted).append("PRIMARY KEY ("); if (partitionKey.size() == 1) { sb.append(Metadata.quoteIfNecessary(partitionKey.get(0).getName())); } else { @@ -208,6 +206,8 @@ protected String asCQLQuery(boolean formatted) { sb.append(", ").append(Metadata.quoteIfNecessary(cm.getName())); sb.append(')'); + // append 3 extra spaces if formatted to align WITH. + spaceOrNewLine(sb, formatted); appendOptions(sb, formatted); return sb.toString(); diff --git a/driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java b/driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java index 09ea0e33037..e43e4dcac57 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SchemaParser.java @@ -663,6 +663,24 @@ else if (targetType == AGGREGATE) return whereClause; } + // Used by maybeSortUdts to sort at each dependency group alphabetically. + private static final Comparator sortByTypeName = new Comparator() { + @Override + public int compare(Row o1, Row o2) { + String type1 = o1.getString(UserType.TYPE_NAME); + String type2 = o2.getString(UserType.TYPE_NAME); + + if (type1 == null && type2 == null) { + return 0; + } else if (type2 == null) { + return 1; + } else if (type1 == null) { + return -1; + } else { + return type1.compareTo(type2); + } + } + }; @Override protected List maybeSortUdts(List udtRows, Cluster cluster, String keyspace) { @@ -671,7 +689,7 @@ protected List maybeSortUdts(List udtRows, Cluster cluster, String key // For C* 3+, user-defined type resolution must be done in proper order // to guarantee that nested UDTs get resolved - DirectedGraph graph = new DirectedGraph(udtRows); + DirectedGraph graph = new DirectedGraph(sortByTypeName, udtRows); for (Row from : udtRows) { for (Row to : udtRows) { if (from != to && dependsOn(to, from, cluster, keyspace)) diff --git a/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java index c8d133b0833..6cde2b5959d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/TableMetadata.java @@ -16,6 +16,7 @@ package com.datastax.driver.core; import com.datastax.driver.core.utils.MoreObjects; +import com.google.common.collect.ImmutableSortedSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -384,12 +385,30 @@ public String exportAsString() { sb.append(super.exportAsString()); - for (IndexMetadata index : indexes.values()) { - sb.append('\n').append(index.asCQLQuery()); + if (!indexes.isEmpty()) { + sb.append('\n'); + + Iterator indexIt = indexes.values().iterator(); + while (indexIt.hasNext()) { + IndexMetadata index = indexIt.next(); + sb.append('\n').append(index.asCQLQuery()); + if (indexIt.hasNext()) { + sb.append('\n'); + } + } } - for (MaterializedViewMetadata view : views.values()) { - sb.append('\n').append(view.asCQLQuery()); + if (!views.isEmpty()) { + sb.append('\n'); + + Iterator viewsIt = ImmutableSortedSet.orderedBy(AbstractTableMetadata.byNameComparator).addAll(views.values()).build().iterator(); + while (viewsIt.hasNext()) { + AbstractTableMetadata view = viewsIt.next(); + sb.append('\n').append(view.exportAsString()); + if (viewsIt.hasNext()) { + sb.append('\n'); + } + } } return sb.toString(); @@ -399,12 +418,16 @@ public String exportAsString() { protected String asCQLQuery(boolean formatted) { StringBuilder sb = new StringBuilder(); sb.append("CREATE TABLE ").append(Metadata.quoteIfNecessary(keyspace.getName())).append('.').append(Metadata.quoteIfNecessary(name)).append(" ("); - newLine(sb, formatted); - for (ColumnMetadata cm : columns.values()) - newLine(sb.append(spaces(4, formatted)).append(cm).append(',').append(spaces(1, !formatted)), formatted); + if (formatted) { + spaceOrNewLine(sb, true); + } + for (ColumnMetadata cm : columns.values()) { + sb.append(cm).append(','); + spaceOrNewLine(sb, formatted); + } // PK - sb.append(spaces(4, formatted)).append("PRIMARY KEY ("); + sb.append("PRIMARY KEY ("); if (partitionKey.size() == 1) { sb.append(Metadata.quoteIfNecessary(partitionKey.get(0).getName())); } else { @@ -425,7 +448,7 @@ protected String asCQLQuery(boolean formatted) { newLine(sb, formatted); // end PK - sb.append(")"); + sb.append(") "); appendOptions(sb, formatted); return sb.toString(); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/UserType.java b/driver-core/src/main/java/com/datastax/driver/core/UserType.java index 25142374c8c..fc2d8457ff4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/UserType.java +++ b/driver-core/src/main/java/com/datastax/driver/core/UserType.java @@ -278,12 +278,17 @@ private String asCQLQuery(boolean formatted) { StringBuilder sb = new StringBuilder(); sb.append("CREATE TYPE ").append(Metadata.quoteIfNecessary(keyspace)).append('.').append(Metadata.quoteIfNecessary(typeName)).append(" ("); - TableMetadata.newLine(sb, formatted); + if (formatted) { + TableMetadata.spaceOrNewLine(sb, true); + } for (int i = 0; i < byIdx.length; i++) { - sb.append(TableMetadata.spaces(4, formatted)).append(byIdx[i]); - if (i < byIdx.length - 1) + sb.append(byIdx[i]); + if (i < byIdx.length - 1) { sb.append(','); - TableMetadata.newLine(sb, formatted); + TableMetadata.spaceOrNewLine(sb, formatted); + } else { + TableMetadata.newLine(sb, formatted); + } } return sb.append(");").toString(); diff --git a/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java index 6dbdde7abaf..d567b777580 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/AggregateMetadataTest.java @@ -51,8 +51,9 @@ public void should_parse_and_format_aggregate_with_initcond_and_no_finalfunc() { assertThat(aggregate.getStateType()).isEqualTo(text()); assertThat(aggregate.toString()).isEqualTo(cqlAggregate); assertThat(aggregate.exportAsString()).isEqualTo(String.format("CREATE AGGREGATE %s.cat_tos(int)\n" - + "SFUNC cat STYPE text\n" - + "INITCOND '0';", this.keyspace)); + + " SFUNC cat\n" + + " STYPE text\n" + + " INITCOND '0';", this.keyspace)); } @Test(groups = "short") @@ -78,8 +79,9 @@ public void should_parse_and_format_aggregate_with_no_arguments() { assertThat(aggregate.getStateType()).isEqualTo(cint()); assertThat(aggregate.toString()).isEqualTo(cqlAggregate); assertThat(aggregate.exportAsString()).isEqualTo(String.format("CREATE AGGREGATE %s.mycount()\n" - + "SFUNC inc STYPE int\n" - + "INITCOND 0;", this.keyspace)); + + " SFUNC inc\n" + + " STYPE int\n" + + " INITCOND 0;", this.keyspace)); } @Test(groups = "short") @@ -108,9 +110,10 @@ public void should_parse_and_format_aggregate_with_final_function() { assertThat(aggregate.getStateType()).isEqualTo(cint()); assertThat(aggregate.toString()).isEqualTo(cqlAggregate); assertThat(aggregate.exportAsString()).isEqualTo(String.format("CREATE AGGREGATE %s.prettysum(int)\n" - + "SFUNC plus STYPE int\n" - + "FINALFUNC announce\n" - + "INITCOND 0;", this.keyspace)); + + " SFUNC plus\n" + + " STYPE int\n" + + " FINALFUNC announce\n" + + " INITCOND 0;", this.keyspace)); } @Test(groups = "short") @@ -136,7 +139,8 @@ public void should_parse_and_format_aggregate_with_no_initcond() { assertThat(aggregate.getStateType()).isEqualTo(cint()); assertThat(aggregate.toString()).isEqualTo(cqlAggregate); assertThat(aggregate.exportAsString()).isEqualTo(String.format("CREATE AGGREGATE %s.sum(int)\n" - + "SFUNC plus2 STYPE int;", this.keyspace)); + + " SFUNC plus2\n" + + " STYPE int;", this.keyspace)); } @Test(groups = "short") diff --git a/driver-core/src/test/java/com/datastax/driver/core/DirectedGraphTest.java b/driver-core/src/test/java/com/datastax/driver/core/DirectedGraphTest.java index 65d713ccd55..9341d99a12d 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/DirectedGraphTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/DirectedGraphTest.java @@ -16,22 +16,31 @@ package com.datastax.driver.core; import com.datastax.driver.core.exceptions.DriverInternalError; -import org.testng.annotations.Test; - +import java.util.Comparator; import java.util.List; +import org.testng.annotations.Test; import static org.assertj.core.api.Assertions.assertThat; public class DirectedGraphTest { + + private Comparator alphaComparator = new Comparator() { + + @Override + public int compare(String o1, String o2) { + return o1.compareTo(o2); + } + }; + @Test(groups = "unit") public void should_sort_empty_graph() { - DirectedGraph g = new DirectedGraph(); + DirectedGraph g = new DirectedGraph(alphaComparator); assertThat(g.topologicalSort()).isEmpty(); } @Test(groups = "unit") public void should_sort_graph_with_one_node() { - DirectedGraph g = new DirectedGraph("A"); + DirectedGraph g = new DirectedGraph(alphaComparator, "A"); assertThat(g.topologicalSort()) .containsExactly("A"); } @@ -47,7 +56,7 @@ public void should_sort_complex_graph() { // B C // | // A - DirectedGraph g = new DirectedGraph("A", "B", "C", "D", "E", "F", "G", "H"); + DirectedGraph g = new DirectedGraph(alphaComparator, "A", "B", "C", "D", "E", "F", "G", "H"); g.addEdge("H", "F"); g.addEdge("G", "E"); g.addEdge("H", "D"); @@ -58,24 +67,54 @@ public void should_sort_complex_graph() { g.addEdge("D", "B"); g.addEdge("B", "A"); - // Topological sort order should be : GH,FE,D,CB,A - // There's no guarantee on the order within the same level, so we use sublists: + // Topological sort order should be : GH,E,F,D,BC,A List sorted = g.topologicalSort(); - assertThat(sorted.subList(0, 2)) - .contains("G", "H"); - assertThat(sorted.subList(2, 4)) - .contains("F", "E"); - assertThat(sorted.subList(4, 5)) - .contains("D"); - assertThat(sorted.subList(5, 7)) - .contains("C", "B"); - assertThat(sorted.subList(7, 8)) - .contains("A"); + assertThat(sorted).containsExactly("G", "H", "E", "F", "D", "B", "C", "A"); + } + + @Test(groups = "unit") + public void should_sort_complex_custom_comparator() { + // Version of should_sort_complex_graph using a custom comparator based on ordering largest values first. + // This is counter to how hashmaps should usually behave, so this should help ensure that the comparator is + // being used. + Comparator highFirst = new Comparator() { + @Override + public int compare(Integer o1, Integer o2) { + return o2 - o1; + } + }; + + // sort graph and use a alphaComparator that favors larger values ordered first. + // 7 6 + // / \ /\ + // 5 | 10 + // \ / / + // 9 / + // / \/ + // 1 2 + // | + // 0 + DirectedGraph g = new DirectedGraph(highFirst, 0, 1, 2, 9, 10, 5, 6, 7); + g.addEdge(7, 5); + g.addEdge(6, 10); + g.addEdge(7, 9); + g.addEdge(5, 9); + g.addEdge(6, 9); + g.addEdge(9, 2); + g.addEdge(10, 2); + g.addEdge(9, 1); + g.addEdge(1, 0); + + // Topological sort order should be : [7,6],[5],[10],[9],[2,1],[0] + // 5 comes before 10 even though they appear at the same depth. This happens because 5's (7) dependency + // is evaluated before 10's (6), so it is placed first. + List sorted = g.topologicalSort(); + assertThat(sorted).containsExactly(7, 6, 5, 10, 9, 2, 1, 0); } @Test(groups = "unit", expectedExceptions = DriverInternalError.class) public void should_fail_to_sort_if_graph_has_a_cycle() { - DirectedGraph g = new DirectedGraph("A", "B", "C"); + DirectedGraph g = new DirectedGraph(alphaComparator, "A", "B", "C"); g.addEdge("A", "B"); g.addEdge("B", "C"); g.addEdge("C", "B"); @@ -85,7 +124,7 @@ public void should_fail_to_sort_if_graph_has_a_cycle() { @Test(groups = "unit", expectedExceptions = DriverInternalError.class) public void should_fail_to_sort_if_graph_is_a_cycle() { - DirectedGraph g = new DirectedGraph("A", "B", "C"); + DirectedGraph g = new DirectedGraph(alphaComparator, "A", "B", "C"); g.addEdge("A", "B"); g.addEdge("B", "C"); g.addEdge("C", "A"); diff --git a/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java b/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java new file mode 100644 index 00000000000..7ebb9e36aef --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java @@ -0,0 +1,224 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import com.datastax.driver.core.schemabuilder.SchemaBuilder; +import com.datastax.driver.core.utils.CassandraVersion; +import com.google.common.collect.ImmutableMap; +import com.google.common.io.ByteStreams; +import com.google.common.io.Closer; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.PrintStream; +import java.util.Map; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.Test; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +@CassandraVersion("2.0") +@CCMConfig(config = "enable_user_defined_functions:true") +public class ExportAsStringTest extends CCMTestsSupport { + + private static final Logger logger = LoggerFactory.getLogger(ExportAsStringTest.class); + + /** + * Creates a keyspace using a variety of features and ensures {@link KeyspaceMetadata#exportAsString()} + * contains the expected data in the expected order. This is not exhaustive, but covers quite a bit of different + * scenarios (materialized views, aggregates, functions, nested UDTs, etc.). + *

    + * The test also verifies that the generated schema is the same whether the keyspace and its schema was created + * during the lifecycle of the cluster or before connecting. + *

    + * Note that this test might be fragile in the future if default option values change in cassandra. In order to + * deal with new features, we create a schema for each tested C* version, and if one is not present the test + * is failed. + */ + @Test(groups = "short") + public void create_schema_and_ensure_exported_cql_is_as_expected() { + String keyspace = "complex_ks"; + Map replicationOptions = ImmutableMap.of("class", "SimpleStrategy", "replication_factor", 1); + + // create keyspace + session().execute(SchemaBuilder.createKeyspace(keyspace).with().replication(replicationOptions)); + + // create session from this keyspace. + Session session = cluster().connect(keyspace); + + KeyspaceMetadata ks; + + // udts require 2.1+ + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.1")) >= 0) { + // Usertype 'ztype' with two columns. Given name to ensure that even though it has an alphabetically + // later name, it shows up before other user types ('ctype') that depend on it. + session.execute(SchemaBuilder.createType("ztype") + .addColumn("c", DataType.text()).addColumn("a", DataType.cint())); + + // Usertype 'xtype' with two columns. At same level as 'ztype' since both are depended on by ctype, should + // show up before 'ztype' because it's alphabetically before, even though it was created after. + session.execute(SchemaBuilder.createType("xtype") + .addColumn("d", DataType.text())); + + ks = cluster().getMetadata().getKeyspace(keyspace); + + // Usertype 'ctype' which depends on both ztype and xtype, therefore ztype and xtype should show up earlier. + session.execute(SchemaBuilder.createType("ctype") + .addColumn("z", ks.getUserType("ztype").copy(true)) + .addColumn("x", ks.getUserType("xtype").copy(true))); + + // Usertype 'btype' which has no dependencies, should show up before 'xtype' and 'ztype' since it's + // alphabetically before. + session.execute(SchemaBuilder.createType("btype").addColumn("a", DataType.text())); + + // Refetch keyspace for < 3.0 schema this is required as a new keyspace metadata reference may be created. + ks = cluster().getMetadata().getKeyspace(keyspace); + + // Usertype 'atype' which depends on 'ctype', so should show up after 'ctype', 'xtype' and 'ztype'. + session.execute(SchemaBuilder.createType("atype") + .addColumn("c", ks.getUserType("ctype").copy(true))); + + // A simple table with a udt column and LCS compaction strategy. + session.execute(SchemaBuilder.createTable("ztable") + .addPartitionKey("zkey", DataType.text()) + .addColumn("a", ks.getUserType("atype").copy(true)) + .withOptions().compactionOptions(SchemaBuilder.leveledStrategy().ssTableSizeInMB(95))); + } else { + // A simple table with LCS compaction strategy. + session.execute(SchemaBuilder.createTable("ztable") + .addPartitionKey("zkey", DataType.text()) + .addColumn("a", DataType.cint()) + .withOptions().compactionOptions(SchemaBuilder.leveledStrategy().ssTableSizeInMB(95))); + } + + // date type requries 2.2+ + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.2")) >= 0) { + // A table that will have materialized views (copied from mv docs) + session.execute(SchemaBuilder.createTable("cyclist_mv").addPartitionKey("cid", DataType.uuid()) + .addColumn("name", DataType.text()) + .addColumn("age", DataType.cint()) + .addColumn("birthday", DataType.date()) + .addColumn("country", DataType.text())); + + // index on table with view, index should be printed first. + session.execute(SchemaBuilder.createIndex("cyclist_by_country") + .onTable("cyclist_mv") + .andColumn("country")); + + // materialized views require 3.0+ + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("3.0")) >= 0) { + // A materialized view for cyclist_mv, reverse clustering. created first to ensure creation order does not + // matter, alphabetical does. + session.execute("CREATE MATERIALIZED VIEW cyclist_by_r_age " + + "AS SELECT age, birthday, name, country " + + "FROM cyclist_mv " + + "WHERE age IS NOT NULL AND cid IS NOT NULL " + + "PRIMARY KEY (age, cid) " + + "WITH CLUSTERING ORDER BY (cid DESC)" + ); + + // A materialized view for cyclist_mv, select * + session.execute("CREATE MATERIALIZED VIEW cyclist_by_a_age " + + "AS SELECT * " + + "FROM cyclist_mv " + + "WHERE age IS NOT NULL AND cid IS NOT NULL " + + "PRIMARY KEY (age, cid)"); + + // A materialized view for cyclist_mv, select columns + session.execute("CREATE MATERIALIZED VIEW cyclist_by_age " + + "AS SELECT age, birthday, name, country " + + "FROM cyclist_mv " + + "WHERE age IS NOT NULL AND cid IS NOT NULL " + + "PRIMARY KEY (age, cid) WITH comment = 'simple view'"); + } + } + + // A table with a secondary index, taken from documentation on secondary index. + session.execute(SchemaBuilder.createTable("rank_by_year_and_name") + .addPartitionKey("race_year", DataType.cint()) + .addPartitionKey("race_name", DataType.text()) + .addClusteringColumn("rank", DataType.cint()) + .addColumn("cyclist_name", DataType.text())); + + session.execute(SchemaBuilder.createIndex("ryear") + .onTable("rank_by_year_and_name") + .andColumn("race_year")); + + session.execute(SchemaBuilder.createIndex("rrank") + .onTable("rank_by_year_and_name") + .andColumn("rank")); + + // udfs and udas require 2.22+ + if (ccm().getCassandraVersion().compareTo(VersionNumber.parse("2.2")) >= 0) { + // UDFs + session.execute("CREATE OR REPLACE FUNCTION avgState ( state tuple, val int ) CALLED ON NULL INPUT RETURNS tuple LANGUAGE java AS \n" + + " 'if (val !=null) { state.setInt(0, state.getInt(0)+1); state.setLong(1, state.getLong(1)+val.intValue()); } return state;';"); + session.execute("CREATE OR REPLACE FUNCTION avgFinal ( state tuple ) CALLED ON NULL INPUT RETURNS double LANGUAGE java AS \n" + + " 'double r = 0; if (state.getInt(0) == 0) return null; r = state.getLong(1); r /= state.getInt(0); return Double.valueOf(r);';"); + + // UDAs + session.execute("CREATE AGGREGATE IF NOT EXISTS mean ( int ) \n" + + "SFUNC avgState STYPE tuple FINALFUNC avgFinal INITCOND (0,0);"); + session.execute("CREATE AGGREGATE IF NOT EXISTS average ( int ) \n" + + "SFUNC avgState STYPE tuple FINALFUNC avgFinal INITCOND (0,0);"); + } + + ks = cluster().getMetadata().getKeyspace(keyspace); + + // validate that the exported schema matches what was expected exactly. + assertThat(ks.exportAsString().trim()).isEqualTo(getExpectedCqlString()); + + // Also validate that when you create a Cluster with schema already created that the exported string + // is the same. + Cluster newCluster = this.createClusterBuilderNoDebouncing() + .addContactPointsWithPorts(this.getContactPointsWithPorts()) + .build(); + try { + newCluster.init(); + ks = newCluster.getMetadata().getKeyspace(keyspace); + assertThat(ks.exportAsString().trim()).isEqualTo(getExpectedCqlString()); + } finally { + newCluster.close(); + } + } + + private String getExpectedCqlString() { + String majorMinor = ccm().getCassandraVersion().getMajor() + "." + ccm().getCassandraVersion().getMinor(); + String resourceName = "/export_as_string_test_" + majorMinor + ".cql"; + + Closer closer = Closer.create(); + try { + InputStream is = ExportAsStringTest.class.getResourceAsStream(resourceName); + closer.register(is); + ByteArrayOutputStream baos = new ByteArrayOutputStream(); + PrintStream ps = new PrintStream(baos); + ByteStreams.copy(is, ps); + return baos.toString().trim(); + } catch (IOException e) { + logger.warn("Failure to read {}", resourceName, e); + fail("Unable to read " + resourceName + " is it defined?"); + } finally { + try { + closer.close(); + } catch (IOException e) { // no op + logger.warn("Failure closing streams", e); + } + } + return ""; + } +} diff --git a/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataTest.java index 83aee5a348c..317103ae37e 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/FunctionMetadataTest.java @@ -50,13 +50,11 @@ public void should_parse_and_format_simple_function() { assertThat(function.toString()) .isEqualTo(cql); assertThat(function.exportAsString()) - .isEqualTo(String.format("CREATE FUNCTION %s.plus(\n" - + " s int,\n" - + " v int)\n" - + "RETURNS NULL ON NULL INPUT\n" - + "RETURNS int\n" - + "LANGUAGE java\n" - + "AS 'return s+v;';", this.keyspace)); + .isEqualTo(String.format("CREATE FUNCTION %s.plus(s int,v int)\n" + + " RETURNS NULL ON NULL INPUT\n" + + " RETURNS int\n" + + " LANGUAGE java\n" + + " AS 'return s+v;';", this.keyspace)); } @Test(groups = "short") @@ -81,10 +79,10 @@ public void should_parse_and_format_function_with_no_arguments() { .isEqualTo(cql); assertThat(function.exportAsString()) .isEqualTo(String.format("CREATE FUNCTION %s.pi()\n" - + "CALLED ON NULL INPUT\n" - + "RETURNS double\n" - + "LANGUAGE java\n" - + "AS 'return Math.PI;';", this.keyspace)); + + " CALLED ON NULL INPUT\n" + + " RETURNS double\n" + + " LANGUAGE java\n" + + " AS 'return Math.PI;';", this.keyspace)); } @Test(groups = "short") @@ -154,12 +152,11 @@ public void should_parse_and_format_functions_with_complex_arguments() { assertThat(function.toString()) .isEqualTo(cql); assertThat(function.exportAsString()) - .isEqualTo(String.format("CREATE FUNCTION %s.complex(\n" - + " x tuple, map>)\n" - + "RETURNS NULL ON NULL INPUT\n" - + "RETURNS int\n" - + "LANGUAGE java\n" - + "AS 'return 42;';", this.keyspace)); + .isEqualTo(String.format("CREATE FUNCTION %s.complex(x tuple, map>)\n" + + " RETURNS NULL ON NULL INPUT\n" + + " RETURNS int\n" + + " LANGUAGE java\n" + + " AS 'return 42;';", this.keyspace)); } @Override diff --git a/driver-core/src/test/java/com/datastax/driver/core/UnresolvedUserTypeTest.java b/driver-core/src/test/java/com/datastax/driver/core/UnresolvedUserTypeTest.java index d721d61c9fd..ba7ae18e2da 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/UnresolvedUserTypeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/UnresolvedUserTypeTest.java @@ -16,18 +16,57 @@ package com.datastax.driver.core; import com.datastax.driver.core.utils.CassandraVersion; -import org.testng.annotations.Test; - import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; +import org.testng.annotations.Test; import static com.datastax.driver.core.Assertions.assertThat; -import static com.datastax.driver.core.DataType.*; +import static com.datastax.driver.core.DataType.cint; +import static com.datastax.driver.core.DataType.list; +import static com.datastax.driver.core.DataType.map; +import static com.datastax.driver.core.DataType.set; @CassandraVersion("3.0") public class UnresolvedUserTypeTest extends CCMTestsSupport { + private static final String KEYSPACE = "unresolved_user_type_test"; + + private static final String EXPECTED_SCHEMA = String.format("CREATE KEYSPACE %s WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND DURABLE_WRITES = true;\n" + + "\n" + + "CREATE TYPE %s.g (\n" + + " f1 int\n" + + ");\n" + + "\n" + + "CREATE TYPE %s.h (\n" + + " f1 int\n" + + ");\n" + + "\n" + + "CREATE TYPE %s.\"E\" (\n" + + " f1 frozen>>\n" + + ");\n" + + "\n" + + "CREATE TYPE %s.\"F\" (\n" + + " f1 frozen<%s.h>\n" + + ");\n" + + "\n" + + "CREATE TYPE %s.\"D\" (\n" + + " f1 frozen>\n" + + ");\n" + + "\n" + + "CREATE TYPE %s.\"B\" (\n" + + " f1 frozen>>\n" + + ");\n" + + "\n" + + "CREATE TYPE %s.\"C\" (\n" + + " f1 frozen, frozen<%s.\"D\">>>\n" + + ");\n" + + "\n" + + "CREATE TYPE %s.\"A\" (\n" + + " f1 frozen<%s.\"C\">\n" + + ");\n", KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE, + KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE, KEYSPACE); + @Override public void onTestContextInitialized() { execute( @@ -45,16 +84,17 @@ Creates the following acyclic graph (edges directed upwards | A - Topological sort order should be : GH,FE,D,CB,A + Topological sort order should be : gh,FE,D,CB,A */ - String.format("CREATE TYPE %s.h (f1 int)", keyspace), - String.format("CREATE TYPE %s.g (f1 int)", keyspace), - String.format("CREATE TYPE %s.\"F\" (f1 frozen)", keyspace), - String.format("CREATE TYPE %s.\"E\" (f1 frozen>)", keyspace), - String.format("CREATE TYPE %s.\"D\" (f1 frozen>)", keyspace), - String.format("CREATE TYPE %s.\"C\" (f1 frozen>)", keyspace), - String.format("CREATE TYPE %s.\"B\" (f1 frozen>)", keyspace), - String.format("CREATE TYPE %s.\"A\" (f1 frozen<\"C\">)", keyspace) + "CREATE KEYSPACE unresolved_user_type_test WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '1'}", + String.format("CREATE TYPE %s.h (f1 int)", KEYSPACE), + String.format("CREATE TYPE %s.g (f1 int)", KEYSPACE), + String.format("CREATE TYPE %s.\"F\" (f1 frozen)", KEYSPACE), + String.format("CREATE TYPE %s.\"E\" (f1 frozen>)", KEYSPACE), + String.format("CREATE TYPE %s.\"D\" (f1 frozen>)", KEYSPACE), + String.format("CREATE TYPE %s.\"C\" (f1 frozen>)", KEYSPACE), + String.format("CREATE TYPE %s.\"B\" (f1 frozen>)", KEYSPACE), + String.format("CREATE TYPE %s.\"A\" (f1 frozen<\"C\">)", KEYSPACE) ); } @@ -75,7 +115,7 @@ public void should_resolve_nested_user_types() throws ExecutionException, Interr } private void checkUserTypes(Metadata metadata) { - KeyspaceMetadata keyspaceMetadata = metadata.getKeyspace(keyspace); + KeyspaceMetadata keyspaceMetadata = metadata.getKeyspace(KEYSPACE); UserType a = keyspaceMetadata.getUserType("\"A\""); UserType b = keyspaceMetadata.getUserType("\"B\""); @@ -106,12 +146,7 @@ private void checkUserTypes(Metadata metadata) { String script = keyspaceMetadata.exportAsString(); - assertThat(script.indexOf(a.exportAsString())).isGreaterThan(script.indexOf(b.exportAsString())).isGreaterThan(script.indexOf(c.exportAsString())); - assertThat(script.indexOf(b.exportAsString())).isGreaterThan(script.indexOf(d.exportAsString())); - assertThat(script.indexOf(c.exportAsString())).isGreaterThan(script.indexOf(d.exportAsString())); - assertThat(script.indexOf(d.exportAsString())).isGreaterThan(script.indexOf(e.exportAsString())).isGreaterThan(script.indexOf(f.exportAsString())); - assertThat(script.indexOf(e.exportAsString())).isGreaterThan(script.indexOf(g.exportAsString())).isGreaterThan(script.indexOf(h.exportAsString())); - assertThat(script.indexOf(f.exportAsString())).isGreaterThan(script.indexOf(g.exportAsString())).isGreaterThan(script.indexOf(h.exportAsString())); - + // validate against a strict expectation that the schema is exactly as defined. + assertThat(script).isEqualTo(EXPECTED_SCHEMA); } } diff --git a/driver-core/src/test/resources/export_as_string_test_2.0.cql b/driver-core/src/test/resources/export_as_string_test_2.0.cql new file mode 100644 index 00000000000..8da26460927 --- /dev/null +++ b/driver-core/src/test/resources/export_as_string_test_2.0.cql @@ -0,0 +1,42 @@ +CREATE KEYSPACE complex_ks WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND DURABLE_WRITES = true; + +CREATE TABLE complex_ks.rank_by_year_and_name ( + race_year int, + race_name text, + rank int, + cyclist_name text, + PRIMARY KEY ((race_year, race_name), rank) +) WITH CLUSTERING ORDER BY (rank ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND replicate_on_write = true + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = 'KEYS_ONLY' + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' } + AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99.0PERCENTILE' + AND index_interval = 128; + +CREATE INDEX rrank ON complex_ks.rank_by_year_and_name (rank); + +CREATE INDEX ryear ON complex_ks.rank_by_year_and_name (race_year); + +CREATE TABLE complex_ks.ztable ( + zkey text, + a int, + PRIMARY KEY (zkey) +) WITH read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND replicate_on_write = true + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.1 + AND caching = 'KEYS_ONLY' + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'sstable_size_in_mb' : 95 } + AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99.0PERCENTILE' + AND index_interval = 128; diff --git a/driver-core/src/test/resources/export_as_string_test_2.1.cql b/driver-core/src/test/resources/export_as_string_test_2.1.cql new file mode 100644 index 00000000000..0d71991cd70 --- /dev/null +++ b/driver-core/src/test/resources/export_as_string_test_2.1.cql @@ -0,0 +1,64 @@ +CREATE KEYSPACE complex_ks WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND DURABLE_WRITES = true; + +CREATE TYPE complex_ks.btype ( + a text +); + +CREATE TYPE complex_ks.xtype ( + d text +); + +CREATE TYPE complex_ks.ztype ( + c text, + a int +); + +CREATE TYPE complex_ks.ctype ( + z frozen, + x frozen +); + +CREATE TYPE complex_ks.atype ( + c frozen +); + +CREATE TABLE complex_ks.rank_by_year_and_name ( + race_year int, + race_name text, + rank int, + cyclist_name text, + PRIMARY KEY ((race_year, race_name), rank) +) WITH CLUSTERING ORDER BY (rank ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' } + AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99.0PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048; + +CREATE INDEX rrank ON complex_ks.rank_by_year_and_name (rank); + +CREATE INDEX ryear ON complex_ks.rank_by_year_and_name (race_year); + +CREATE TABLE complex_ks.ztable ( + zkey text, + a frozen, + PRIMARY KEY (zkey) +) WITH read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.1 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'sstable_size_in_mb' : 95 } + AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99.0PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048; diff --git a/driver-core/src/test/resources/export_as_string_test_2.2.cql b/driver-core/src/test/resources/export_as_string_test_2.2.cql new file mode 100644 index 00000000000..2789c7ce999 --- /dev/null +++ b/driver-core/src/test/resources/export_as_string_test_2.2.cql @@ -0,0 +1,110 @@ +CREATE KEYSPACE complex_ks WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND DURABLE_WRITES = true; + +CREATE TYPE complex_ks.btype ( + a text +); + +CREATE TYPE complex_ks.xtype ( + d text +); + +CREATE TYPE complex_ks.ztype ( + c text, + a int +); + +CREATE TYPE complex_ks.ctype ( + z frozen, + x frozen +); + +CREATE TYPE complex_ks.atype ( + c frozen +); + +CREATE TABLE complex_ks.cyclist_mv ( + cid uuid, + age int, + birthday date, + country text, + name text, + PRIMARY KEY (cid) +) WITH read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' } + AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99.0PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048; + +CREATE INDEX cyclist_by_country ON complex_ks.cyclist_mv (country); + +CREATE TABLE complex_ks.rank_by_year_and_name ( + race_year int, + race_name text, + rank int, + cyclist_name text, + PRIMARY KEY ((race_year, race_name), rank) +) WITH CLUSTERING ORDER BY (rank ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy' } + AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99.0PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048; + +CREATE INDEX rrank ON complex_ks.rank_by_year_and_name (rank); + +CREATE INDEX ryear ON complex_ks.rank_by_year_and_name (race_year); + +CREATE TABLE complex_ks.ztable ( + zkey text, + a frozen, + PRIMARY KEY (zkey) +) WITH read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.1 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'sstable_size_in_mb' : 95 } + AND compression = { 'sstable_compression' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99.0PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048; + +CREATE FUNCTION complex_ks.avgfinal(state tuple) + CALLED ON NULL INPUT + RETURNS double + LANGUAGE java + AS 'double r = 0; if (state.getInt(0) == 0) return null; r = state.getLong(1); r /= state.getInt(0); return Double.valueOf(r);'; + +CREATE FUNCTION complex_ks.avgstate(state tuple,val int) + CALLED ON NULL INPUT + RETURNS tuple + LANGUAGE java + AS 'if (val !=null) { state.setInt(0, state.getInt(0)+1); state.setLong(1, state.getLong(1)+val.intValue()); } return state;'; + +CREATE AGGREGATE complex_ks.average(int) + SFUNC avgstate + STYPE tuple + FINALFUNC avgfinal + INITCOND (0,0); + +CREATE AGGREGATE complex_ks.mean(int) + SFUNC avgstate + STYPE tuple + FINALFUNC avgfinal + INITCOND (0,0); diff --git a/driver-core/src/test/resources/export_as_string_test_3.0.cql b/driver-core/src/test/resources/export_as_string_test_3.0.cql new file mode 100644 index 00000000000..04fe39adc98 --- /dev/null +++ b/driver-core/src/test/resources/export_as_string_test_3.0.cql @@ -0,0 +1,173 @@ +CREATE KEYSPACE complex_ks WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND DURABLE_WRITES = true; + +CREATE TYPE complex_ks.btype ( + a text +); + +CREATE TYPE complex_ks.xtype ( + d text +); + +CREATE TYPE complex_ks.ztype ( + c text, + a int +); + +CREATE TYPE complex_ks.ctype ( + z frozen, + x frozen +); + +CREATE TYPE complex_ks.atype ( + c frozen +); + +CREATE TABLE complex_ks.cyclist_mv ( + cid uuid, + age int, + birthday date, + country text, + name text, + PRIMARY KEY (cid) +) WITH read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0; + +CREATE INDEX cyclist_by_country ON complex_ks.cyclist_mv (country); + +CREATE MATERIALIZED VIEW complex_ks.cyclist_by_a_age AS + SELECT * + FROM complex_ks.cyclist_mv + WHERE age IS NOT NULL AND cid IS NOT NULL + PRIMARY KEY (age, cid) + WITH CLUSTERING ORDER BY (cid ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0; + +CREATE MATERIALIZED VIEW complex_ks.cyclist_by_age AS + SELECT age, cid, birthday, country, name + FROM complex_ks.cyclist_mv + WHERE age IS NOT NULL AND cid IS NOT NULL + PRIMARY KEY (age, cid) + WITH CLUSTERING ORDER BY (cid ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = 'simple view' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0; + +CREATE MATERIALIZED VIEW complex_ks.cyclist_by_r_age AS + SELECT age, cid, birthday, country, name + FROM complex_ks.cyclist_mv + WHERE age IS NOT NULL AND cid IS NOT NULL + PRIMARY KEY (age, cid) + WITH CLUSTERING ORDER BY (cid DESC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0; + +CREATE TABLE complex_ks.rank_by_year_and_name ( + race_year int, + race_name text, + rank int, + cyclist_name text, + PRIMARY KEY ((race_year, race_name), rank) +) WITH CLUSTERING ORDER BY (rank ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0; + +CREATE INDEX rrank ON complex_ks.rank_by_year_and_name (rank); + +CREATE INDEX ryear ON complex_ks.rank_by_year_and_name (race_year); + +CREATE TABLE complex_ks.ztable ( + zkey text, + a frozen, + PRIMARY KEY (zkey) +) WITH read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.1 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'sstable_size_in_mb' : 95 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0; + +CREATE FUNCTION complex_ks.avgfinal(state tuple) + CALLED ON NULL INPUT + RETURNS double + LANGUAGE java + AS 'double r = 0; if (state.getInt(0) == 0) return null; r = state.getLong(1); r /= state.getInt(0); return Double.valueOf(r);'; + +CREATE FUNCTION complex_ks.avgstate(state tuple,val int) + CALLED ON NULL INPUT + RETURNS tuple + LANGUAGE java + AS 'if (val !=null) { state.setInt(0, state.getInt(0)+1); state.setLong(1, state.getLong(1)+val.intValue()); } return state;'; + +CREATE AGGREGATE complex_ks.average(int) + SFUNC avgstate + STYPE tuple + FINALFUNC avgfinal + INITCOND (0,0); + +CREATE AGGREGATE complex_ks.mean(int) + SFUNC avgstate + STYPE tuple + FINALFUNC avgfinal + INITCOND (0,0); diff --git a/driver-core/src/test/resources/export_as_string_test_3.11.cql b/driver-core/src/test/resources/export_as_string_test_3.11.cql new file mode 100644 index 00000000000..204d1c58f68 --- /dev/null +++ b/driver-core/src/test/resources/export_as_string_test_3.11.cql @@ -0,0 +1,179 @@ +CREATE KEYSPACE complex_ks WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1' } AND DURABLE_WRITES = true; + +CREATE TYPE complex_ks.btype ( + a text +); + +CREATE TYPE complex_ks.xtype ( + d text +); + +CREATE TYPE complex_ks.ztype ( + c text, + a int +); + +CREATE TYPE complex_ks.ctype ( + z frozen, + x frozen +); + +CREATE TYPE complex_ks.atype ( + c frozen +); + +CREATE TABLE complex_ks.cyclist_mv ( + cid uuid, + age int, + birthday date, + country text, + name text, + PRIMARY KEY (cid) +) WITH read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0 + AND cdc = false; + +CREATE INDEX cyclist_by_country ON complex_ks.cyclist_mv (country); + +CREATE MATERIALIZED VIEW complex_ks.cyclist_by_a_age AS + SELECT * + FROM complex_ks.cyclist_mv + WHERE age IS NOT NULL AND cid IS NOT NULL + PRIMARY KEY (age, cid) + WITH CLUSTERING ORDER BY (cid ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0 + AND cdc = false; + +CREATE MATERIALIZED VIEW complex_ks.cyclist_by_age AS + SELECT age, cid, birthday, country, name + FROM complex_ks.cyclist_mv + WHERE age IS NOT NULL AND cid IS NOT NULL + PRIMARY KEY (age, cid) + WITH CLUSTERING ORDER BY (cid ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = 'simple view' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0 + AND cdc = false; + +CREATE MATERIALIZED VIEW complex_ks.cyclist_by_r_age AS + SELECT age, cid, birthday, country, name + FROM complex_ks.cyclist_mv + WHERE age IS NOT NULL AND cid IS NOT NULL + PRIMARY KEY (age, cid) + WITH CLUSTERING ORDER BY (cid DESC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0 + AND cdc = false; + +CREATE TABLE complex_ks.rank_by_year_and_name ( + race_year int, + race_name text, + rank int, + cyclist_name text, + PRIMARY KEY ((race_year, race_name), rank) +) WITH CLUSTERING ORDER BY (rank ASC) + AND read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.01 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold' : 32, 'min_threshold' : 4 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0 + AND cdc = false; + +CREATE INDEX rrank ON complex_ks.rank_by_year_and_name (rank); + +CREATE INDEX ryear ON complex_ks.rank_by_year_and_name (race_year); + +CREATE TABLE complex_ks.ztable ( + zkey text, + a frozen, + PRIMARY KEY (zkey) +) WITH read_repair_chance = 0.0 + AND dclocal_read_repair_chance = 0.1 + AND gc_grace_seconds = 864000 + AND bloom_filter_fp_chance = 0.1 + AND caching = { 'keys' : 'ALL', 'rows_per_partition' : 'NONE' } + AND comment = '' + AND compaction = { 'class' : 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'sstable_size_in_mb' : 95 } + AND compression = { 'chunk_length_in_kb' : 64, 'class' : 'org.apache.cassandra.io.compress.LZ4Compressor' } + AND default_time_to_live = 0 + AND speculative_retry = '99PERCENTILE' + AND min_index_interval = 128 + AND max_index_interval = 2048 + AND crc_check_chance = 1.0 + AND cdc = false; + +CREATE FUNCTION complex_ks.avgfinal(state tuple) + CALLED ON NULL INPUT + RETURNS double + LANGUAGE java + AS 'double r = 0; if (state.getInt(0) == 0) return null; r = state.getLong(1); r /= state.getInt(0); return Double.valueOf(r);'; + +CREATE FUNCTION complex_ks.avgstate(state tuple,val int) + CALLED ON NULL INPUT + RETURNS tuple + LANGUAGE java + AS 'if (val !=null) { state.setInt(0, state.getInt(0)+1); state.setLong(1, state.getLong(1)+val.intValue()); } return state;'; + +CREATE AGGREGATE complex_ks.average(int) + SFUNC avgstate + STYPE tuple + FINALFUNC avgfinal + INITCOND (0,0); + +CREATE AGGREGATE complex_ks.mean(int) + SFUNC avgstate + STYPE tuple + FINALFUNC avgfinal + INITCOND (0,0); From cc07b43aa59f670dd439ecd59826e9b3929271f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Figui=C3=A8re?= Date: Fri, 22 Sep 2017 17:31:25 -0700 Subject: [PATCH 136/512] JAVA-1500: Add a metric to report number of in-flight requests (#858) --- changelog/README.md | 1 + .../com/datastax/driver/core/Metrics.java | 19 ++++ .../driver/core/MetricsInFlightTest.java | 97 +++++++++++++++++++ 3 files changed, 117 insertions(+) create mode 100644 driver-core/src/test/java/com/datastax/driver/core/MetricsInFlightTest.java diff --git a/changelog/README.md b/changelog/README.md index a49dabc82da..e86a2118b09 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -5,6 +5,7 @@ - [bug] JAVA-1555: Include VIEW and CDC in WriteType. - [bug] JAVA-1599: exportAsString improvements (sort, format, clustering order) - [improvement] JAVA-1587: Deterministic ordering of columns used in Mapper#saveQuery +- [improvement] JAVA-1500: Add a metric to report number of in-flight requests. ### 3.3.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/Metrics.java b/driver-core/src/main/java/com/datastax/driver/core/Metrics.java index 1debeb4a6e9..3087634dd10 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Metrics.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Metrics.java @@ -79,6 +79,16 @@ public Integer getValue() { return value; } }); + private final Gauge inFlightRequests = registry.register("inflight-requests", new Gauge() { + @Override + public Integer getValue() { + int value = 0; + for (SessionManager session : manager.sessions) + for (HostConnectionPool pool : session.pools.values()) + value += pool.totalInFlight.get(); + return value; + } + }); private final Gauge executorQueueDepth; private final Gauge blockingExecutorQueueDepth; @@ -218,6 +228,15 @@ public Gauge getTrashedConnections() { return trashedConnections; } + /** + * Returns the total number of in flight requests to Cassandra hosts. + * + * @return The total number of in flight requests to Cassandra hosts. + */ + public Gauge getInFlightRequests() { + return inFlightRequests; + } + /** * Returns the number of queued up tasks in the {@link ThreadingOptions#createExecutor(String) main internal executor}. *

    diff --git a/driver-core/src/test/java/com/datastax/driver/core/MetricsInFlightTest.java b/driver-core/src/test/java/com/datastax/driver/core/MetricsInFlightTest.java new file mode 100644 index 00000000000..91c4085414b --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/MetricsInFlightTest.java @@ -0,0 +1,97 @@ +package com.datastax.driver.core; + +import org.scassandra.Scassandra; +import org.scassandra.http.client.PrimingRequest; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +import static com.datastax.driver.core.TestUtils.nonQuietClusterCloseOptions; +import static org.scassandra.http.client.PrimingRequest.then; + +public class MetricsInFlightTest { + private ScassandraCluster sCluster; + + @BeforeMethod(groups = "short") + public void setUp() { + sCluster = ScassandraCluster.builder().withNodes(1).build(); + sCluster.init(); + } + + @AfterMethod(groups = "short") + public void tearDown() { + clearActivityLog(); + sCluster.stop(); + } + + public void clearActivityLog() { + for (Scassandra node : sCluster.nodes()) { + node.activityClient().clearAllRecordedActivity(); + } + } + + public Cluster.Builder builder() { + //Note: nonQuietClusterCloseOptions is used to speed up tests + return Cluster.builder() + .addContactPoints(sCluster.address(1).getAddress()) + .withPort(sCluster.getBinaryPort()).withNettyOptions(nonQuietClusterCloseOptions); + } + + @Test(groups = "short") + public void should_count_inflight_requests_metrics() { + sCluster.node(1).primingClient().prime(PrimingRequest.queryBuilder() + .withQuery("mock query") + .withThen(then().withFixedDelay(100000L)) + .build() + ); + + Cluster cluster = null; + try { + cluster = builder().build(); + Session session = cluster.connect(); + + assertThat(cluster.getMetrics().getInFlightRequests().getValue()).isEqualTo(0); + session.executeAsync("mock query"); + session.executeAsync("mock query"); + assertThat(cluster.getMetrics().getInFlightRequests().getValue()).isEqualTo(2); + + } finally { + if (cluster != null) { + cluster.close(); + } + } + } + + + @Test(groups = "short") + public void should_countdown_inflight_requests_metrics() { + sCluster.node(1).primingClient().prime(PrimingRequest.queryBuilder() + .withQuery("mock query") + .withThen(then()) + .build() + ); + + Cluster cluster = null; + try { + cluster = builder().build(); + Session session = cluster.connect(); + + assertThat(cluster.getMetrics().getInFlightRequests().getValue()).isEqualTo(0); + session.executeAsync("mock query").getUninterruptibly(); + session.executeAsync("mock query").getUninterruptibly(); + assertThat(cluster.getMetrics().getInFlightRequests().getValue()).isEqualTo(0); + + } finally { + if (cluster != null) { + cluster.close(); + } + } + } + +} From 271b6e29e59b00fc5551c2046f36a765ac69ede5 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Mon, 25 Sep 2017 12:52:25 -0500 Subject: [PATCH 137/512] Add license header --- .../datastax/driver/core/MetricsInFlightTest.java | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/driver-core/src/test/java/com/datastax/driver/core/MetricsInFlightTest.java b/driver-core/src/test/java/com/datastax/driver/core/MetricsInFlightTest.java index 91c4085414b..91298a7a48f 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MetricsInFlightTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MetricsInFlightTest.java @@ -1,3 +1,18 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package com.datastax.driver.core; import org.scassandra.Scassandra; From 6f9631729cad19d08bdbfef2dcf189358bda723e Mon Sep 17 00:00:00 2001 From: Evan Zeimet Date: Mon, 25 Sep 2017 15:47:28 -0500 Subject: [PATCH 138/512] JAVA-1438: QueryBuilder check for empty orderings (#832) --- changelog/README.md | 1 + .../java/com/datastax/driver/core/querybuilder/Select.java | 3 +++ .../driver/core/querybuilder/QueryBuilderTest.java | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/changelog/README.md b/changelog/README.md index e86a2118b09..c915521b974 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -6,6 +6,7 @@ - [bug] JAVA-1599: exportAsString improvements (sort, format, clustering order) - [improvement] JAVA-1587: Deterministic ordering of columns used in Mapper#saveQuery - [improvement] JAVA-1500: Add a metric to report number of in-flight requests. +- [bug] JAVA-1438: QueryBuilder check for empty orderings. ### 3.3.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java index d070a04888c..510afe17848 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Select.java @@ -154,6 +154,9 @@ public Select orderBy(Ordering... orderings) { if (this.orderings != null) throw new IllegalStateException("An ORDER BY clause has already been provided"); + if (orderings.length == 0) + throw new IllegalArgumentException("Invalid ORDER BY argument, the orderings must not be empty."); + this.orderings = Arrays.asList(orderings); for (Ordering ordering : orderings) checkForBindMarkers(ordering); diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java index 176be7abccb..91cf75b4243 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java @@ -165,6 +165,13 @@ public void selectTest() throws Exception { assertEquals(e.getMessage(), "An ORDER BY clause has already been provided"); } + try { + select().from("foo").orderBy(); + fail("Expected an IllegalArgumentException"); + } catch (IllegalArgumentException e) { + assertEquals(e.getMessage(), "Invalid ORDER BY argument, the orderings must not be empty."); + } + try { select().column("a").all().from("foo"); fail("Expected an IllegalStateException"); From a0d8b5695c34579802b4054fd2fa00871a095f7a Mon Sep 17 00:00:00 2001 From: Chris Lohfink Date: Fri, 30 Jun 2017 11:03:44 -0500 Subject: [PATCH 139/512] JAVA-1490: Allow zero delay for speculative executions --- changelog/README.md | 1 + .../datastax/driver/core/RequestHandler.java | 22 ++++++--- .../ConstantSpeculativeExecutionPolicy.java | 8 +-- .../policies/SpeculativeExecutionPolicy.java | 4 +- .../driver/core/SpeculativeExecutionTest.java | 49 +++++++++++++++++++ 5 files changed, 73 insertions(+), 11 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index c915521b974..e8b1516d875 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -7,6 +7,7 @@ - [improvement] JAVA-1587: Deterministic ordering of columns used in Mapper#saveQuery - [improvement] JAVA-1500: Add a metric to report number of in-flight requests. - [bug] JAVA-1438: QueryBuilder check for empty orderings. +- [improvement] JAVA-1490: Allow zero delay for speculative executions. ### 3.3.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java index 27cdf129610..49f0869fdf0 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java @@ -119,30 +119,40 @@ private void startNewExecution() { } private void scheduleExecution(long delayMillis) { - if (isDone.get() || delayMillis <= 0) + if (isDone.get() || delayMillis < 0) return; if (logger.isTraceEnabled()) logger.trace("[{}] Schedule next speculative execution in {} ms", id, delayMillis); - scheduledExecutions.add(scheduler.newTimeout(newExecutionTask, delayMillis, TimeUnit.MILLISECONDS)); + if(delayMillis == 0) { + // kick off request immediately + scheduleExecutionImmediately(); + } else { + scheduledExecutions.add(scheduler.newTimeout(newExecutionTask, delayMillis, TimeUnit.MILLISECONDS)); + } } private final TimerTask newExecutionTask = new TimerTask() { @Override public void run(final Timeout timeout) throws Exception { scheduledExecutions.remove(timeout); - if (!isDone.get()) + if (!isDone.get()) { // We're on the timer thread so reschedule to another executor manager.executor().execute(new Runnable() { @Override public void run() { - if (metricsEnabled()) - metrics().getErrorMetrics().getSpeculativeExecutions().inc(); - startNewExecution(); + scheduleExecutionImmediately(); } }); + } } }; + private void scheduleExecutionImmediately() { + if (metricsEnabled()) + metrics().getErrorMetrics().getSpeculativeExecutions().inc(); + startNewExecution(); + } + private void cancelPendingExecutions(SpeculativeExecution ignore) { for (SpeculativeExecution execution : runningExecutions) if (execution != ignore) // not vital but this produces nicer logs diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.java index af22fcae30e..a7d1acf91fc 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.java @@ -32,13 +32,15 @@ public class ConstantSpeculativeExecutionPolicy implements SpeculativeExecutionP /** * Builds a new instance. * - * @param constantDelayMillis the delay between each speculative execution. Must be strictly positive. + * @param constantDelayMillis the delay between each speculative execution. Must be >= 0. A zero delay means + * it should immediately send `maxSpeculativeExecutions` requests along with the + * original request. * @param maxSpeculativeExecutions the number of speculative executions. Must be strictly positive. * @throws IllegalArgumentException if one of the arguments does not respect the preconditions above. */ public ConstantSpeculativeExecutionPolicy(final long constantDelayMillis, final int maxSpeculativeExecutions) { - Preconditions.checkArgument(constantDelayMillis > 0, - "delay must be strictly positive (was %d)", constantDelayMillis); + Preconditions.checkArgument(constantDelayMillis >= 0, + "delay must be >= 0 (was %d)", constantDelayMillis); Preconditions.checkArgument(maxSpeculativeExecutions > 0, "number of speculative executions must be strictly positive (was %d)", maxSpeculativeExecutions); this.constantDelayMillis = constantDelayMillis; diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.java index f936ca78c5c..35c38fb431b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.java @@ -64,8 +64,8 @@ interface SpeculativeExecutionPlan { * Returns the time before the next speculative query. * * @param lastQueried the host that was just queried. - * @return the time (in milliseconds) before a speculative query is sent to the next host. If zero or negative, - * no speculative query will be sent. + * @return the time (in milliseconds) before a speculative query is sent to the next host. If negative, + * no speculative query will be sent. If zero it will immediately send the execution. */ long nextExecution(Host lastQueried); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java b/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java index 02f5f043292..cdb2265df48 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/SpeculativeExecutionTest.java @@ -167,6 +167,55 @@ public void should_start_speculative_execution_if_first_execution_takes_too_long assertThat(executionInfo.getSuccessfulExecutionIndex()).isEqualTo(1); } + @Test(groups = "short") + public void should_start_speculative_execution_on_multiple_hosts_with_zero_delay() { + Cluster cluster = Cluster.builder() + .addContactPoints(scassandras.address(2).getAddress()) + .withPort(scassandras.getBinaryPort()) + .withLoadBalancingPolicy(loadBalancingPolicy) + .withSpeculativeExecutionPolicy(new ConstantSpeculativeExecutionPolicy(0, 2)) + .withQueryOptions(new QueryOptions().setDefaultIdempotence(true)) + .withRetryPolicy(new CustomRetryPolicy()) + .withNettyOptions(nonQuietClusterCloseOptions) + .build(); + Session session = cluster.connect(); + host1 = TestUtils.findHost(cluster, 1); + host2 = TestUtils.findHost(cluster, 2); + host3 = TestUtils.findHost(cluster, 3); + errors = cluster.getMetrics().getErrorMetrics(); + + scassandras.node(1).primingClient().prime(PrimingRequest.queryBuilder() + .withQuery("mock query") + .withThen(then().withRows(row("result", "result1")).withFixedDelay(1000L)) + .build() + ); + + scassandras.node(2).primingClient().prime(PrimingRequest.queryBuilder() + .withQuery("mock query") + .withThen(then().withRows(row("result", "result2")).withFixedDelay(1000L)) + .build() + ); + + scassandras.node(3).primingClient().prime(PrimingRequest.queryBuilder() + .withQuery("mock query") + .withThen(then().withRows(row("result", "result3"))) + .build() + ); + long execStartCount = errors.getSpeculativeExecutions().getCount(); + + ResultSet rs = session.execute("mock query"); + Row row = rs.one(); + + assertThat(row.getString("result")).isEqualTo("result3"); + assertThat(errors.getSpeculativeExecutions().getCount()).isEqualTo(execStartCount + 2); + ExecutionInfo executionInfo = rs.getExecutionInfo(); + // triedHosts does not contain host1 because the request to it had not completed yet + assertThat(executionInfo.getTriedHosts()).containsOnly(host3); + assertThat(executionInfo.getQueriedHost()).isEqualTo(host3); + assertThat(executionInfo.getSpeculativeExecutions()).isEqualTo(2); + assertThat(executionInfo.getSuccessfulExecutionIndex()).isEqualTo(2); + } + @Test(groups = "short") public void should_wait_until_all_executions_have_finished() { // Rely on read timeouts to trigger errors that cause an execution to move to the next node From 07d81db7e729e69783e100f76dde306b6c026e4a Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 18 Aug 2017 16:11:58 -0500 Subject: [PATCH 140/512] JAVA-1607: Add FAQ entry for netty-transport-native-epoll --- changelog/README.md | 1 + faq/README.md | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) diff --git a/changelog/README.md b/changelog/README.md index e8b1516d875..8fe019aa958 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -8,6 +8,7 @@ - [improvement] JAVA-1500: Add a metric to report number of in-flight requests. - [bug] JAVA-1438: QueryBuilder check for empty orderings. - [improvement] JAVA-1490: Allow zero delay for speculative executions. +- [documentation] JAVA-1607: Add FAQ entry for netty-transport-native-epoll. ### 3.3.0 diff --git a/faq/README.md b/faq/README.md index 60a62864f7d..abd221933a1 100644 --- a/faq/README.md +++ b/faq/README.md @@ -236,6 +236,28 @@ before submitting the next batch. See the [Acquisition queue] section of the Pooling section in the manual for explanation of how the driver enqueues requests when connections are over-utilized. +### What is Netty's native epoll transport and how do I enable or disable it? + +Netty provides [native transport libraries](http://netty.io/wiki/native-transports.html) which generally generate less +garbage and improve performance when compared to the default NIO-based transport. +By default if the driver detects the `netty-transport-native-epoll` library in its classpath it will attempt to use +[`EpollEventLoopGroup`](https://netty.io/4.0/api/io/netty/channel/epoll/EpollEventLoopGroup.html) for its underlying +event loop. + +In the usual case this works fine in linux environments. On the other hand, many users have run into compatibility +issues when the version of `netty-transport-native-epoll` is not compatible with a version of Netty in an application's +classpath. One such case is where an application depends on a version of `netty-all` that is different than the +version of `netty-handler` that the driver depends on. In such a case, a user may encounter an exception such as the +one described in [JAVA-1535](https://datastax-oss.atlassian.net/browse/JAVA-1535). + +While the epoll transport may in general improve performance, we expect the improvement to be marginal for a lot of use +cases. Therefore, if you don't want `netty-transport-native-epoll` to be used by the driver even if the library is +present in an application's classpath, the most direct way to disable this is to provide the system property value +`-Dcom.datastax.driver.FORCE_NIO=true` to your application to force the use of the default Netty NIO-based event loop. +If properly used, the following log message will be logged at INFO on startup: + +> Found Netty's native epoll transport in the classpath, but NIO was forced through the FORCE_NIO system property. + [Blobs.java]: https://github.com/datastax/java-driver/tree/3.3.0/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java [CASSANDRA-7304]: https://issues.apache.org/jira/browse/CASSANDRA-7304 [Parameters and Binding]: ../manual/statements/prepared/#parameters-and-binding From de3c0c664c52485cad3a428818945599283d43f5 Mon Sep 17 00:00:00 2001 From: Felix Becker Date: Tue, 29 Aug 2017 14:19:35 +0200 Subject: [PATCH 141/512] JAVA-1613: Fix broken shaded Netty detection in NettyUtil The shading detection fails when another (non shaded) netty is in the class path (which is the main reason for shading). --- changelog/README.md | 1 + .../com/datastax/driver/core/NettyUtil.java | 20 ++---- driver-tests/pom.xml | 1 + driver-tests/shading/pom.xml | 47 ++++++++++++++ driver-tests/shading/shaded/pom.xml | 65 +++++++++++++++++++ .../com/datastax/driver/core/NettyUtilIT.java | 28 ++++++++ driver-tests/shading/unshaded/pom.xml | 48 ++++++++++++++ .../com/datastax/driver/core/NettyUtilIT.java | 28 ++++++++ pom.xml | 7 ++ 9 files changed, 230 insertions(+), 15 deletions(-) create mode 100644 driver-tests/shading/pom.xml create mode 100644 driver-tests/shading/shaded/pom.xml create mode 100644 driver-tests/shading/shaded/src/test/java/com/datastax/driver/core/NettyUtilIT.java create mode 100644 driver-tests/shading/unshaded/pom.xml create mode 100644 driver-tests/shading/unshaded/src/test/java/com/datastax/driver/core/NettyUtilIT.java diff --git a/changelog/README.md b/changelog/README.md index 8fe019aa958..aed66789a7f 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -29,6 +29,7 @@ - [improvement] JAVA-1488: Upgrade Netty to 4.0.47.Final. - [improvement] JAVA-1460: Add speculative execution number to ExecutionInfo - [improvement] JAVA-1431: Improve error handling during pool initialization. +- [bug] JAVA-1613: Fix broken shaded Netty detection in NettyUtil. ### 3.2.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/NettyUtil.java b/driver-core/src/main/java/com/datastax/driver/core/NettyUtil.java index 66ac351395c..c35e0d9fc3a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/NettyUtil.java +++ b/driver-core/src/main/java/com/datastax/driver/core/NettyUtil.java @@ -37,7 +37,6 @@ class NettyUtil { private static final Logger LOGGER = LoggerFactory.getLogger(NettyUtil.class); - private static final boolean SHADED; private static final boolean USE_EPOLL; @@ -47,21 +46,12 @@ class NettyUtil { private static final Class[] EVENT_GROUP_ARGUMENTS = {int.class, ThreadFactory.class}; + private static final String SHADING_DETECTION_STRING = "io.netty.shadingdetection.ShadingDetection"; + + private static final boolean SHADED = !SHADING_DETECTION_STRING.equals(String.format("%s.%s.shadingdetection.ShadingDetection", "io", "netty")); + static { - boolean shaded; - try { - // prevent this string from being shaded - Class.forName(String.format("%s.%s.channel.Channel", "io", "netty")); - shaded = false; - } catch (ClassNotFoundException e) { - try { - Class.forName("com.datastax.shaded.netty.channel.Channel"); - shaded = true; - } catch (ClassNotFoundException e1) { - throw new AssertionError("Cannot locate Netty classes in the classpath:" + e1); - } - } - SHADED = shaded; + boolean useEpoll = false; if (!SHADED) { try { diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 8c3b59037d8..1a79b393cc3 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -33,6 +33,7 @@ stress osgi + shading diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml new file mode 100644 index 00000000000..98b0f0d47f0 --- /dev/null +++ b/driver-tests/shading/pom.xml @@ -0,0 +1,47 @@ + + + + 4.0.0 + + + com.datastax.cassandra + cassandra-driver-tests-parent + 3.4.0-SNAPSHOT + + + pom + cassandra-driver-tests-shading + DataStax Java Driver for Apache Cassandra Tests - Shading + A test project for tests which ensure that the shading of the driver didn't break anything. + + + shaded + unshaded + + + + + org.testng + testng + test + + + + + diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml new file mode 100644 index 00000000000..e3e9be9aa8b --- /dev/null +++ b/driver-tests/shading/shaded/pom.xml @@ -0,0 +1,65 @@ + + + + 4.0.0 + + + com.datastax.cassandra + cassandra-driver-tests-shading + 3.4.0-SNAPSHOT + + + cassandra-driver-tests-shading-shaded + DataStax Java Driver for Apache Cassandra Tests - Shading - Shaded + The shading detection tests for the shaded driver + + + + + com.datastax.cassandra + cassandra-driver-core + shaded + + + * + io.netty + + + + + + + io.netty + netty-handler + test + + + + org.testng + testng + test + + + + + + diff --git a/driver-tests/shading/shaded/src/test/java/com/datastax/driver/core/NettyUtilIT.java b/driver-tests/shading/shaded/src/test/java/com/datastax/driver/core/NettyUtilIT.java new file mode 100644 index 00000000000..c31de86c032 --- /dev/null +++ b/driver-tests/shading/shaded/src/test/java/com/datastax/driver/core/NettyUtilIT.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import org.testng.Assert; +import org.testng.annotations.Test; + +public class NettyUtilIT { + + @Test(groups = "unit") + public void should_detect_shaded_driver() { + Assert.assertTrue(NettyUtil.isShaded()); + } + +} diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml new file mode 100644 index 00000000000..1985767b273 --- /dev/null +++ b/driver-tests/shading/unshaded/pom.xml @@ -0,0 +1,48 @@ + + + + 4.0.0 + + + com.datastax.cassandra + cassandra-driver-tests-shading + 3.4.0-SNAPSHOT + + + cassandra-driver-tests-shading-unshaded + DataStax Java Driver for Apache Cassandra Tests - Shading - Unshaded + The shading detection tests for the unshaded driver + + + + + com.datastax.cassandra + cassandra-driver-core + + + + org.testng + testng + test + + + + + + diff --git a/driver-tests/shading/unshaded/src/test/java/com/datastax/driver/core/NettyUtilIT.java b/driver-tests/shading/unshaded/src/test/java/com/datastax/driver/core/NettyUtilIT.java new file mode 100644 index 00000000000..ef1e77d81fc --- /dev/null +++ b/driver-tests/shading/unshaded/src/test/java/com/datastax/driver/core/NettyUtilIT.java @@ -0,0 +1,28 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import org.testng.Assert; +import org.testng.annotations.Test; + +public class NettyUtilIT { + + @Test(groups = "unit") + public void should_detect_non_shaded_driver() { + Assert.assertFalse(NettyUtil.isShaded()); + } + +} diff --git a/pom.xml b/pom.xml index 897867bfa5a..d364e879a98 100644 --- a/pom.xml +++ b/pom.xml @@ -96,6 +96,13 @@ ${project.parent.version} + + com.datastax.cassandra + cassandra-driver-core + ${project.parent.version} + shaded + + com.datastax.cassandra cassandra-driver-core From 831f5a22de655e1c2336dd9a9131ab8cbbeea16f Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 26 Sep 2017 09:18:08 -0700 Subject: [PATCH 142/512] JAVA-1630: Fix Metadata.addIfAbsent --- changelog/README.md | 1 + .../com/datastax/driver/core/Cluster.java | 26 +++++++++---------- .../driver/core/ControlConnection.java | 6 ++--- .../com/datastax/driver/core/Metadata.java | 10 +++---- 4 files changed, 20 insertions(+), 23 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index aed66789a7f..6a280752383 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -9,6 +9,7 @@ - [bug] JAVA-1438: QueryBuilder check for empty orderings. - [improvement] JAVA-1490: Allow zero delay for speculative executions. - [documentation] JAVA-1607: Add FAQ entry for netty-transport-native-epoll. +- [bug] JAVA-1630: Fix Metadata.addIfAbsent. ### 3.3.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java index 56b17601649..ce4cb89dfd4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java @@ -1505,7 +1505,7 @@ long delayMs() { // We don't want to signal -- call onAdd() -- because nothing is ready // yet (loadbalancing policy, control connection, ...). All we want is // create the Host object so we can initialize the control connection. - metadata.add(address); + metadata.addIfAbsent(metadata.newHost(address)); } Collection allHosts = metadata.allHosts(); @@ -2714,27 +2714,25 @@ public ListenableFuture deliver(List events) { case UP: Host upHost = metadata.getHost(address); if (upHost == null) { - upHost = metadata.add(address); - // If upHost is still null, it means we didn't know about it the line before but - // got beaten at adding it to the metadata by another thread. In that case, it's - // fine to let the other thread win and ignore the notification here - if (upHost == null) + upHost = metadata.newHost(address); + Host previous = metadata.addIfAbsent(upHost); + if (previous != null) { + // We got beat by another thread at adding the host. Let it win and ignore the + // notification here. continue; + } futures.add(schedule(hostAdded(upHost))); } else { futures.add(schedule(hostUp(upHost))); } break; case ADDED: - Host newHost = metadata.add(address); - if (newHost != null) { + Host newHost = metadata.newHost(address); + Host previous = metadata.addIfAbsent(newHost); + if (previous == null) { futures.add(schedule(hostAdded(newHost))); - } else { - // If host already existed, retrieve it and check its state, if it's not up schedule a - // hostUp event. - Host existingHost = metadata.getHost(address); - if (!existingHost.isUp()) - futures.add(schedule(hostUp(existingHost))); + } else if (!previous.isUp()) { + futures.add(schedule(hostUp(previous))); } break; case DOWN: diff --git a/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java b/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java index c1c5531d1ca..b928bcd170b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java @@ -626,12 +626,12 @@ private static void refreshNodeListAndTokenMap(Connection connection, Cluster.Ma // We don't know that node, create the Host object but wait until we've set the known // info before signaling the addition. Host newHost = cluster.metadata.newHost(foundHosts.get(i)); - Host existing = cluster.metadata.addIfAbsent(newHost); - if (existing == null) { + Host previous = cluster.metadata.addIfAbsent(newHost); + if (previous == null) { host = newHost; isNew = true; } else { - host = existing; + host = previous; isNew = false; } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java index 15e82f2e5b9..1eddbb84ca0 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java @@ -90,13 +90,11 @@ Host newHost(InetSocketAddress address) { return new Host(address, cluster.convictionPolicyFactory, cluster); } + /** + * @return the previous host associated with this socket address, or {@code null} if there was no such host. + */ Host addIfAbsent(Host host) { - Host previous = hosts.putIfAbsent(host.getSocketAddress(), host); - return previous == null ? host : null; - } - - Host add(InetSocketAddress address) { - return addIfAbsent(newHost(address)); + return hosts.putIfAbsent(host.getSocketAddress(), host); } boolean remove(Host host) { From 7c93148ceaf5f5edef77bf4d3449010cd01c05c5 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 15 Sep 2017 15:39:24 -0500 Subject: [PATCH 143/512] JAVA-1619: Update QueryBuilder methods to support Iterable input --- changelog/README.md | 1 + clirr-ignores.xml | 12 +++++ .../driver/core/querybuilder/Clause.java | 49 +++++++++++-------- .../core/querybuilder/QueryBuilder.java | 31 +++--------- .../core/querybuilder/QueryBuilderTest.java | 6 ++- pom.xml | 2 +- upgrade_guide/README.md | 8 +++ 7 files changed, 64 insertions(+), 45 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 6a280752383..60581917209 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -10,6 +10,7 @@ - [improvement] JAVA-1490: Allow zero delay for speculative executions. - [documentation] JAVA-1607: Add FAQ entry for netty-transport-native-epoll. - [bug] JAVA-1630: Fix Metadata.addIfAbsent. +- [improvement] JAVA-1619: Update QueryBuilder methods to support Iterable input. ### 3.3.0 diff --git a/clirr-ignores.xml b/clirr-ignores.xml index 5b59573cc25..e7c34ac458c 100644 --- a/clirr-ignores.xml +++ b/clirr-ignores.xml @@ -147,4 +147,16 @@ False positive, the enclosing class is package-private so this was never exposed + + 7005 + com/datastax/driver/core/querybuilder/QueryBuilder + + * + * + Relaxed parameters from List to Iterable for in, lt, lte, eq, gt, and gte + + diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java index 8b1e83f1f9a..440d65bf6c2 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/Clause.java @@ -16,7 +16,7 @@ package com.datastax.driver.core.querybuilder; import com.datastax.driver.core.CodecRegistry; - +import com.google.common.collect.Lists; import java.util.List; public abstract class Clause extends Utils.Appendeable { @@ -70,13 +70,14 @@ static class InClause extends AbstractClause { private final List values; - InClause(String name, List values) { + InClause(String name, Iterable values) { super(name); - this.values = values; - if (values == null) throw new IllegalArgumentException("Missing values for IN clause"); - if (values.size() > 65535) + + this.values = Lists.newArrayList(values); + + if (this.values.size() > 65535) throw new IllegalArgumentException("Too many values for IN clause, the maximum allowed is 65535"); } @@ -91,7 +92,7 @@ void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegis // ... IN ? ... // which binds the variable to the full list the IN is on. if (values.size() == 1 && values.get(0) instanceof BindMarker) { - Utils.appendName(name, sb).append(" IN ").append(values.get(0)); + Utils.appendName(name, sb).append(" IN ").append(values.iterator().next()); return; } @@ -178,11 +179,12 @@ static class CompoundClause extends Clause { private final List names; private final List values; - CompoundClause(List names, String op, List values) { - assert names.size() == values.size(); + CompoundClause(Iterable names, String op, Iterable values) { this.op = op; - this.names = names; - this.values = values; + this.names = Lists.newArrayList(names); + this.values = Lists.newArrayList(values); + if (this.names.size() != this.values.size()) + throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", this.names.size(), this.values.size())); } @Override @@ -227,25 +229,32 @@ void appendTo(StringBuilder sb, List variables, CodecRegistry codecRegis static class CompoundInClause extends Clause { private final List names; - private final List valueLists; + private final List valueLists; - public CompoundInClause(List names, List valueLists) { + public CompoundInClause(Iterable names, Iterable valueLists) { if (valueLists == null) throw new IllegalArgumentException("Missing values for IN clause"); - if (valueLists.size() > 65535) - throw new IllegalArgumentException("Too many values for IN clause, the maximum allowed is 65535"); + if (names == null) + throw new IllegalArgumentException("Missing names for IN clause"); + + this.names = Lists.newArrayList(names); + this.valueLists = Lists.newArrayList(); + for (Object value : valueLists) { - if (value instanceof List) { - List tuple = (List) value; - if (tuple.size() != names.size()) { - throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), tuple.size())); + if (value instanceof Iterable) { + List tuple = Lists.newArrayList((Iterable) value); + if (tuple.size() != this.names.size()) { + throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", this.names.size(), tuple.size())); } + this.valueLists.add(tuple); } else if (!(value instanceof BindMarker)) { throw new IllegalArgumentException(String.format("Wrong element type for values list, expected List or BindMarker, got %s", value.getClass().getName())); + } else { + this.valueLists.add(value); } } - this.names = names; - this.valueLists = valueLists; + if (this.valueLists.size() > 65535) + throw new IllegalArgumentException("Too many values for IN clause, the maximum allowed is 65535"); } @Override diff --git a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java index 5400266976c..1d03c349aa4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java +++ b/driver-core/src/main/java/com/datastax/driver/core/querybuilder/QueryBuilder.java @@ -313,10 +313,7 @@ public static Clause eq(String name, Object value) { * @return the corresponding where clause. * @throws IllegalArgumentException if {@code names.size() != values.size()}. */ - public static Clause eq(List names, List values) { - if (names.size() != values.size()) - throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); - + public static Clause eq(Iterable names, Iterable values) { return new Clause.CompoundClause(names, "=", values); } @@ -351,7 +348,7 @@ public static Clause in(String name, Object... values) { * @param values the values * @return the corresponding where clause. */ - public static Clause in(String name, List values) { + public static Clause in(String name, Iterable values) { return new Clause.InClause(name, values); } @@ -361,7 +358,7 @@ public static Clause in(String name, List values) { * For instance, {@code in(Arrays.asList("a", "b"), Arrays.asList(Arrays.asList(1, "foo"), Arrays.asList(2, "bar")))} * will generate the CQL {@code WHERE} clause {@code (a, b) IN ((1, 'foo'), (2, 'bar'))}. *

    - * Each element in {@code values} must be either a {@link List list} containing exactly as many values + * Each element in {@code values} must be either an {@link Iterable iterable} containing exactly as many values * as there are columns to match in {@code names}, * or a {@link #bindMarker() bind marker} – in which case, that marker is to be considered as * a placeholder for one whole tuple of values to match. @@ -374,7 +371,7 @@ public static Clause in(String name, List values) { * @throws IllegalArgumentException if the size of any tuple in {@code values} is not equal to {@code names.size()}, * or if {@code values} contains elements that are neither {@link List lists} nor {@link #bindMarker() bind markers}. */ - public static Clause in(List names, List values) { + public static Clause in(Iterable names, Iterable values) { return new Clause.CompoundInClause(names, values); } @@ -427,10 +424,7 @@ public static Clause lt(String name, Object value) { * @return the corresponding where clause. * @throws IllegalArgumentException if {@code names.size() != values.size()}. */ - public static Clause lt(List names, List values) { - if (names.size() != values.size()) - throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); - + public static Clause lt(Iterable names, Iterable values) { return new Clause.CompoundClause(names, "<", values); } @@ -459,10 +453,7 @@ public static Clause lte(String name, Object value) { * @return the corresponding where clause. * @throws IllegalArgumentException if {@code names.size() != values.size()}. */ - public static Clause lte(List names, List values) { - if (names.size() != values.size()) - throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); - + public static Clause lte(Iterable names, Iterable values) { return new Clause.CompoundClause(names, "<=", values); } @@ -491,10 +482,7 @@ public static Clause gt(String name, Object value) { * @return the corresponding where clause. * @throws IllegalArgumentException if {@code names.size() != values.size()}. */ - public static Clause gt(List names, List values) { - if (names.size() != values.size()) - throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); - + public static Clause gt(Iterable names, Iterable values) { return new Clause.CompoundClause(names, ">", values); } @@ -523,10 +511,7 @@ public static Clause gte(String name, Object value) { * @return the corresponding where clause. * @throws IllegalArgumentException if {@code names.size() != values.size()}. */ - public static Clause gte(List names, List values) { - if (names.size() != values.size()) - throw new IllegalArgumentException(String.format("The number of names (%d) and values (%d) don't match", names.size(), values.size())); - + public static Clause gte(Iterable names, Iterable values) { return new Clause.CompoundClause(names, ">=", values); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java index 91cf75b4243..7e1203661c0 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/querybuilder/QueryBuilderTest.java @@ -611,6 +611,10 @@ public void selectInjectionTests() throws Exception { select = select("a", "b").from("foo").where(in("a", "b", "c'); --comment")); assertEquals(select.toString(), query); + query = "SELECT a,b FROM foo WHERE a IN ('a','b','c');"; + select = select("a", "b").from("foo").where(in("a", Sets.newLinkedHashSet(Arrays.asList("a", "b", "c")))); + assertEquals(select.toString(), query); + // User Injection? query = "SELECT * FROM bar; --(b) FROM foo;"; select = select().fcall("* FROM bar; --", column("b")).from("foo"); @@ -817,7 +821,7 @@ public void compoundWhereClauseTest() throws Exception { @Test(groups = "unit", expectedExceptions = IllegalArgumentException.class, expectedExceptionsMessageRegExp = "Too many values for IN clause, the maximum allowed is 65535") public void should_fail_if_compound_in_clause_has_too_many_values() { - List values = Collections.nCopies(65536, "a"); + List values = Collections.nCopies(65536, bindMarker()); select().all().from("foo").where(eq("k", 4)).and(in(ImmutableList.of("name"), values)); } diff --git a/pom.xml b/pom.xml index d364e879a98..e31383cc2d6 100644 --- a/pom.xml +++ b/pom.xml @@ -631,7 +631,7 @@ - 3.2.0 + 3.3.0 ../clirr-ignores.xml com/datastax/shaded/** diff --git a/upgrade_guide/README.md b/upgrade_guide/README.md index 3fe68aedc74..b278a1491d5 100644 --- a/upgrade_guide/README.md +++ b/upgrade_guide/README.md @@ -3,6 +3,14 @@ The purpose of this guide is to detail changes made by successive versions of the Java driver. +### 3.4.0 + +`QueryBuilder` methods `in`, `lt`, `lte`, `eq`, `gt`, and `gte` now accept +`Iterable` as input rather than just `List`. This should have no impact unless +you were accessing these methods using reflection in which case you need to +account for these new parameter types. + + ### 3.2.0 The `SSLOptions` interface is now deprecated in favor of From 37d6817cee9736516f56c1d4591e96a517976b2d Mon Sep 17 00:00:00 2001 From: olim7t Date: Wed, 18 Oct 2017 15:50:44 -0700 Subject: [PATCH 144/512] Update docs to 4.0.0-alpha2 --- docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.yaml b/docs.yaml index 8b47643224b..2e77198921c 100644 --- a/docs.yaml +++ b/docs.yaml @@ -54,7 +54,7 @@ versions: - name: '3.3' ref: '3.3.0' - name: '4.0-alpha' - ref: '4.0.0-alpha1' + ref: '4.0.0-alpha2' - name: '3.2' ref: '3.2_docfixes' - name: '3.1' From 89f14bc40d6c6250f90938a129113a52f9d6743c Mon Sep 17 00:00:00 2001 From: Kevin Gallardo Date: Thu, 26 Oct 2017 17:16:52 -0400 Subject: [PATCH 145/512] JAVA-1527: Expose host_id and schema_version in Host metadata. (#890) --- changelog/README.md | 1 + .../driver/core/ControlConnection.java | 12 ++++++ .../java/com/datastax/driver/core/Host.java | 38 +++++++++++++++++++ .../com/datastax/driver/core/HostAssert.java | 11 ++++++ .../core/HostMetadataIntegrationTest.java | 37 ++++++++++++++++++ .../driver/core/ScassandraCluster.java | 2 + 6 files changed, 101 insertions(+) diff --git a/changelog/README.md b/changelog/README.md index 60581917209..9c18f63d5ce 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -11,6 +11,7 @@ - [documentation] JAVA-1607: Add FAQ entry for netty-transport-native-epoll. - [bug] JAVA-1630: Fix Metadata.addIfAbsent. - [improvement] JAVA-1619: Update QueryBuilder methods to support Iterable input. +- [improvement] JAVA-1527: Expose host_id and schema_version on Host metadata. ### 3.3.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java b/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java index b928bcd170b..1699d8d626b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ControlConnection.java @@ -516,6 +516,8 @@ private static void updateInfo(Host host, Row row, Cluster.Manager cluster, bool String dseVersion = row.getString("dse_version"); host.setDseVersion(dseVersion); } + host.setHostId(row.getUUID("host_id")); + host.setSchemaVersion(row.getUUID("schema_version")); } private static void updateLocationInfo(Host host, String datacenter, String rack, boolean isInitialConnection, Cluster.Manager cluster) { @@ -588,6 +590,8 @@ private static void refreshNodeListAndTokenMap(Connection connection, Cluster.Ma List dseVersions = new ArrayList(); List dseGraphEnabled = new ArrayList(); List dseWorkloads = new ArrayList(); + List hostIds = new ArrayList(); + List schemaVersions = new ArrayList(); for (Row row : peersFuture.get()) { if (!isValidPeer(row, logInvalidPeers)) @@ -617,6 +621,8 @@ private static void refreshNodeListAndTokenMap(Connection connection, Cluster.Ma dseGraphEnabled.add(isDseGraph); String dseVersion = row.getColumnDefinitions().contains("dse_version") ? row.getString("dse_version") : null; dseVersions.add(dseVersion); + hostIds.add(row.getUUID("host_id")); + schemaVersions.add(row.getUUID("schema_version")); } for (int i = 0; i < foundHosts.size(); i++) { @@ -650,6 +656,12 @@ private static void refreshNodeListAndTokenMap(Connection connection, Cluster.Ma host.setDseWorkload(dseWorkloads.get(i)); if (dseGraphEnabled.get(i) != null) host.setDseGraphEnabled(dseGraphEnabled.get(i)); + if (hostIds.get(i) != null) { + host.setHostId(hostIds.get(i)); + } + if (schemaVersions.get(i) != null) { + host.setSchemaVersion(schemaVersions.get(i)); + } if (metadataEnabled && factory != null && allTokens.get(i) != null) tokenMap.put(host, allTokens.get(i)); diff --git a/driver-core/src/main/java/com/datastax/driver/core/Host.java b/driver-core/src/main/java/com/datastax/driver/core/Host.java index 70aa7ac7f5f..4c4009c7739 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Host.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Host.java @@ -24,6 +24,7 @@ import java.net.InetAddress; import java.net.InetSocketAddress; import java.util.Set; +import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.locks.ReentrantLock; @@ -52,6 +53,10 @@ public class Host { // specified otherwise in cassandra.yaml file. private volatile InetAddress listenAddress; + private volatile UUID hostId; + + private volatile UUID schemaVersion; + enum State {ADDED, DOWN, UP} volatile State state; @@ -137,6 +142,14 @@ void setDseGraphEnabled(boolean dseGraphEnabled) { this.dseGraphEnabled = dseGraphEnabled; } + void setHostId(UUID hostId) { + this.hostId = hostId; + } + + void setSchemaVersion(UUID schemaVersion) { + this.schemaVersion = schemaVersion; + } + boolean supports(ProtocolVersion version) { return getCassandraVersion() == null || version.minCassandraVersion().compareTo(getCassandraVersion().nextStable()) <= 0; @@ -303,6 +316,31 @@ public boolean isDseGraphEnabled() { return dseGraphEnabled; } + /** + * Return the host id value for the host. + *

    + * The host id is the main identifier used by Cassandra on the server for internal + * communication (gossip). It is referenced as the column {@code host_id} in the + * {@code system.local} or {@code system.peers} table. + * + * @return the node's host id value. + */ + public UUID getHostId() { + return hostId; + } + + /** + * Return the current schema version for the host. + *

    + * Schema versions in Cassandra are used to ensure all the nodes agree on the current + * Cassandra schema when it is modified. For more information see {@link ExecutionInfo#isSchemaInAgreement()} + * + * @return the node's current schema version value. + */ + public UUID getSchemaVersion() { + return schemaVersion; + } + /** * Returns the tokens that this host owns. * diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java b/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java index 4f9573269ab..bdd66e9c43a 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostAssert.java @@ -21,6 +21,7 @@ import org.assertj.core.api.AbstractAssert; import java.net.InetAddress; +import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; @@ -197,4 +198,14 @@ public HostAssert hasNoBroadcastAddress() { assertThat(actual.getBroadcastAddress()).isNull(); return this; } + + public HostAssert hasHostId(UUID hostId) { + assertThat(actual.getHostId()).isEqualTo(hostId); + return this; + } + + public HostAssert hasSchemaVersion(UUID schemaVersion) { + assertThat(actual.getSchemaVersion()).isEqualTo(schemaVersion); + return this; + } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java b/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java index 12f7649a991..ca47236823c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/HostMetadataIntegrationTest.java @@ -15,11 +15,13 @@ */ package com.datastax.driver.core; +import com.datastax.driver.core.utils.UUIDs; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.testng.annotations.Test; import java.net.InetAddress; +import java.util.UUID; import static com.datastax.driver.core.Assertions.assertThat; import static com.datastax.driver.core.TestUtils.nonQuietClusterCloseOptions; @@ -317,4 +319,39 @@ public void should_set_listen_address_if_available() { scassandraCluster.stop(); } } + + @Test(groups = "short") + public void should_parse_host_id_and_schema_version() { + UUID hostId1 = UUIDs.random(); + UUID hostId2 = UUIDs.random(); + UUID schemaVersion = UUIDs.random(); + + ScassandraCluster scassandraCluster = ScassandraCluster.builder() + .withIpPrefix(TestUtils.IP_PREFIX) + .withNodes(2) + .forcePeerInfo(1, 1, "host_id", hostId1) + .forcePeerInfo(1, 1, "schema_version", schemaVersion) + .forcePeerInfo(1, 2, "host_id", hostId2) + .forcePeerInfo(1, 2, "schema_version", schemaVersion) + .build(); + + Cluster cluster = Cluster.builder() + .addContactPoints(scassandraCluster.address(1).getAddress()) + .withPort(scassandraCluster.getBinaryPort()) + .build(); + + try { + scassandraCluster.init(); + cluster.init(); + + assertThat(cluster).host(1).hasHostId(hostId1); + assertThat(cluster).host(1).hasSchemaVersion(schemaVersion); + assertThat(cluster).host(2).hasHostId(hostId2); + assertThat(cluster).host(2).hasSchemaVersion(schemaVersion); + + } finally { + cluster.close(); + scassandraCluster.stop(); + } + } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java b/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java index 348eb8e7579..87169aef2d3 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ScassandraCluster.java @@ -334,6 +334,7 @@ private void primeMetadata(Scassandra node) { addPeerInfo(row, dc, n + 1, "rack", getPeerInfo(dc, n + 1, "rack", "rack1")); addPeerInfo(row, dc, n + 1, "release_version", getPeerInfo(dc, n + 1, "release_version", cassandraVersion)); addPeerInfo(row, dc, n + 1, "tokens", ImmutableSet.of(tokens.get(n))); + addPeerInfo(row, dc, n + 1, "host_id", UUIDs.random()); addPeerInfo(row, dc, n + 1, "schema_version", schemaVersion); addPeerInfo(row, dc, n + 1, "graph", false); @@ -461,6 +462,7 @@ private Object getPeerInfo(int dc, int node, String property, Object defaultValu column("release_version", TEXT), column("tokens", set(TEXT)), column("graph", BOOLEAN), + column("host_id", UUID), column("schema_version", UUID) }; From 3f654e27d2bb3ade5f0c1966cbbccb092399c868 Mon Sep 17 00:00:00 2001 From: Michael Figuiere Date: Thu, 28 Sep 2017 10:11:34 -0700 Subject: [PATCH 146/512] JAVA-1632: Add a withIpPrefix(String) method to CCMBridge.Builder --- .../com/datastax/driver/core/CCMBridge.java | 64 ++++++++++++------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java index e103f0d4c7e..d79a8e8ae34 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java @@ -34,7 +34,7 @@ import java.util.regex.Matcher; import java.util.regex.Pattern; -import static com.datastax.driver.core.TestUtils.*; +import static com.datastax.driver.core.TestUtils.executeNoFail; public class CCMBridge implements CCMAccess { @@ -270,6 +270,8 @@ public static boolean isWindows() { private final int binaryPort; + private final String ipPrefix; + private final File ccmDir; private final boolean isDSE; @@ -284,11 +286,12 @@ public static boolean isWindows() { private final int[] nodes; - private CCMBridge(String clusterName, VersionNumber cassandraVersion, VersionNumber dseVersion, + private CCMBridge(String clusterName, VersionNumber cassandraVersion, VersionNumber dseVersion, String ipPrefix, int storagePort, int thriftPort, int binaryPort, String jvmArgs, int[] nodes) { this.clusterName = clusterName; this.cassandraVersion = cassandraVersion; this.dseVersion = dseVersion; + this.ipPrefix = ipPrefix; this.storagePort = storagePort; this.thriftPort = thriftPort; this.binaryPort = binaryPort; @@ -307,9 +310,13 @@ public String getClusterName() { return clusterName; } + protected String ipOfNode(int n) { + return ipPrefix + n; + } + @Override public InetSocketAddress addressOfNode(int n) { - return new InetSocketAddress(TestUtils.ipOfNode(n), binaryPort); + return new InetSocketAddress(ipOfNode(n), binaryPort); } @Override @@ -426,7 +433,7 @@ public synchronized void start() { for (int dc = 1; dc <= nodes.length; dc++) { int nodesInDc = nodes[dc - 1]; for (int i = 0; i < nodesInDc; i++) { - InetSocketAddress addr = new InetSocketAddress(ipOfNode(n), binaryPort); + InetSocketAddress addr = addressOfNode(n); logger.debug("Waiting for binary protocol to show up for {}", addr); TestUtils.waitUntilPortIsUp(addr); n++; @@ -487,7 +494,7 @@ public String checkForErrors() { @Override public void start(int n) { - logger.debug(String.format("Starting: node %s (%s%s:%s) in %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + logger.debug(String.format("Starting: node %s (%s%s:%s) in %s", n, ipPrefix, n, binaryPort, this)); try { String cmd = CCM_COMMAND + " node%d start " + jvmArgs + getStartWaitArguments(); if (isWindows() && this.cassandraVersion.compareTo(VersionNumber.parse("2.2.4")) >= 0) { @@ -511,31 +518,31 @@ public void start(int n) { @Override public void stop(int n) { - logger.debug(String.format("Stopping: node %s (%s%s:%s) in %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + logger.debug(String.format("Stopping: node %s (%s%s:%s) in %s", n, ipPrefix, n, binaryPort, this)); execute(CCM_COMMAND + " node%d stop", n); } @Override public void forceStop(int n) { - logger.debug(String.format("Force stopping: node %s (%s%s:%s) in %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + logger.debug(String.format("Force stopping: node %s (%s%s:%s) in %s", n, ipPrefix, n, binaryPort, this)); execute(CCM_COMMAND + " node%d stop --not-gently", n); } @Override public void pause(int n) { - logger.debug(String.format("Pausing: node %s (%s%s:%s) in %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + logger.debug(String.format("Pausing: node %s (%s%s:%s) in %s", n, ipPrefix, n, binaryPort, this)); execute(CCM_COMMAND + " node%d pause", n); } @Override public void resume(int n) { - logger.debug(String.format("Resuming: node %s (%s%s:%s) in %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + logger.debug(String.format("Resuming: node %s (%s%s:%s) in %s", n, ipPrefix, n, binaryPort, this)); execute(CCM_COMMAND + " node%d resume", n); } @Override public void remove(int n) { - logger.debug(String.format("Removing: node %s (%s%s:%s) from %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + logger.debug(String.format("Removing: node %s (%s%s:%s) from %s", n, ipPrefix, n, binaryPort, this)); execute(CCM_COMMAND + " node%d remove", n); } @@ -546,18 +553,18 @@ public void add(int n) { @Override public void add(int dc, int n) { - logger.debug(String.format("Adding: node %s (%s%s:%s) to %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); - String thriftItf = TestUtils.ipOfNode(n) + ":" + thriftPort; - String storageItf = TestUtils.ipOfNode(n) + ":" + storagePort; - String binaryItf = TestUtils.ipOfNode(n) + ":" + binaryPort; - String remoteLogItf = TestUtils.ipOfNode(n) + ":" + TestUtils.findAvailablePort(); + logger.debug(String.format("Adding: node %s (%s%s:%s) to %s", n, ipPrefix, n, binaryPort, this)); + String thriftItf = ipOfNode(n) + ":" + thriftPort; + String storageItf = ipOfNode(n) + ":" + storagePort; + String binaryItf = ipOfNode(n) + ":" + binaryPort; + String remoteLogItf = ipOfNode(n) + ":" + TestUtils.findAvailablePort(); execute(CCM_COMMAND + " add node%d -d dc%s -i %s%d -t %s -l %s --binary-itf %s -j %d -r %s -s -b" + (isDSE ? " --dse" : ""), - n, dc, TestUtils.IP_PREFIX, n, thriftItf, storageItf, binaryItf, TestUtils.findAvailablePort(), remoteLogItf); + n, dc, ipPrefix, n, thriftItf, storageItf, binaryItf, TestUtils.findAvailablePort(), remoteLogItf); } @Override public void decommission(int n) { - logger.debug(String.format("Decommissioning: node %s (%s%s:%s) from %s", n, TestUtils.IP_PREFIX, n, binaryPort, this)); + logger.debug(String.format("Decommissioning: node %s (%s%s:%s) from %s", n, ipPrefix, n, binaryPort, this)); // Special case for C* 3.12+, DSE 5.1+, force decommission (see CASSANDRA-12510) String cmd = CCM_COMMAND + " node%d decommission"; if (this.cassandraVersion.compareTo(VersionNumber.parse("3.12")) >= 0) { @@ -780,6 +787,7 @@ public static class Builder { public static final String RANDOM_PORT = "__RANDOM_PORT__"; private static final Pattern RANDOM_PORT_PATTERN = Pattern.compile(RANDOM_PORT); + private String ipPrefix = TestUtils.IP_PREFIX; int[] nodes = {1}; private boolean start = true; private boolean dse = false; @@ -797,6 +805,14 @@ private Builder() { cassandraConfiguration.put("native_transport_port", RANDOM_PORT); } + /** + * IP Prefix to use for the address of each node. Its format has to be like {@code "127.1.1."}. + */ + public Builder withIpPrefix(String ipPrefix) { + this.ipPrefix = ipPrefix; + return this; + } + /** * Number of hosts for each DC. Defaults to [1] (1 DC with 1 node) */ @@ -949,7 +965,7 @@ public CCMBridge build() { cassandraConfiguration.remove("rpc_port"); cassandraConfiguration.remove("thrift_prepared_statements_cache_size_mb"); } - final CCMBridge ccm = new CCMBridge(clusterName, cassandraVersion, dseVersion, storagePort, thriftPort, binaryPort, joinJvmArgs(), nodes); + final CCMBridge ccm = new CCMBridge(clusterName, cassandraVersion, dseVersion, ipPrefix, storagePort, thriftPort, binaryPort, joinJvmArgs(), nodes); Runtime.getRuntime().addShutdownHook(new Thread() { @Override @@ -1010,7 +1026,7 @@ private String buildCreateCommand(String clusterName, boolean versionConfigured, cassandraVersion, VersionNumber dseVersion) { StringBuilder result = new StringBuilder(CCM_COMMAND + " create"); result.append(" ").append(clusterName); - result.append(" -i ").append(TestUtils.IP_PREFIX); + result.append(" -i ").append(ipPrefix); result.append(" "); if (nodes.length > 0) { result.append(" -n "); @@ -1052,8 +1068,8 @@ private void updateNodeConf(CCMBridge ccm) { for (int dc = 1; dc <= nodes.length; dc++) { int nodesInDc = nodes[dc - 1]; for (int i = 0; i < nodesInDc; i++) { - int jmxPort = findAvailablePort(); - int debugPort = findAvailablePort(); + int jmxPort = TestUtils.findAvailablePort(); + int debugPort = TestUtils.findAvailablePort(); logger.trace("Node {} in cluster {} using JMX port {} and debug port {}", n, ccm.getClusterName(), jmxPort, debugPort); File nodeConf = new File(ccm.getNodeDir(n), "node.conf"); File nodeConf2 = new File(ccm.getNodeDir(n), "node.conf.tmp"); @@ -1068,7 +1084,7 @@ private void updateNodeConf(CCMBridge ccm) { if (line.startsWith("jmx_port")) { line = String.format("jmx_port: '%s'", jmxPort); } else if (line.startsWith("remote_debug_port")) { - line = String.format("remote_debug_port: %s:%s", TestUtils.ipOfNode(n), debugPort); + line = String.format("remote_debug_port: %s:%s", ipPrefix + n, debugPort); } pw.println(line); } @@ -1128,6 +1144,7 @@ public boolean equals(Object o) { Builder builder = (Builder) o; + if (ipPrefix != builder.ipPrefix) return false; if (dse != builder.dse) return false; if (!Arrays.equals(nodes, builder.nodes)) return false; if (version != null ? !version.equals(builder.version) : builder.version != null) return false; @@ -1143,6 +1160,7 @@ public int hashCode() { // do not include start as it is not relevant to the settings of the cluster. int result = Arrays.hashCode(nodes); result = 31 * result + (dse ? 1 : 0); + result = 31 * result + ipPrefix.hashCode(); result = 31 * result + (version != null ? version.hashCode() : 0); result = 31 * result + createOptions.hashCode(); result = 31 * result + jvmArgs.hashCode(); @@ -1153,4 +1171,4 @@ public int hashCode() { } } -} +} \ No newline at end of file From 841089a33845a4d5ceed6e5870239ee28bd97cc1 Mon Sep 17 00:00:00 2001 From: Michael Figuiere Date: Tue, 26 Sep 2017 22:45:38 -0700 Subject: [PATCH 147/512] JAVA-1631 Publish a sources jar for driver-core-tests --- driver-core/pom.xml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 0cb71e8ef08..2fcf924672a 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -189,6 +189,18 @@ We avoid packaging bundle because it does not play nicely with the shade plugin, see https://stackoverflow.com/questions/31262032/maven-shade-plugin-and-custom-packaging-type --> + + org.apache.maven.plugins + maven-source-plugin + + + attach-test-sources + + test-jar-no-fork + + + + org.apache.felix maven-bundle-plugin From a5914648eafad8b905207fb7268d22b9d623faa3 Mon Sep 17 00:00:00 2001 From: tommystendahl Date: Fri, 27 Oct 2017 00:24:23 +0200 Subject: [PATCH 148/512] JAVA-1377: Add support for TWCS in SchemaBuilder (#897) --- changelog/README.md | 2 + .../core/schemabuilder/SchemaBuilder.java | 11 + .../core/schemabuilder/TableOptions.java | 204 +++++++++++++++++- .../schemabuilder/CompactionOptionsTest.java | 42 +++- 4 files changed, 253 insertions(+), 6 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 9c18f63d5ce..bc3a45e1f04 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -2,6 +2,7 @@ ### 3.4.0 (In progress) +- [improvement] JAVA-1377: Add support for TWCS in SchemaBuilder. - [bug] JAVA-1555: Include VIEW and CDC in WriteType. - [bug] JAVA-1599: exportAsString improvements (sort, format, clustering order) - [improvement] JAVA-1587: Deterministic ordering of columns used in Mapper#saveQuery @@ -12,6 +13,7 @@ - [bug] JAVA-1630: Fix Metadata.addIfAbsent. - [improvement] JAVA-1619: Update QueryBuilder methods to support Iterable input. - [improvement] JAVA-1527: Expose host_id and schema_version on Host metadata. +- [new feature] JAVA-1377: Add support for TWCS in SchemaBuilder. ### 3.3.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaBuilder.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaBuilder.java index bad84a7acca..3162e2f5dcf 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaBuilder.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/SchemaBuilder.java @@ -256,6 +256,17 @@ public static TableOptions.CompactionOptions.DateTieredCompactionStrategyOptions return new TableOptions.CompactionOptions.DateTieredCompactionStrategyOptions(); } + /** + * Create options for the time window compaction strategy, to use in a CREATE or ALTER TABLE statement. + *

    + * This strategy was introduced in Cassandra 3.0.8 and 3.9. + * + * @return the options. + */ + public static TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions timeWindowCompactionStrategy() { + return new TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions(); + } + /** * Create options for the {@code NONE} compression strategy, to use in a CREATE or ALTER TABLE statement. * diff --git a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/TableOptions.java b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/TableOptions.java index a05029e223f..9771d3c88c0 100755 --- a/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/TableOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/schemabuilder/TableOptions.java @@ -506,8 +506,9 @@ static void validateRateValue(Double rateValue, String property) { *

    * To create instances, use * {@link SchemaBuilder#sizedTieredStategy()}, - * {@link SchemaBuilder#leveledStrategy()} or - * {@link SchemaBuilder#dateTieredStrategy()} + * {@link SchemaBuilder#leveledStrategy()}, + * {@link SchemaBuilder#dateTieredStrategy()} or + * {@link SchemaBuilder#timeWindowCompactionStrategy()} */ public static abstract class CompactionOptions { @@ -940,10 +941,205 @@ public String build() { } /** - * Compaction strategies. Possible values: SIZED_TIERED, LEVELED & DATE_TIERED + * Compaction options specific to the time window strategy. + */ + public static class TimeWindowCompactionStrategyOptions extends CompactionOptions { + + public enum CompactionWindowUnit {MINUTES, HOURS, DAYS} + + public enum TimeStampResolution {MICROSECONDS, MILLISECONDS} + + private Optional bucketHigh = Optional.absent(); + + private Optional bucketLow = Optional.absent(); + + private Optional compactionWindowUnit = Optional.absent(); + + private Optional compactionWindowSize = Optional.absent(); + + private Optional minThreshold = Optional.absent(); + + private Optional maxThreshold = Optional.absent(); + + private Optional minSSTableSizeInBytes = Optional.absent(); + + private Optional timestampResolution = Optional.absent(); + + private Optional unsafeAggressiveSSTableExpiration = Optional.absent(); + + TimeWindowCompactionStrategyOptions() { + super(Strategy.TIME_WINDOW); + } + + /** + * Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the bucketHigh value used in STCS. + *

    + * If no call is made to this method, the default value set by Cassandra is 1.5. + * + * @param bucketHigh the new value. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions bucketHigh(Double bucketHigh) { + this.bucketHigh = Optional.fromNullable(bucketHigh); + return this; + } + + /** + * Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the bucketLow value used in STCS. + *

    + * If no call is made to this method, the default value set by Cassandra is 0.5. + * + * @param bucketLow the new value. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions bucketLow(Double bucketLow) { + this.bucketLow = Optional.fromNullable(bucketLow); + return this; + } + + /** + * Sets the time unit used to define the window size + *

    + * If no call is made to this method, the default value set by Cassandra is {@code DAYS}. + * + * @param compactionWindowUnit {@link CompactionWindowUnit#MINUTES}, {@link CompactionWindowUnit#HOURS} or {@link CompactionWindowUnit#DAYS}. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions compactionWindowUnit(CompactionWindowUnit compactionWindowUnit) { + this.compactionWindowUnit = Optional.fromNullable(compactionWindowUnit); + return this; + } + + /** + * Sets the number of units that make up a window. + *

    + * If no call is made to this method, the default value set by Cassandra is 1. + * + * @param compactionWindowSize the size of the first window. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions compactionWindowSize(Integer compactionWindowSize) { + this.compactionWindowSize = Optional.fromNullable(compactionWindowSize); + return this; + } + + /** + * Sets the minimum number of SSTables to trigger a minor compaction + *

    + * If no call is made to this method, the default value set by Cassandra is 4. + * + * @param minThreshold the new value. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions minThreshold(Integer minThreshold) { + this.minThreshold = Optional.fromNullable(minThreshold); + return this; + } + + /** + * Sets the maximum number of SSTables to allow in a minor compaction. + *

    + * If no call is made to this method, the default value set by Cassandra is 32. + * + * @param maxThreshold the new value. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions maxThreshold(Integer maxThreshold) { + this.maxThreshold = Optional.fromNullable(maxThreshold); + return this; + } + + /** + * Size-tiered compaction strategy (STCS) is used in the newest window, this method sets the minSSTableSize value used in STCS. + *

    + * If no call is made to this method, the default value set by Cassandra is 52428800 (50 MB). + * + * @param minSSTableSize the new value. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions minSSTableSizeInBytes(Long minSSTableSize) { + this.minSSTableSizeInBytes = Optional.fromNullable(minSSTableSize); + return this; + } + + /** + * Sets the timestamp resolution, depending on the timestamp unit of the data you insert. + *

    + * If no call is made to this method, the default value set by Cassandra is {@code MICROSECONDS}. + * + * @param timestampResolution {@link TimeStampResolution#MICROSECONDS} or {@link TimeStampResolution#MILLISECONDS}. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions timestampResolution(TimeStampResolution timestampResolution) { + this.timestampResolution = Optional.fromNullable(timestampResolution); + return this; + } + + /** + * Allow expired sstables to be dropped without checking if its data is shadowing other sstables. + * This is a potentially risky option that can lead to data loss or deleted data re-appearing. + *

    + * If no call is made to this method, the default value set by Cassandra is false. + * + * @param unsafeAggressiveSSTableExpiration whether to enable unsafe aggressive sstable expiration option. + * @return this object (for call chaining). + */ + public TimeWindowCompactionStrategyOptions unsafeAggressiveSSTableExpiration(Boolean unsafeAggressiveSSTableExpiration) { + this.unsafeAggressiveSSTableExpiration = Optional.fromNullable(unsafeAggressiveSSTableExpiration); + return this; + } + + @Override + public String build() { + final List generalOptions = super.buildCommonOptions(); + + List options = new ArrayList(generalOptions); + + if (bucketHigh.isPresent()) { + options.add("'bucket_high' : " + bucketHigh.get()); + } + + if (bucketLow.isPresent()) { + options.add("'bucket_low' : " + bucketLow.get()); + } + + if (compactionWindowUnit.isPresent()) { + options.add("'compaction_window_unit' : '" + compactionWindowUnit.get() + "'"); + } + + if (compactionWindowSize.isPresent()) { + options.add("'compaction_window_size' : " + compactionWindowSize.get()); + } + + if (minThreshold.isPresent()) { + options.add("'min_threshold' : " + minThreshold.get()); + } + + if (maxThreshold.isPresent()) { + options.add("'max_threshold' : " + maxThreshold.get()); + } + + if (minSSTableSizeInBytes.isPresent()) { + options.add("'min_sstable_size' : " + minSSTableSizeInBytes.get()); + } + + if (timestampResolution.isPresent()) { + options.add("'timestamp_resolution' : '" + timestampResolution.get() + "'"); + } + + if (unsafeAggressiveSSTableExpiration.isPresent()) { + options.add("'unsafe_aggressive_sstable_expiration' : '" + unsafeAggressiveSSTableExpiration.get() + "'"); + } + + return "{" + Joiner.on(", ").join(options) + "}"; + } + } + + /** + * Compaction strategies. Possible values: SIZED_TIERED, LEVELED, DATE_TIERED AND TIME_WINDOW */ public static enum Strategy { - SIZED_TIERED("'SizeTieredCompactionStrategy'"), LEVELED("'LeveledCompactionStrategy'"), DATE_TIERED("'DateTieredCompactionStrategy'"); + SIZED_TIERED("'SizeTieredCompactionStrategy'"), LEVELED("'LeveledCompactionStrategy'"), DATE_TIERED("'DateTieredCompactionStrategy'"), TIME_WINDOW("'TimeWindowCompactionStrategy'"); private String strategyClass; diff --git a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompactionOptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompactionOptionsTest.java index b5f01a92d05..dfff5765a38 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompactionOptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/schemabuilder/CompactionOptionsTest.java @@ -18,7 +18,9 @@ import org.testng.annotations.Test; import static com.datastax.driver.core.schemabuilder.SchemaBuilder.*; -import static com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions.DateTieredCompactionStrategyOptions.TimeStampResolution; +import static com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions.DateTieredCompactionStrategyOptions; +import static com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions; +import static com.datastax.driver.core.schemabuilder.TableOptions.CompactionOptions.TimeWindowCompactionStrategyOptions.CompactionWindowUnit; import static org.assertj.core.api.Assertions.assertThat; public class CompactionOptionsTest { @@ -82,7 +84,7 @@ public void should_create_date_tiered_compaction_option() throws Exception { .maxSSTableAgeDays(400) .minThreshold(2) .maxThreshold(4) - .timestampResolution(TimeStampResolution.MICROSECONDS) + .timestampResolution(DateTieredCompactionStrategyOptions.TimeStampResolution.MICROSECONDS) .tombstoneCompactionIntervalInDay(3) .tombstoneThreshold(0.7) .uncheckedTombstoneCompaction(true) @@ -101,6 +103,42 @@ public void should_create_date_tiered_compaction_option() throws Exception { "'timestamp_resolution' : 'MICROSECONDS'}"); } + @Test(groups = "unit") + public void should_create_time_window_compaction_option() throws Exception { + //When + String built = timeWindowCompactionStrategy() + .bucketLow(0.5) + .bucketHigh(1.2) + .compactionWindowUnit(CompactionWindowUnit.HOURS) + .compactionWindowSize(5) + .enabled(true) + .minThreshold(2) + .maxThreshold(4) + .minSSTableSizeInBytes(5000000L) + .timestampResolution(TimeWindowCompactionStrategyOptions.TimeStampResolution.MICROSECONDS) + .tombstoneCompactionIntervalInDay(3) + .tombstoneThreshold(0.7) + .uncheckedTombstoneCompaction(true) + .unsafeAggressiveSSTableExpiration(true) + .build(); + + //Then + assertThat(built).isEqualTo("{'class' : 'TimeWindowCompactionStrategy', " + + "'enabled' : true, " + + "'tombstone_compaction_interval' : 3, " + + "'tombstone_threshold' : 0.7, " + + "'unchecked_tombstone_compaction' : true, " + + "'bucket_high' : 1.2, " + + "'bucket_low' : 0.5, " + + "'compaction_window_unit' : 'HOURS', " + + "'compaction_window_size' : 5, " + + "'min_threshold' : 2, " + + "'max_threshold' : 4, " + + "'min_sstable_size' : 5000000, " + + "'timestamp_resolution' : 'MICROSECONDS', " + + "'unsafe_aggressive_sstable_expiration' : 'true'}"); + } + @Test(groups = "unit") public void should_handle_freeform_options() { //When From dacffc7fd4791d95cdbf9c35e90f6f15b2834f4a Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 26 Oct 2017 17:26:16 -0500 Subject: [PATCH 149/512] Update changelog for JAVA-1631 and JAVA-1632 --- changelog/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/changelog/README.md b/changelog/README.md index bc3a45e1f04..39ce1519be3 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -14,6 +14,8 @@ - [improvement] JAVA-1619: Update QueryBuilder methods to support Iterable input. - [improvement] JAVA-1527: Expose host_id and schema_version on Host metadata. - [new feature] JAVA-1377: Add support for TWCS in SchemaBuilder. +- [improvement] JAVA-1631: Publish a sources jar for driver-core-tests. +- [improvement] JAVA-1632: Add a withIpPrefix(String) method to CCMBridge.Builder. ### 3.3.0 From 021bf5d5e48c62165e146c2a955e70376a665b41 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 26 Oct 2017 17:37:16 -0500 Subject: [PATCH 150/512] Remove duplicate changelog entry --- changelog/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/changelog/README.md b/changelog/README.md index 39ce1519be3..0b61e62a432 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -2,7 +2,6 @@ ### 3.4.0 (In progress) -- [improvement] JAVA-1377: Add support for TWCS in SchemaBuilder. - [bug] JAVA-1555: Include VIEW and CDC in WriteType. - [bug] JAVA-1599: exportAsString improvements (sort, format, clustering order) - [improvement] JAVA-1587: Deterministic ordering of columns used in Mapper#saveQuery From 69cf23bc5aa2fd1765d609ecbe1180cfc5212596 Mon Sep 17 00:00:00 2001 From: emolsson Date: Fri, 27 Oct 2017 17:50:26 +0200 Subject: [PATCH 151/512] JAVA-1639: VersionNumber does not fullfill equals/hashcode contract (#898) --- changelog/README.md | 1 + .../java/com/datastax/driver/core/VersionNumber.java | 2 +- .../java/com/datastax/driver/core/VersionNumberTest.java | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/changelog/README.md b/changelog/README.md index 0b61e62a432..70ab47433cf 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -15,6 +15,7 @@ - [new feature] JAVA-1377: Add support for TWCS in SchemaBuilder. - [improvement] JAVA-1631: Publish a sources jar for driver-core-tests. - [improvement] JAVA-1632: Add a withIpPrefix(String) method to CCMBridge.Builder. +- [bug] JAVA-1639: VersionNumber does not fullfill equals/hashcode contract. ### 3.3.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java b/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java index 2f83dd18606..ff3e4aac83b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java +++ b/driver-core/src/main/java/com/datastax/driver/core/VersionNumber.java @@ -233,7 +233,7 @@ public boolean equals(Object other) { @Override public int hashCode() { - return MoreObjects.hashCode(major, minor, patch, dsePatch, preReleases, build); + return MoreObjects.hashCode(major, minor, patch, dsePatch, Arrays.hashCode(preReleases), build); } @Override diff --git a/driver-core/src/test/java/com/datastax/driver/core/VersionNumberTest.java b/driver-core/src/test/java/com/datastax/driver/core/VersionNumberTest.java index df1601b48b6..c6127a7b5f6 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/VersionNumberTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/VersionNumberTest.java @@ -98,6 +98,15 @@ public void should_order_versions() { assertOrder("2.0.0+build01", "2.0.0+build02", 0); } + @Test(groups = "unit") + public void should_treat_same_prerelease_equal() { + VersionNumber version1 = VersionNumber.parse("3.0.15-SNAPSHOT"); + VersionNumber version2 = VersionNumber.parse("3.0.15-SNAPSHOT"); + + assertThat(version1).isEqualTo(version2); + assertThat(version1.hashCode()).isEqualTo(version2.hashCode()); + } + private void assertOrder(String version1, String version2, int expected) { assertThat(VersionNumber.parse(version1).compareTo(VersionNumber.parse(version2))).isEqualTo(expected); } From 119e051f4c0f438653254153cfc1327afbbdb4fe Mon Sep 17 00:00:00 2001 From: olim7t Date: Thu, 19 Oct 2017 11:23:59 -0700 Subject: [PATCH 152/512] Update reference for 4.x docs (fixed broken links) --- docs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs.yaml b/docs.yaml index 2e77198921c..b38b86397d7 100644 --- a/docs.yaml +++ b/docs.yaml @@ -54,7 +54,7 @@ versions: - name: '3.3' ref: '3.3.0' - name: '4.0-alpha' - ref: '4.0.0-alpha2' + ref: '9f0edeb' - name: '3.2' ref: '3.2_docfixes' - name: '3.1' From 34093ebcd93e793447a0ad819009ccffc832fc1a Mon Sep 17 00:00:00 2001 From: olim7t Date: Wed, 1 Nov 2017 09:49:45 -0700 Subject: [PATCH 153/512] JAVA-1648: Fix Guava links in docs Refer to the driver's default version. --- manual/custom_codecs/README.md | 2 +- manual/custom_codecs/extras/README.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manual/custom_codecs/README.md b/manual/custom_codecs/README.md index e30d9534ccf..ead31b9a578 100644 --- a/manual/custom_codecs/README.md +++ b/manual/custom_codecs/README.md @@ -463,7 +463,7 @@ consider using prepared statements all the time. [TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html [TupleValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleValue.html [CustomType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/DataType.CustomType.html -[TypeToken]: http://google.github.io/guava/releases/21.0/api/docs/com/google/common/reflect/TypeToken.html +[TypeToken]: https://google.github.io/guava/releases/19.0/api/docs/com/google/common/reflect/TypeToken.html [SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SimpleStatement.html [BuiltStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/BuiltStatement.html [setList]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SettableByIndexData.html#setList-int-java.util.List- diff --git a/manual/custom_codecs/extras/README.md b/manual/custom_codecs/extras/README.md index 0441cd82d60..94454f28b78 100644 --- a/manual/custom_codecs/extras/README.md +++ b/manual/custom_codecs/extras/README.md @@ -311,7 +311,7 @@ often. [OptionalCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.html [Optional]: https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html -[TypeToken]: http://google.github.io/guava/releases/21.0/api/docs/com/google/common/reflect/TypeToken.html +[TypeToken]: http://google.github.io/guava/releases/19.0/api/docs/com/google/common/reflect/TypeToken.html #### Guava @@ -354,7 +354,7 @@ session.execute(pst.bind() See the JDK8 Optional section above for explanations about [TypeToken]. [OptionalCodec_guava]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/guava/OptionalCodec.html -[Optional_guava]: http://google.github.io/guava/releases/21.0/api/docs/com/google/common/base/Optional.html +[Optional_guava]: http://google.github.io/guava/releases/19.0/api/docs/com/google/common/base/Optional.html ### Arrays From 514b8ec2c6acd4b9e5a2bb40f770a95a8720bb4a Mon Sep 17 00:00:00 2001 From: olim7t Date: Wed, 1 Nov 2017 09:51:59 -0700 Subject: [PATCH 154/512] Bump version to 3.3.1-SNAPSHOT --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 2fcf924672a..dc75330bc85 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 765631a4adf..5e78fdeac94 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 185b84ac29c..6493c014516 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index cfcc92c8285..afcc6d863d3 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 9311f2e63cf..eba4e610cf4 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index cda762fdd8b..2616fb75db0 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 1a79b393cc3..dcce75bcfb0 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 98b0f0d47f0..745cc6aa10e 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index e3e9be9aa8b..61f86f6c5dd 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index 1985767b273..aa87180b1f8 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 94fcdf763e2..c518ca88c7d 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index e31383cc2d6..7939b9d11fc 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.3.1-SNAPSHOT pom DataStax Java Driver for Apache Cassandra From a593410672bf2f0ef05f1ccffa78075bc76537f6 Mon Sep 17 00:00:00 2001 From: olim7t Date: Wed, 1 Nov 2017 12:00:56 -0700 Subject: [PATCH 155/512] Fix changelog - change latest version - move 1613 to the correct section --- changelog/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 70ab47433cf..3dade10f0e8 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,6 +1,6 @@ ## Changelog -### 3.4.0 (In progress) +### 3.3.1 (In progress) - [bug] JAVA-1555: Include VIEW and CDC in WriteType. - [bug] JAVA-1599: exportAsString improvements (sort, format, clustering order) @@ -16,6 +16,7 @@ - [improvement] JAVA-1631: Publish a sources jar for driver-core-tests. - [improvement] JAVA-1632: Add a withIpPrefix(String) method to CCMBridge.Builder. - [bug] JAVA-1639: VersionNumber does not fullfill equals/hashcode contract. +- [bug] JAVA-1613: Fix broken shaded Netty detection in NettyUtil. ### 3.3.0 @@ -36,7 +37,6 @@ - [improvement] JAVA-1488: Upgrade Netty to 4.0.47.Final. - [improvement] JAVA-1460: Add speculative execution number to ExecutionInfo - [improvement] JAVA-1431: Improve error handling during pool initialization. -- [bug] JAVA-1613: Fix broken shaded Netty detection in NettyUtil. ### 3.2.0 From cbc1f149afe93bf25dba9aab7ffffebd066421e1 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 7 Nov 2017 13:19:02 -0800 Subject: [PATCH 156/512] Update version in docs --- README.md | 14 ++--- changelog/README.md | 2 +- faq/README.md | 4 +- faq/osgi/README.md | 2 +- manual/README.md | 30 +++++------ manual/address_resolution/README.md | 4 +- manual/async/README.md | 8 +-- manual/auth/README.md | 2 +- manual/compression/README.md | 2 +- manual/custom_codecs/README.md | 38 +++++++------- manual/custom_codecs/extras/README.md | 44 ++++++++-------- manual/custom_payloads/README.md | 4 +- manual/idempotence/README.md | 6 +-- manual/load_balancing/README.md | 34 ++++++------ manual/logging/README.md | 2 +- manual/metadata/README.md | 38 +++++++------- manual/metrics/README.md | 2 +- manual/native_protocol/README.md | 10 ++-- manual/object_mapper/README.md | 2 +- manual/object_mapper/creating/README.md | 24 ++++----- manual/object_mapper/custom_codecs/README.md | 6 +-- manual/object_mapper/using/README.md | 18 +++---- manual/paging/README.md | 4 +- manual/pooling/README.md | 26 +++++----- manual/query_timestamps/README.md | 8 +-- manual/reconnection/README.md | 2 +- manual/retries/README.md | 54 ++++++++++---------- manual/shaded_jar/README.md | 8 +-- manual/socket_options/README.md | 24 ++++----- manual/speculative_execution/README.md | 22 ++++---- manual/ssl/README.md | 10 ++-- manual/statements/README.md | 16 +++--- manual/statements/batch/README.md | 2 +- manual/statements/built/README.md | 2 +- manual/statements/prepared/README.md | 12 ++--- manual/statements/simple/README.md | 2 +- manual/tuples/README.md | 8 +-- manual/udts/README.md | 2 +- 38 files changed, 249 insertions(+), 249 deletions(-) diff --git a/README.md b/README.md index 25b0d4754d7..db302c4e2f6 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ not yet have been released. You can find the documentation for latest version through [Java driver docs](http://datastax.github.io/java-driver/) or via the release tags, [e.g. -3.3.0](https://github.com/datastax/java-driver/tree/3.3.0).* +3.3.1](https://github.com/datastax/java-driver/tree/3.3.1).* A modern, [feature-rich](manual/) and highly tunable Java client library for Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using @@ -55,7 +55,7 @@ The driver contains the following modules: start material and technical details about the driver and its features. - API: http://www.datastax.com/drivers/java/3.2 - [changelog](changelog/) -- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.0.tar.gz) +- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.1.tar.gz) **Feeback requested:** help us focus our efforts, provide your input on the [Platform and Runtime Survey](http://goo.gl/forms/qwUE6qnL7U) (we kept it short). @@ -68,7 +68,7 @@ it in your application using the following Maven dependency: com.datastax.cassandra cassandra-driver-core - 3.3.0 + 3.3.1 ``` @@ -78,7 +78,7 @@ Note that the object mapper is published as a separate artifact: com.datastax.cassandra cassandra-driver-mapping - 3.3.0 + 3.3.1 ``` @@ -88,7 +88,7 @@ The 'extras' module is also published as a separate artifact: com.datastax.cassandra cassandra-driver-extras - 3.3.0 + 3.3.1 ``` @@ -97,12 +97,12 @@ We also provide a [shaded JAR](manual/shaded_jar/) to avoid the explicit dependency to Netty. If you can't use a dependency management tool, a -[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.0.tar.gz) +[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.1.tar.gz) is available for download. ## Compatibility -The Java client driver 3.3.0 ([branch 3.x](https://github.com/datastax/java-driver/tree/3.x)) is compatible with Apache +The Java client driver 3.3.1 ([branch 3.x](https://github.com/datastax/java-driver/tree/3.x)) is compatible with Apache Cassandra 1.2, 2.0, 2.1, 2.2 and 3.0 (see [this page](http://datastax.github.io/java-driver/manual/native_protocol) for the most up-to-date compatibility information). diff --git a/changelog/README.md b/changelog/README.md index 3dade10f0e8..881b98753f2 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,6 +1,6 @@ ## Changelog -### 3.3.1 (In progress) +### 3.3.1 - [bug] JAVA-1555: Include VIEW and CDC in WriteType. - [bug] JAVA-1599: exportAsString improvements (sort, format, clustering order) diff --git a/faq/README.md b/faq/README.md index abd221933a1..d902570f6bf 100644 --- a/faq/README.md +++ b/faq/README.md @@ -35,7 +35,7 @@ row.getBool(0); // this is equivalent row.getBool("applied") Note that, unlike manual inspection, `wasApplied` does not consume the first row. -[wasApplied]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html#wasApplied-- +[wasApplied]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ResultSet.html#wasApplied-- ### What is a parameterized statement and how can I use it? @@ -258,7 +258,7 @@ If properly used, the following log message will be logged at INFO on startup: > Found Netty's native epoll transport in the classpath, but NIO was forced through the FORCE_NIO system property. -[Blobs.java]: https://github.com/datastax/java-driver/tree/3.3.0/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java +[Blobs.java]: https://github.com/datastax/java-driver/tree/3.3.1/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java [CASSANDRA-7304]: https://issues.apache.org/jira/browse/CASSANDRA-7304 [Parameters and Binding]: ../manual/statements/prepared/#parameters-and-binding [Mapper options]: ../manual/object_mapper/using/#mapper-options diff --git a/faq/osgi/README.md b/faq/osgi/README.md index 82de85ac591..0b1d3752c68 100644 --- a/faq/osgi/README.md +++ b/faq/osgi/README.md @@ -157,7 +157,7 @@ it is also normal to see the following log lines when starting the driver: [BND]:http://bnd.bndtools.org/ [Maven bundle plugin]:https://cwiki.apache.org/confluence/display/FELIX/Apache+Felix+Maven+Bundle+Plugin+%28BND%29 [OSGi examples repository]:https://github.com/datastax/java-driver-examples-osgi -[without metrics]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.Builder.html#withoutMetrics-- +[without metrics]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Cluster.Builder.html#withoutMetrics-- [SLF4J]:http://www.slf4j.org/ [Logback]:http://logback.qos.ch/ [Tycho]:https://eclipse.org/tycho/ diff --git a/manual/README.md b/manual/README.md index 019d9941290..0e8e3c32632 100644 --- a/manual/README.md +++ b/manual/README.md @@ -209,7 +209,7 @@ String firstName = row.getString("first_name"); blob getBytes java.nio.ByteBuffer boolean getBool boolean counter getLong long - date getDate LocalDate + date getDate LocalDate decimal getDecimal java.math.BigDecimal double getDouble double float getFloat float @@ -286,17 +286,17 @@ menu on the left hand side to navigate sub-sections. If you're [browsing the sou github.com](https://github.com/datastax/java-driver/tree/3.x/manual), simply navigate to each sub-directory. -[Cluster]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.html -[Cluster.Builder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.Builder.html -[Initializer]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.Initializer.html -[Session]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html -[ResultSet]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html -[Row]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Row.html -[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/NettyOptions.html -[QueryOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html -[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html -[Host.StateListener]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Host.StateListener.html -[LatencyTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/LatencyTracker.html -[SchemaChangeListener]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SchemaChangeListener.html -[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html -[LocalDate]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/LocalDate.html \ No newline at end of file +[Cluster]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Cluster.html +[Cluster.Builder]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Cluster.Builder.html +[Initializer]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Cluster.Initializer.html +[Session]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.html +[ResultSet]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ResultSet.html +[Row]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Row.html +[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/NettyOptions.html +[QueryOptions]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/QueryOptions.html +[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html +[Host.StateListener]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Host.StateListener.html +[LatencyTracker]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/LatencyTracker.html +[SchemaChangeListener]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SchemaChangeListener.html +[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[LocalDate]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/LocalDate.html \ No newline at end of file diff --git a/manual/address_resolution/README.md b/manual/address_resolution/README.md index 619fdf574d3..9613f0be7c5 100644 --- a/manual/address_resolution/README.md +++ b/manual/address_resolution/README.md @@ -102,8 +102,8 @@ private/public switch automatically based on location). -[AddressTranslator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/AddressTranslator.html -[EC2MultiRegionAddressTranslator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslator.html +[AddressTranslator]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/AddressTranslator.html +[EC2MultiRegionAddressTranslator]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/EC2MultiRegionAddressTranslator.html [cassandra.yaml]: https://docs.datastax.com/en/cassandra/3.x/cassandra/configuration/configCassandra_yaml.html [rpc_address]: https://docs.datastax.com/en/cassandra/3.x/cassandra/configuration/configCassandra_yaml.html?scroll=configCassandra_yaml__rpc_address diff --git a/manual/async/README.md b/manual/async/README.md index abc93059f21..b40f6113c60 100644 --- a/manual/async/README.md +++ b/manual/async/README.md @@ -51,8 +51,8 @@ to the current page, and [fetchMoreResults] to get a future to the next page (see also the section on [paging](../paging/)). Here is a full example: -[getAvailableWithoutFetching]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html#getAvailableWithoutFetching-- -[fetchMoreResults]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html#fetchMoreResults-- +[getAvailableWithoutFetching]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ResultSet.html#getAvailableWithoutFetching-- +[fetchMoreResults]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ResultSet.html#fetchMoreResults-- ```java Statement statement = new SimpleStatement("select * from foo").setFetchSize(20); @@ -134,5 +134,5 @@ There are still a few places where the driver will block internally hasn't been fetched already. [ListenableFuture]: https://github.com/google/guava/wiki/ListenableFutureExplained -[init]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.html#init-- -[query trace]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryTrace.html +[init]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Cluster.html#init-- +[query trace]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/QueryTrace.html diff --git a/manual/auth/README.md b/manual/auth/README.md index 430e776fa4b..1a5823913cb 100644 --- a/manual/auth/README.md +++ b/manual/auth/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [AuthProvider].* -[AuthProvider]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AuthProvider.html \ No newline at end of file +[AuthProvider]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/AuthProvider.html \ No newline at end of file diff --git a/manual/compression/README.md b/manual/compression/README.md index dad0e5e5b94..7bbb89aedbe 100644 --- a/manual/compression/README.md +++ b/manual/compression/README.md @@ -85,4 +85,4 @@ cluster = Cluster.builder() .build(); ``` -[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.3.0/cassandra-driver-parent-3.3.0.pom +[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.3.1/cassandra-driver-parent-3.3.1.pom diff --git a/manual/custom_codecs/README.md b/manual/custom_codecs/README.md index ead31b9a578..856c368c0fa 100644 --- a/manual/custom_codecs/README.md +++ b/manual/custom_codecs/README.md @@ -446,26 +446,26 @@ Beware that in these cases, the lookup performs in average 10x worse. If perform consider using prepared statements all the time. [JAVA-721]: https://datastax-oss.atlassian.net/browse/JAVA-721 -[TypeCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html -[LocalDate]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/LocalDate.html +[TypeCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TypeCodec.html +[LocalDate]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/LocalDate.html [ByteBuffer]: http://docs.oracle.com/javase/8/docs/api/java/nio/ByteBuffer.html -[serialize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#serialize-T-com.datastax.driver.core.ProtocolVersion- -[deserialize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#deserialize-java.nio.ByteBuffer-com.datastax.driver.core.ProtocolVersion- -[TypeCodec.format]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#format-T- -[TypeCodec.parse]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#parse-java.lang.String- -[accepts]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TypeCodec.html#accepts-com.datastax.driver.core.DataType- -[CodecRegistry]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/CodecRegistry.html -[CodecNotFoundException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/CodecNotFoundException.html +[serialize]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TypeCodec.html#serialize-T-com.datastax.driver.core.ProtocolVersion- +[deserialize]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TypeCodec.html#deserialize-java.nio.ByteBuffer-com.datastax.driver.core.ProtocolVersion- +[TypeCodec.format]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TypeCodec.html#format-T- +[TypeCodec.parse]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TypeCodec.html#parse-java.lang.String- +[accepts]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TypeCodec.html#accepts-com.datastax.driver.core.DataType- +[CodecRegistry]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/CodecRegistry.html +[CodecNotFoundException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/CodecNotFoundException.html [Jackson]: https://github.com/FasterXML/jackson [AbstractType]: https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/marshal/AbstractType.java -[UserType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/UserType.html -[UDTValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/UDTValue.html -[TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html -[TupleValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleValue.html -[CustomType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/DataType.CustomType.html +[UserType]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/UserType.html +[UDTValue]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/UDTValue.html +[TupleType]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TupleType.html +[TupleValue]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TupleValue.html +[CustomType]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/DataType.CustomType.html [TypeToken]: https://google.github.io/guava/releases/19.0/api/docs/com/google/common/reflect/TypeToken.html -[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SimpleStatement.html -[BuiltStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/BuiltStatement.html -[setList]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SettableByIndexData.html#setList-int-java.util.List- -[setSet]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SettableByIndexData.html#setSet-int-java.util.Set- -[setMap]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SettableByIndexData.html#setMap-int-java.util.Map- +[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SimpleStatement.html +[BuiltStatement]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/querybuilder/BuiltStatement.html +[setList]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SettableByIndexData.html#setList-int-java.util.List- +[setSet]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SettableByIndexData.html#setSet-int-java.util.Set- +[setMap]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SettableByIndexData.html#setMap-int-java.util.Map- diff --git a/manual/custom_codecs/extras/README.md b/manual/custom_codecs/extras/README.md index 94454f28b78..9a30f888380 100644 --- a/manual/custom_codecs/extras/README.md +++ b/manual/custom_codecs/extras/README.md @@ -10,7 +10,7 @@ The module is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-extras - 3.3.0 + 3.3.1 ``` @@ -58,10 +58,10 @@ session.execute("INSERT INTO example (id, t) VALUES (1, ?)", ZonedDateTime.parse("2010-06-30T01:20:47.999+01:00")); ``` -[InstantCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/InstantCodec.html -[LocalDateCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.html -[LocalTimeCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.html -[ZonedDateTimeCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.html +[InstantCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/jdk8/InstantCodec.html +[LocalDateCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/jdk8/LocalDateCodec.html +[LocalTimeCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/jdk8/LocalTimeCodec.html +[ZonedDateTimeCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/jdk8/ZonedDateTimeCodec.html [Instant]: https://docs.oracle.com/javase/8/docs/api/java/time/Instant.html [LocalDate]: https://docs.oracle.com/javase/8/docs/api/java/time/LocalDate.html [LocalTime]: https://docs.oracle.com/javase/8/docs/api/java/time/LocalTime.html @@ -111,10 +111,10 @@ session.execute("INSERT INTO example (id, t) VALUES (1, ?)", DateTime.parse("2010-06-30T01:20:47.999+01:00")); ``` -[InstantCodec_joda]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/joda/InstantCodec.html -[LocalDateCodec_joda]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/joda/LocalDateCodec.html -[LocalTimeCodec_joda]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.html -[DateTimeCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/joda/DateTimeCodec.html +[InstantCodec_joda]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/joda/InstantCodec.html +[LocalDateCodec_joda]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/joda/LocalDateCodec.html +[LocalTimeCodec_joda]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/joda/LocalTimeCodec.html +[DateTimeCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/joda/DateTimeCodec.html [DateTime]: http://www.joda.org/joda-time/apidocs/org/joda/time/DateTime.html [Instant_joda]: http://www.joda.org/joda-time/apidocs/org/joda/time/Instant.html [LocalDate_joda]: http://www.joda.org/joda-time/apidocs/org/joda/time/LocalDate.html @@ -132,8 +132,8 @@ Time can also be expressed as simple durations: There is no extra codec for `time`, because by default the driver already maps that type to a `long` representing the number of nanoseconds since midnight. -[SimpleTimestampCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/date/SimpleTimestampCodec.html -[SimpleDateCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/date/SimpleDateCodec.html +[SimpleTimestampCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/date/SimpleTimestampCodec.html +[SimpleDateCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/date/SimpleDateCodec.html ### Enums @@ -171,8 +171,8 @@ Note that if you registered an `EnumNameCodec` and an `EnumOrdinalCodec` _for th In practice, this is unlikely to happen, because you'll probably stick to a single CQL type for a given enum type; however, if you ever run into that issue, the workaround is to use [prepared statements](../../statements/prepared/), for which the driver knows the CQL type and can pick the exact codec. -[EnumNameCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/enums/EnumNameCodec.html -[EnumOrdinalCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/enums/EnumOrdinalCodec.html +[EnumNameCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/enums/EnumNameCodec.html +[EnumOrdinalCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/enums/EnumOrdinalCodec.html [name]: https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#name-- [ordinal]: https://docs.oracle.com/javase/8/docs/api/java/lang/Enum.html#ordinal-- @@ -217,7 +217,7 @@ session.execute("insert into example (id, owner) values (1, ?)", // owner saved as '{"id":1,"name":"root"}' ``` -[JacksonJsonCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.html +[JacksonJsonCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/json/JacksonJsonCodec.html [Jackson]: https://github.com/FasterXML/jackson @@ -256,7 +256,7 @@ session.execute("insert into example (id, owner) values (1, ?)", ``` -[Jsr353JsonCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.html +[Jsr353JsonCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/json/Jsr353JsonCodec.html [JsonStructure]: https://docs.oracle.com/javaee/7/tutorial/jsonp002.htm @@ -309,7 +309,7 @@ For the same reason, we need to give a type hint when setting "v", in the form o anonymous inner class; we recommend storing these tokens as constants in a utility class, to avoid creating them too often. -[OptionalCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.html +[OptionalCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/jdk8/OptionalCodec.html [Optional]: https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html [TypeToken]: http://google.github.io/guava/releases/19.0/api/docs/com/google/common/reflect/TypeToken.html @@ -353,7 +353,7 @@ session.execute(pst.bind() See the JDK8 Optional section above for explanations about [TypeToken]. -[OptionalCodec_guava]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/guava/OptionalCodec.html +[OptionalCodec_guava]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/guava/OptionalCodec.html [Optional_guava]: http://google.github.io/guava/releases/19.0/api/docs/com/google/common/base/Optional.html @@ -378,9 +378,9 @@ session.execute("insert into example (i, l) values (1, ?)", Package [com.datastax.driver.extras.codecs.arrays][arrays] contains similar codecs for all primitive types, and [ObjectArrayCodec] to map arrays of objects. -[IntArrayCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/arrays/IntArrayCodec.html -[ObjectArrayCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/arrays/ObjectArrayCodec.html -[arrays]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/arrays/package-summary.html +[IntArrayCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/arrays/IntArrayCodec.html +[ObjectArrayCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/arrays/ObjectArrayCodec.html +[arrays]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/arrays/package-summary.html ### Abstract utilities @@ -410,5 +410,5 @@ These two classes are convenient, but since they perform conversions in two step optimal approach. If performance is paramount, it's better to start from scratch and convert your objects to `ByteBuffer` directly. -[MappingCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/MappingCodec.html -[ParsingCodec]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/extras/codecs/ParsingCodec.html +[MappingCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/MappingCodec.html +[ParsingCodec]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/extras/codecs/ParsingCodec.html diff --git a/manual/custom_payloads/README.md b/manual/custom_payloads/README.md index d0b68a677ed..4a2531c18c4 100644 --- a/manual/custom_payloads/README.md +++ b/manual/custom_payloads/README.md @@ -241,8 +241,8 @@ The log message contains a pretty-printed version of the payload itself, and its [CASSANDRA-8553]: https://issues.apache.org/jira/browse/CASSANDRA-8553 [v4spec]: https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v4.spec [qh]: https://issues.apache.org/jira/browse/CASSANDRA-6659 -[nhae]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[nhae]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/NoHostAvailableException.html [chm]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ConcurrentHashMap.html [immutablemap]: http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/collect/ImmutableMap.html -[ufe]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/UnsupportedFeatureException.html +[ufe]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/UnsupportedFeatureException.html diff --git a/manual/idempotence/README.md b/manual/idempotence/README.md index 4d2b0816965..61f231133e9 100644 --- a/manual/idempotence/README.md +++ b/manual/idempotence/README.md @@ -125,8 +125,8 @@ broke linearizability by doing a transparent retry at step 6. If linearizability is important for you, you should ensure that lightweight transactions are appropriately flagged as not idempotent. -[isIdempotent]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html#isIdempotent-- -[setDefaultIdempotence]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setDefaultIdempotence-boolean- -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/QueryBuilder.html +[isIdempotent]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Statement.html#isIdempotent-- +[setDefaultIdempotence]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/QueryOptions.html#setDefaultIdempotence-boolean- +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/querybuilder/QueryBuilder.html [linearizability]: https://en.wikipedia.org/wiki/Linearizability#Definition_of_linearizability \ No newline at end of file diff --git a/manual/load_balancing/README.md b/manual/load_balancing/README.md index f6b180ccbf3..b6c5fbcba7c 100644 --- a/manual/load_balancing/README.md +++ b/manual/load_balancing/README.md @@ -295,11 +295,11 @@ For any host, the distance returned by the policy is always the same as its chil Query plans are based on the child policy's, except that hosts that are currently excluded for being too slow are moved to the end of the plan. -[withExclusionThreshold]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withExclusionThreshold-double- -[withMininumMeasurements]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withMininumMeasurements-int- -[withRetryPeriod]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withRetryPeriod-long-java.util.concurrent.TimeUnit- -[withScale]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withScale-long-java.util.concurrent.TimeUnit- -[withUpdateRate]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withUpdateRate-long-java.util.concurrent.TimeUnit- +[withExclusionThreshold]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withExclusionThreshold-double- +[withMininumMeasurements]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withMininumMeasurements-int- +[withRetryPeriod]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withRetryPeriod-long-java.util.concurrent.TimeUnit- +[withScale]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withScale-long-java.util.concurrent.TimeUnit- +[withUpdateRate]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LatencyAwarePolicy.Builder.html#withUpdateRate-long-java.util.concurrent.TimeUnit- ### Filtering policies @@ -317,15 +317,15 @@ studying the existing implementations first: `RoundRobinPolicy` is a good place complex ones like `DCAwareRoundRobinPolicy`. -[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LoadBalancingPolicy.html -[RoundRobinPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RoundRobinPolicy.html -[DCAwareRoundRobinPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.html -[TokenAwarePolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/TokenAwarePolicy.html -[LatencyAwarePolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LatencyAwarePolicy.html -[HostFilterPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/HostFilterPolicy.html -[WhiteListPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/WhiteListPolicy.html -[HostDistance]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/HostDistance.html -[refreshConnectedHosts]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#refreshConnectedHosts-- -[setMetadataEnabled]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setMetadataEnabled-boolean- -[Statement#getKeyspace]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html#getKeyspace-- -[Statement#getRoutingKey]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html#getRoutingKey-- +[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LoadBalancingPolicy.html +[RoundRobinPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RoundRobinPolicy.html +[DCAwareRoundRobinPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/DCAwareRoundRobinPolicy.html +[TokenAwarePolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/TokenAwarePolicy.html +[LatencyAwarePolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LatencyAwarePolicy.html +[HostFilterPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/HostFilterPolicy.html +[WhiteListPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/WhiteListPolicy.html +[HostDistance]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/HostDistance.html +[refreshConnectedHosts]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PoolingOptions.html#refreshConnectedHosts-- +[setMetadataEnabled]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/QueryOptions.html#setMetadataEnabled-boolean- +[Statement#getKeyspace]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Statement.html#getKeyspace-- +[Statement#getRoutingKey]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Statement.html#getRoutingKey-- diff --git a/manual/logging/README.md b/manual/logging/README.md index ca200f6d09f..39d6cdd540f 100644 --- a/manual/logging/README.md +++ b/manual/logging/README.md @@ -299,4 +299,4 @@ It also turns on slow query tracing as described above. ``` -[query_logger]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryLogger.html +[query_logger]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/QueryLogger.html diff --git a/manual/metadata/README.md b/manual/metadata/README.md index 4e4fd708ffd..e77748c18fe 100644 --- a/manual/metadata/README.md +++ b/manual/metadata/README.md @@ -4,7 +4,7 @@ The driver maintains global information about the Cassandra cluster it is connected to. It is available via [Cluster#getMetadata()][getMetadata]. -[getMetadata]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.html#getMetadata-- +[getMetadata]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Cluster.html#getMetadata-- ### Schema metadata @@ -12,8 +12,8 @@ Use [getKeyspace(String)][getKeyspace] or [getKeyspaces()][getKeyspaces] to get keyspace-level metadata. From there you can access the keyspace's objects (tables, and UDTs and UDFs if relevant). -[getKeyspace]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getKeyspace-java.lang.String- -[getKeyspaces]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getKeyspaces-- +[getKeyspace]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html#getKeyspace-java.lang.String- +[getKeyspaces]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html#getKeyspaces-- #### Refreshes @@ -47,8 +47,8 @@ Note that it is preferable to register a listener only *after* the cluster is fu otherwise the listener could be notified with a great deal of "Added" events as the driver builds the schema metadata from scratch for the first time. -[SchemaChangeListener]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SchemaChangeListener.html -[registerListener]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.html#register-com.datastax.driver.core.SchemaChangeListener- +[SchemaChangeListener]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SchemaChangeListener.html +[registerListener]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Cluster.html#register-com.datastax.driver.core.SchemaChangeListener- #### Schema agreement @@ -135,9 +135,9 @@ custom executor). Check out the API docs for the features in this section: -* [withMaxSchemaAgreementWaitSeconds(int)](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Cluster.Builder.html#withMaxSchemaAgreementWaitSeconds-int-) -* [isSchemaInAgreement()](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ExecutionInfo.html#isSchemaInAgreement--) -* [checkSchemaAgreement()](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#checkSchemaAgreement--) +* [withMaxSchemaAgreementWaitSeconds(int)](http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Cluster.Builder.html#withMaxSchemaAgreementWaitSeconds-int-) +* [isSchemaInAgreement()](http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ExecutionInfo.html#isSchemaInAgreement--) +* [checkSchemaAgreement()](http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html#checkSchemaAgreement--) ### Token metadata @@ -181,14 +181,14 @@ Starting with Cassandra 2.1.5, this information is available in a system table (see [CASSANDRA-7688](https://issues.apache.org/jira/browse/CASSANDRA-7688)). -[metadata]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html -[getTokenRanges]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getTokenRanges-- -[getTokenRanges2]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getTokenRanges-java.lang.String-com.datastax.driver.core.Host- -[getReplicas]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#getReplicas-java.lang.String-com.datastax.driver.core.TokenRange- -[newToken]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#newToken-java.lang.String- -[newTokenRange]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metadata.html#newTokenRange-com.datastax.driver.core.Token-com.datastax.driver.core.Token- -[TokenRange]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TokenRange.html -[getTokens]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Host.html#getTokens-- -[setToken]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BoundStatement.html#setToken-int-com.datastax.driver.core.Token- -[getToken]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Row.html#getToken-int- -[getPKToken]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Row.html#getPartitionKeyToken-- +[metadata]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html +[getTokenRanges]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html#getTokenRanges-- +[getTokenRanges2]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html#getTokenRanges-java.lang.String-com.datastax.driver.core.Host- +[getReplicas]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html#getReplicas-java.lang.String-com.datastax.driver.core.TokenRange- +[newToken]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html#newToken-java.lang.String- +[newTokenRange]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metadata.html#newTokenRange-com.datastax.driver.core.Token-com.datastax.driver.core.Token- +[TokenRange]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TokenRange.html +[getTokens]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Host.html#getTokens-- +[setToken]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/BoundStatement.html#setToken-int-com.datastax.driver.core.Token- +[getToken]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Row.html#getToken-int- +[getPKToken]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Row.html#getPartitionKeyToken-- diff --git a/manual/metrics/README.md b/manual/metrics/README.md index 7dc741bc4c9..cf9d34b50c4 100644 --- a/manual/metrics/README.md +++ b/manual/metrics/README.md @@ -9,4 +9,4 @@ TODO cover: - getMetrics() returns null until Cluster initialized --> -[Metrics]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.html \ No newline at end of file +[Metrics]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metrics.html \ No newline at end of file diff --git a/manual/native_protocol/README.md b/manual/native_protocol/README.md index be945e75664..2de03c6c5f1 100644 --- a/manual/native_protocol/README.md +++ b/manual/native_protocol/README.md @@ -63,7 +63,7 @@ All host(s) tried for query failed [/127.0.0.1:9042] Host /127.0.0.1:9042 does not support protocol version V3 but V2)) ``` -[gpv]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- +[gpv]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- #### Protocol version with mixed clusters @@ -94,19 +94,19 @@ To avoid this issue, you can use one the following workarounds: #### v1 to v2 * bound variables in simple statements - ([Session#execute(String, Object...)](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-java.lang.String-java.lang.Object...-)) -* [batch statements](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html) + ([Session#execute(String, Object...)](http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.html#execute-java.lang.String-java.lang.Object...-)) +* [batch statements](http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/BatchStatement.html) * [query paging](../paging/) #### v2 to v3 * the number of stream ids per connection goes from 128 to 32768 (see [Connection pooling](../pooling/)) -* [serial consistency on batch statements](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html#setSerialConsistencyLevel-com.datastax.driver.core.ConsistencyLevel-) +* [serial consistency on batch statements](http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/BatchStatement.html#setSerialConsistencyLevel-com.datastax.driver.core.ConsistencyLevel-) * [client-side timestamps](../query_timestamps/) #### v3 to v4 -* [query warnings](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ExecutionInfo.html#getWarnings--) +* [query warnings](http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ExecutionInfo.html#getWarnings--) * allowed unset values in bound statements * [Custom payloads](../custom_payloads/) diff --git a/manual/object_mapper/README.md b/manual/object_mapper/README.md index 08e5f18797a..cc8f6901de7 100644 --- a/manual/object_mapper/README.md +++ b/manual/object_mapper/README.md @@ -11,7 +11,7 @@ The mapper is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-mapping - 3.3.0 + 3.3.1 ``` diff --git a/manual/object_mapper/creating/README.md b/manual/object_mapper/creating/README.md index cbb14bf2244..b5ba962556c 100644 --- a/manual/object_mapper/creating/README.md +++ b/manual/object_mapper/creating/README.md @@ -149,9 +149,9 @@ User user = new User() .setName("John Doe"); ``` -[table]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Table.html +[table]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Table.html [case-sensitive]:http://docs.datastax.com/en/cql/3.3/cql/cql_reference/ucase-lcase_r.html -[consistency level]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ConsistencyLevel.html +[consistency level]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ConsistencyLevel.html [java-beans]:https://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html [set-accessible]:https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/AccessibleObject.html#setAccessible-boolean- @@ -189,7 +189,7 @@ CREATE TABLE users(id uuid PRIMARY KEY, "userName" text); private String userName; ``` -[column]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Column.html +[column]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Column.html #### Primary key fields @@ -213,8 +213,8 @@ private String areaCode; The order of the indices must match that of the columns in the table declaration. -[pk]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/PartitionKey.html -[cc]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/ClusteringColumn.html +[pk]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/PartitionKey.html +[cc]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/ClusteringColumn.html [pks]:http://thelastpickle.com/blog/2013/01/11/primary-keys-in-cql.html #### Computed fields @@ -250,7 +250,7 @@ version (see [JAVA-832](https://datastax-oss.atlassian.net/browse/JAVA-832)). [User Defined Functions]:http://www.planetcassandra.org/blog/user-defined-functions-in-cassandra-3-0/ -[computed]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Computed.html +[computed]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Computed.html #### Transient properties @@ -259,7 +259,7 @@ to table columns. [@Transient][transient] can be used to prevent a field or a Java bean property from being mapped. Like other column-level annotations, it should be placed on either the field declaration or the property getter method. -[transient]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Transient.html +[transient]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Transient.html ### Mapping User Types @@ -322,8 +322,8 @@ This also works with UDTs inside collections or other UDTs, with any arbitrary nesting level. [User Defined Types]: ../../udts/ -[udt]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/UDT.html -[field]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Field.html +[udt]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/UDT.html +[field]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Field.html ### Mapping collections @@ -359,9 +359,9 @@ private Map> frozenKeyValueMap; private Map> frozenValueMap; ``` -[frozen]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Frozen.html -[frozenkey]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/FrozenKey.html -[frozenvalue]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/FrozenValue.html +[frozen]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Frozen.html +[frozenkey]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/FrozenKey.html +[frozenvalue]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/FrozenValue.html ### Polymorphism support diff --git a/manual/object_mapper/custom_codecs/README.md b/manual/object_mapper/custom_codecs/README.md index 148164ad115..049aaa0c99f 100644 --- a/manual/object_mapper/custom_codecs/README.md +++ b/manual/object_mapper/custom_codecs/README.md @@ -98,9 +98,9 @@ instance (one per column) and cache it for future use. This also works with [@Field][field] and [@Param][param] annotations. -[column]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Column.html -[field]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Field.html -[param]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Param.html +[column]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Column.html +[field]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Field.html +[param]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Param.html ## Implicit UDT codecs diff --git a/manual/object_mapper/using/README.md b/manual/object_mapper/using/README.md index d802378a28a..137cfe5c7ad 100644 --- a/manual/object_mapper/using/README.md +++ b/manual/object_mapper/using/README.md @@ -28,9 +28,9 @@ Mapper mapper = manager.mapper(User.class); calling `manager#mapper` more than once for the same class will return the previously generated mapper. -[Mapper]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/Mapper.html -[MappingManager]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/MappingManager.html -[Session]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html +[Mapper]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/Mapper.html +[MappingManager]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/MappingManager.html +[Session]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.html #### Basic CRUD operations @@ -179,7 +179,7 @@ It provides methods `one()`, `all()`, `iterator()`, `getExecutionInfo()` and `isExhausted()`. Note that iterating the `Result` will consume the `ResultSet`, and vice-versa. -[Result]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/Result.html +[Result]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/Result.html ### Accessors @@ -229,7 +229,7 @@ corresponds to which marker: ResultSet insert(@Param("u") UUID userId, @Param("n") String name); ``` -[param]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Param.html +[param]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/Param.html If a method argument is a Java enumeration, it must be annotated with `@Enumerated` to indicate how to convert it to a CQL type (the rules are @@ -297,7 +297,7 @@ query with the annotation [@QueryParameters]. Then, options like public ListenableFuture> getAllAsync(); ``` -[@QueryParameters]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/QueryParameters.html +[@QueryParameters]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/annotations/QueryParameters.html ### Mapping configuration @@ -341,6 +341,6 @@ PropertyMapper propertyMapper = new DefaultPropertyMapper() There is more to `DefaultPropertyMapper`; see the Javadocs and implementation for details. -[MappingConfiguration]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/MappingConfiguration.html -[PropertyMapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/PropertyMapper.html -[DefaultPropertyMapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/DefaultPropertyMapper.html +[MappingConfiguration]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/MappingConfiguration.html +[PropertyMapper]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/PropertyMapper.html +[DefaultPropertyMapper]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/mapping/DefaultPropertyMapper.html diff --git a/manual/paging/README.md b/manual/paging/README.md index 915600d8099..24925fc619f 100644 --- a/manual/paging/README.md +++ b/manual/paging/README.md @@ -176,8 +176,8 @@ if (nextPage != null) { } ``` -[result_set]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html -[paging_state]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PagingState.html +[result_set]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ResultSet.html +[paging_state]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PagingState.html Due to internal implementation details, `PagingState` instances are not diff --git a/manual/pooling/README.md b/manual/pooling/README.md index f8dbd94bd27..dd2f0872563 100644 --- a/manual/pooling/README.md +++ b/manual/pooling/README.md @@ -283,16 +283,16 @@ either: [newConnectionThreshold][nct] so that enough connections are added by the time you reach the bottleneck. -[result_set_future]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSetFuture.html -[pooling_options]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html -[lbp]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LoadBalancingPolicy.html -[nct]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setNewConnectionThreshold-com.datastax.driver.core.HostDistance-int- -[mrpc]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setMaxRequestsPerConnection-com.datastax.driver.core.HostDistance-int- -[sits]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setIdleTimeoutSeconds-int- -[rtm]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#getReadTimeoutMillis-- -[smqs]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setMaxQueueSize-int- -[sptm]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setPoolTimeoutMillis-int- -[nhae]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html -[getErrors]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- -[get_state]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#getState-- -[BusyPoolException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/BusyPoolException.html +[result_set_future]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ResultSetFuture.html +[pooling_options]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PoolingOptions.html +[lbp]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LoadBalancingPolicy.html +[nct]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PoolingOptions.html#setNewConnectionThreshold-com.datastax.driver.core.HostDistance-int- +[mrpc]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PoolingOptions.html#setMaxRequestsPerConnection-com.datastax.driver.core.HostDistance-int- +[sits]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PoolingOptions.html#setIdleTimeoutSeconds-int- +[rtm]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#getReadTimeoutMillis-- +[smqs]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PoolingOptions.html#setMaxQueueSize-int- +[sptm]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PoolingOptions.html#setPoolTimeoutMillis-int- +[nhae]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[getErrors]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- +[get_state]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.html#getState-- +[BusyPoolException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/BusyPoolException.html diff --git a/manual/query_timestamps/README.md b/manual/query_timestamps/README.md index cb3f4dce9cf..de570969869 100644 --- a/manual/query_timestamps/README.md +++ b/manual/query_timestamps/README.md @@ -140,10 +140,10 @@ following: Steps 2 and 3 only apply if native protocol v3 or above is in use. -[TimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TimestampGenerator.html -[AtomicMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html -[ThreadLocalMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.html -[ServerSideTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ServerSideTimestampGenerator.html +[TimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TimestampGenerator.html +[AtomicMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html +[ThreadLocalMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.html +[ServerSideTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ServerSideTimestampGenerator.html [gettimeofday]: http://man7.org/linux/man-pages/man2/settimeofday.2.html [JNR]: https://github.com/jnr/jnr-ffi diff --git a/manual/reconnection/README.md b/manual/reconnection/README.md index ccd4598a309..1d705cbca03 100644 --- a/manual/reconnection/README.md +++ b/manual/reconnection/README.md @@ -8,4 +8,4 @@ TODO cover: - scheduled reconnections vs. gossip events --> -[ReconnectionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ReconnectionPolicy.html \ No newline at end of file +[ReconnectionPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/ReconnectionPolicy.html \ No newline at end of file diff --git a/manual/retries/README.md b/manual/retries/README.md index a11adb93828..8fa40a2f428 100644 --- a/manual/retries/README.md +++ b/manual/retries/README.md @@ -146,33 +146,33 @@ implementations to handle idempotence (the new behavior is equivalent to what yo `IdempotenceAwareRetryPolicy` before). -[RetryDecision]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html -[retry()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#retry-com.datastax.driver.core.ConsistencyLevel- -[tryNextHost()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#tryNextHost-com.datastax.driver.core.ConsistencyLevel- -[rethrow()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#rethrow-- -[ignore()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#ignore-- -[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html -[getErrors()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- -[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html -[DefaultRetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html -[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- -[onWriteTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onWriteTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.WriteType-int-int-int- -[onUnavailable]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onUnavailable-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-int- -[onRequestError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- -[UnavailableException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/UnavailableException.html -[ReadTimeoutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ReadTimeoutException.html -[WriteTimeoutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/WriteTimeoutException.html -[OverloadedException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OverloadedException.html -[ServerError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ServerError.html -[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OperationTimedOutException.html -[ConnectionException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ConnectionException.html -[QueryValidationException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/QueryValidationException.html -[InvalidQueryException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/InvalidQueryException.html -[InvalidConfigurationInQueryException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.html -[UnauthorizedException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/UnauthorizedException.html -[SyntaxError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/SyntaxError.html -[AlreadyExistsException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/AlreadyExistsException.html -[TruncateException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/TruncateException.html +[RetryDecision]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html +[retry()]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#retry-com.datastax.driver.core.ConsistencyLevel- +[tryNextHost()]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#tryNextHost-com.datastax.driver.core.ConsistencyLevel- +[rethrow()]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#rethrow-- +[ignore()]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#ignore-- +[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[getErrors()]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- +[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.html +[DefaultRetryPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/DefaultRetryPolicy.html +[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- +[onWriteTimeout]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onWriteTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.WriteType-int-int-int- +[onUnavailable]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onUnavailable-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-int- +[onRequestError]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- +[UnavailableException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/UnavailableException.html +[ReadTimeoutException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/ReadTimeoutException.html +[WriteTimeoutException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/WriteTimeoutException.html +[OverloadedException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/OverloadedException.html +[ServerError]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/ServerError.html +[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/OperationTimedOutException.html +[ConnectionException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/ConnectionException.html +[QueryValidationException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/QueryValidationException.html +[InvalidQueryException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/InvalidQueryException.html +[InvalidConfigurationInQueryException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.html +[UnauthorizedException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/UnauthorizedException.html +[SyntaxError]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/SyntaxError.html +[AlreadyExistsException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/AlreadyExistsException.html +[TruncateException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/TruncateException.html [query plan]: ../load_balancing/#query-plan [connection pool]: ../pooling/ diff --git a/manual/shaded_jar/README.md b/manual/shaded_jar/README.md index 6319c1a10fb..7a49f2bcb85 100644 --- a/manual/shaded_jar/README.md +++ b/manual/shaded_jar/README.md @@ -12,7 +12,7 @@ package name: com.datastax.cassandra cassandra-driver-core - 3.3.0 + 3.3.1 shaded @@ -32,7 +32,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-core - 3.3.0 + 3.3.1 shaded @@ -44,7 +44,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-mapping - 3.3.0 + 3.3.1 com.datastax.cassandra @@ -74,5 +74,5 @@ detects that shaded Netty classes are being used: Detected shaded Netty classes in the classpath; native epoll transport will not work properly, defaulting to NIO. -[NettyOptions]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/NettyOptions.html +[NettyOptions]:http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/NettyOptions.html [Netty native transports]:http://netty.io/wiki/native-transports.html diff --git a/manual/socket_options/README.md b/manual/socket_options/README.md index 8a0defd87e7..40bef6d7244 100644 --- a/manual/socket_options/README.md +++ b/manual/socket_options/README.md @@ -117,15 +117,15 @@ To clarify: We might rename `SocketOptions.setReadTimeoutMillis` in a future version to clear up any confusion. -[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html -[setReadTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReadTimeoutMillis-int- -[setConnectTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setConnectTimeoutMillis-int- -[setKeepAlive]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setKeepAlive-boolean- -[setReceiveBufferSize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReceiveBufferSize-int- -[setReuseAddress]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReuseAddress-boolean- -[setSendBufferSize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setSendBufferSize-int- -[setSoLinger]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setSoLinger-int- -[setTcpNoDelay]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setTcpNoDelay-boolean- -[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- -[onRequestError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- -[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OperationTimedOutException.html \ No newline at end of file +[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html +[setReadTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#setReadTimeoutMillis-int- +[setConnectTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#setConnectTimeoutMillis-int- +[setKeepAlive]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#setKeepAlive-boolean- +[setReceiveBufferSize]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#setReceiveBufferSize-int- +[setReuseAddress]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#setReuseAddress-boolean- +[setSendBufferSize]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#setSendBufferSize-int- +[setSoLinger]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#setSoLinger-int- +[setTcpNoDelay]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SocketOptions.html#setTcpNoDelay-boolean- +[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- +[onRequestError]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- +[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/exceptions/OperationTimedOutException.html \ No newline at end of file diff --git a/manual/speculative_execution/README.md b/manual/speculative_execution/README.md index ceecc2a0f3b..127d440d7bc 100644 --- a/manual/speculative_execution/README.md +++ b/manual/speculative_execution/README.md @@ -73,7 +73,7 @@ Speculative executions are controlled by an instance of `Cluster`. This policy defines the threshold after which a new speculative execution will be triggered. -[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html +[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html Two implementations are provided with the driver: @@ -101,7 +101,7 @@ way: * if no response has been received at t0 + 1000 milliseconds, start another speculative execution on a third node. -[ConstantSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html +[ConstantSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html #### [PercentileSpeculativeExecutionPolicy] @@ -160,10 +160,10 @@ Note that `PercentileTracker` may also be used with a slow query logger (see the [Logging](../logging/) section). In that case, you would create a single tracker object and share it with both components. -[PercentileSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html -[PercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PercentileTracker.html -[ClusterWidePercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ClusterWidePercentileTracker.html -[PerHostPercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PerHostPercentileTracker.html +[PercentileSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html +[PercentileTracker]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PercentileTracker.html +[ClusterWidePercentileTracker]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ClusterWidePercentileTracker.html +[PerHostPercentileTracker]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PerHostPercentileTracker.html [hdr]: http://hdrhistogram.github.io/HdrHistogram/ #### Using your own @@ -210,7 +210,7 @@ client driver exec1 exec2 The only impact is that all executions of the same query always share the same query plan, so each host will be used by at most one execution. -[retry_policy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html +[retry_policy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.html ### Tuning and practical details @@ -225,8 +225,8 @@ You can monitor how many speculative executions were triggered with the It should only be a few percents of the total number of requests ([cluster.getMetrics().getRequestsTimer().getCount()][request_metric]). -[se_metric]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.Errors.html#getSpeculativeExecutions-- -[request_metric]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.html#getRequestsTimer-- +[se_metric]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metrics.Errors.html#getSpeculativeExecutions-- +[request_metric]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Metrics.html#getRequestsTimer-- #### Stream id exhaustion @@ -255,8 +255,8 @@ sustained. If you're unsure of which native protocol version you're using, you can check with [cluster.getConfiguration().getProtocolOptions().getProtocolVersion()][protocol_version]. -[session_state]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.State.html -[protocol_version]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- +[session_state]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.State.html +[protocol_version]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- #### Request ordering and client timestamps diff --git a/manual/ssl/README.md b/manual/ssl/README.md index 59249b586c2..0830c631e92 100644 --- a/manual/ssl/README.md +++ b/manual/ssl/README.md @@ -185,8 +185,8 @@ Cluster cluster = Cluster.builder() .build(); ``` -[RemoteEndpointAwareSSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.html -[RemoteEndpointAwareJdkSSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html -[newSSLEngine]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html#newSSLEngine-io.netty.channel.socket.SocketChannel-java.net.InetSocketAddress- -[RemoteEndpointAwareNettySSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.html -[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/NettyOptions.html +[RemoteEndpointAwareSSLOptions]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.html +[RemoteEndpointAwareJdkSSLOptions]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html +[newSSLEngine]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html#newSSLEngine-io.netty.channel.socket.SocketChannel-java.net.InetSocketAddress- +[RemoteEndpointAwareNettySSLOptions]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.html +[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/NettyOptions.html diff --git a/manual/statements/README.md b/manual/statements/README.md index 6efd14ce104..eeda3170f25 100644 --- a/manual/statements/README.md +++ b/manual/statements/README.md @@ -32,11 +32,11 @@ If you use custom policies ([RetryPolicy], [LoadBalancingPolicy], properties that influence statement execution. To achieve this, you can wrap your statements in a custom [StatementWrapper] implementation. -[Statement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/QueryBuilder.html -[StatementWrapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/StatementWrapper.html -[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html -[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LoadBalancingPolicy.html -[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html -[execute]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- -[executeAsync]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- +[Statement]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Statement.html +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/querybuilder/QueryBuilder.html +[StatementWrapper]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/StatementWrapper.html +[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/RetryPolicy.html +[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/LoadBalancingPolicy.html +[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html +[execute]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- +[executeAsync]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- diff --git a/manual/statements/batch/README.md b/manual/statements/batch/README.md index 5f3b7930c32..8ae56c2cb6a 100644 --- a/manual/statements/batch/README.md +++ b/manual/statements/batch/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [BatchStatement].* -[BatchStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html +[BatchStatement]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/BatchStatement.html diff --git a/manual/statements/built/README.md b/manual/statements/built/README.md index 405aa9d2161..93cd430dbb2 100644 --- a/manual/statements/built/README.md +++ b/manual/statements/built/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [QueryBuilder].* -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/QueryBuilder.html \ No newline at end of file +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/querybuilder/QueryBuilder.html \ No newline at end of file diff --git a/manual/statements/prepared/README.md b/manual/statements/prepared/README.md index 2132db700ae..4fe8c9558bc 100644 --- a/manual/statements/prepared/README.md +++ b/manual/statements/prepared/README.md @@ -257,11 +257,11 @@ in your statement, i.e.: `SELECT a, b, c FROM tbl`. This will be addressed in a future release of both Cassandra and the driver. Follow [CASSANDRA-10786] and [JAVA-1196] for more information. -[PreparedStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PreparedStatement.html -[BoundStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BoundStatement.html -[setPrepareOnAllHosts]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setPrepareOnAllHosts-boolean- -[setReprepareOnUp]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setReprepareOnUp-boolean- -[execute]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- -[executeAsync]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- +[PreparedStatement]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/PreparedStatement.html +[BoundStatement]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/BoundStatement.html +[setPrepareOnAllHosts]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/QueryOptions.html#setPrepareOnAllHosts-boolean- +[setReprepareOnUp]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/QueryOptions.html#setReprepareOnUp-boolean- +[execute]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- +[executeAsync]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- [CASSANDRA-10786]: https://issues.apache.org/jira/browse/CASSANDRA-10786 [JAVA-1196]: https://datastax-oss.atlassian.net/browse/JAVA-1196 \ No newline at end of file diff --git a/manual/statements/simple/README.md b/manual/statements/simple/README.md index 9967b0e4bf3..4ba119e8854 100644 --- a/manual/statements/simple/README.md +++ b/manual/statements/simple/README.md @@ -128,4 +128,4 @@ session.execute( 1, bytes); ``` -[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SimpleStatement.html +[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/SimpleStatement.html diff --git a/manual/tuples/README.md b/manual/tuples/README.md index 345bcc517ff..6652b81482e 100644 --- a/manual/tuples/README.md +++ b/manual/tuples/README.md @@ -96,7 +96,7 @@ bs.setList("l", Arrays.asList(oneTimeUsageTuple.newValue("1", "1"), oneTimeUsage session.execute(bs); ``` -[TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html -[TupleValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleValue.html -[newValueVararg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-java.lang.Object...- -[newValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-- +[TupleType]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TupleType.html +[TupleValue]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TupleValue.html +[newValueVararg]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TupleType.html#newValue-java.lang.Object...- +[newValue]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/TupleType.html#newValue-- diff --git a/manual/udts/README.md b/manual/udts/README.md index 760b87e9321..b04569085ee 100644 --- a/manual/udts/README.md +++ b/manual/udts/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [UserType].* -[UserType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/UserType.html \ No newline at end of file +[UserType]: http://docs.datastax.com/en/drivers/java/3.3/com/datastax/driver/core/UserType.html \ No newline at end of file From cb36007f42eda5c94030c4478d23076aadc3b161 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 7 Nov 2017 13:32:13 -0800 Subject: [PATCH 157/512] [maven-release-plugin] prepare release 3.3.1 --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index dc75330bc85..a2eb614504b 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 5e78fdeac94..ff62b93597d 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 6493c014516..bef3e04a20e 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index afcc6d863d3..3a847a9976c 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index eba4e610cf4..750278d8848 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 2616fb75db0..c5cf67e698f 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index dcce75bcfb0..336b6f05a15 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 745cc6aa10e..7232e6c9025 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.1-SNAPSHOT + 3.3.1 pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index 61f86f6c5dd..5e417047839 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index aa87180b1f8..aedc248bebc 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index c518ca88c7d..856e5b123c4 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.1-SNAPSHOT + 3.3.1 cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index 7939b9d11fc..c02ed9eef68 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1-SNAPSHOT + 3.3.1 pom DataStax Java Driver for Apache Cassandra @@ -1076,7 +1076,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - HEAD + 3.3.1 From c0a13f184a7ccd27c86a39c6e8ed98ffd666a964 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 7 Nov 2017 13:32:22 -0800 Subject: [PATCH 158/512] [maven-release-plugin] prepare for next development iteration --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index a2eb614504b..2d0034acebb 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index ff62b93597d..e50c6ff6400 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index bef3e04a20e..780f512bd14 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 3a847a9976c..3f2607f21ee 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 750278d8848..68ce7bd2b99 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index c5cf67e698f..bb066034f77 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 336b6f05a15..6a83dbac0bb 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 7232e6c9025..14df05792c5 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.1 + 3.3.2-SNAPSHOT pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index 5e417047839..277ef8a6f55 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index aedc248bebc..c2e2e95a1f8 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 856e5b123c4..26c16dc2f5b 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.1 + 3.3.2-SNAPSHOT cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index c02ed9eef68..57a9eb8811a 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.1 + 3.3.2-SNAPSHOT pom DataStax Java Driver for Apache Cassandra @@ -1076,7 +1076,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - 3.3.1 + HEAD From 5920f47e46bc468a1b21d60b8cfeb6616d5f876c Mon Sep 17 00:00:00 2001 From: olim7t Date: Wed, 8 Nov 2017 15:46:47 -0800 Subject: [PATCH 159/512] JAVA-1666: Fix keyspace export when a UDT has case-sensitive field names --- changelog/README.md | 5 +++++ .../java/com/datastax/driver/core/KeyspaceMetadata.java | 6 +++--- .../java/com/datastax/driver/core/ExportAsStringTest.java | 2 +- .../src/test/resources/export_as_string_test_2.1.cql | 2 +- .../src/test/resources/export_as_string_test_2.2.cql | 2 +- .../src/test/resources/export_as_string_test_3.0.cql | 2 +- .../src/test/resources/export_as_string_test_3.11.cql | 2 +- 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 881b98753f2..bbbc15a80f2 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,5 +1,10 @@ ## Changelog +### 3.3.2 (in progress) + +- [bug] JAVA-1666: Fix keyspace export when a UDT has case-sensitive field names. + + ### 3.3.1 - [bug] JAVA-1555: Include VIEW and CDC in WriteType. diff --git a/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java b/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java index d827cd9fffd..849bb494981 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/KeyspaceMetadata.java @@ -317,10 +317,10 @@ private List getSortedUserTypes() { } private boolean dependsOn(UserType udt1, UserType udt2) { - for (String fieldName : udt1.getFieldNames()) { - DataType fieldType = udt1.getFieldType(fieldName); - if (references(fieldType, udt2)) + for (UserType.Field field : udt1) { + if (references(field.getType(), udt2)) { return true; + } } return false; } diff --git a/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java b/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java index 7ebb9e36aef..2576f18b8fa 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java @@ -79,7 +79,7 @@ public void create_schema_and_ensure_exported_cql_is_as_expected() { // Usertype 'ctype' which depends on both ztype and xtype, therefore ztype and xtype should show up earlier. session.execute(SchemaBuilder.createType("ctype") - .addColumn("z", ks.getUserType("ztype").copy(true)) + .addColumn("\"Z\"", ks.getUserType("ztype").copy(true)) .addColumn("x", ks.getUserType("xtype").copy(true))); // Usertype 'btype' which has no dependencies, should show up before 'xtype' and 'ztype' since it's diff --git a/driver-core/src/test/resources/export_as_string_test_2.1.cql b/driver-core/src/test/resources/export_as_string_test_2.1.cql index 0d71991cd70..4e90831a065 100644 --- a/driver-core/src/test/resources/export_as_string_test_2.1.cql +++ b/driver-core/src/test/resources/export_as_string_test_2.1.cql @@ -14,7 +14,7 @@ CREATE TYPE complex_ks.ztype ( ); CREATE TYPE complex_ks.ctype ( - z frozen, + "Z" frozen, x frozen ); diff --git a/driver-core/src/test/resources/export_as_string_test_2.2.cql b/driver-core/src/test/resources/export_as_string_test_2.2.cql index 2789c7ce999..15c4788b767 100644 --- a/driver-core/src/test/resources/export_as_string_test_2.2.cql +++ b/driver-core/src/test/resources/export_as_string_test_2.2.cql @@ -14,7 +14,7 @@ CREATE TYPE complex_ks.ztype ( ); CREATE TYPE complex_ks.ctype ( - z frozen, + "Z" frozen, x frozen ); diff --git a/driver-core/src/test/resources/export_as_string_test_3.0.cql b/driver-core/src/test/resources/export_as_string_test_3.0.cql index 04fe39adc98..f90ec614d7b 100644 --- a/driver-core/src/test/resources/export_as_string_test_3.0.cql +++ b/driver-core/src/test/resources/export_as_string_test_3.0.cql @@ -14,7 +14,7 @@ CREATE TYPE complex_ks.ztype ( ); CREATE TYPE complex_ks.ctype ( - z frozen, + "Z" frozen, x frozen ); diff --git a/driver-core/src/test/resources/export_as_string_test_3.11.cql b/driver-core/src/test/resources/export_as_string_test_3.11.cql index 204d1c58f68..6133df2fa83 100644 --- a/driver-core/src/test/resources/export_as_string_test_3.11.cql +++ b/driver-core/src/test/resources/export_as_string_test_3.11.cql @@ -14,7 +14,7 @@ CREATE TYPE complex_ks.ztype ( ); CREATE TYPE complex_ks.ctype ( - z frozen, + "Z" frozen, x frozen ); From 0461ed357dec050d1310bcd0fdf6094351eaf136 Mon Sep 17 00:00:00 2001 From: Alex Petrov Date: Fri, 3 Jun 2016 09:22:22 +0200 Subject: [PATCH 160/512] JAVA-1196: Include hash of result set metadata in prepared statement id Motivation: See CASSANDRA-10786. When a table is altered (column is added), the wildcard queries keep the old result metadata and never return the added column for all but the very first client (as the very first client is the only one that receives UNPREPARED statement). After adding result metadata to md5 on Cassandra side, as the message metadata on the client is never updated and new client ID of the re-prepared message is not saved anywhere, client would fall into the infinite re-prepare loop. Modifications: With Protocol V5: - Include result metadata id in EXECUTE messages. - Read result metadata id in PREPARED and ROWS responses. - Replace cached prepared statements when result metadata id has changed. Result: Wildcard queries are now safe to use (see JAVA-420). Result metadata id is now correctly handled. --- changelog/README.md | 1 + .../driver/core/ArrayBackedResultSet.java | 80 ++++-- .../datastax/driver/core/BatchStatement.java | 4 +- .../datastax/driver/core/BoundStatement.java | 5 +- .../com/datastax/driver/core/Cluster.java | 4 +- .../driver/core/DefaultPreparedStatement.java | 22 +- .../com/datastax/driver/core/PreparedId.java | 32 ++- .../datastax/driver/core/ProtocolFeature.java | 46 ++++ .../com/datastax/driver/core/Requests.java | 22 +- .../com/datastax/driver/core/Responses.java | 41 ++- .../datastax/driver/core/SessionManager.java | 19 +- .../com/datastax/driver/core/Assertions.java | 4 + .../datastax/driver/core/CCMTestsSupport.java | 15 + .../driver/core/ColumnDefinitionsAssert.java | 47 ++++ .../PreparedStatementInvalidationTest.java | 256 ++++++++++++++++++ 15 files changed, 532 insertions(+), 66 deletions(-) create mode 100644 driver-core/src/main/java/com/datastax/driver/core/ProtocolFeature.java create mode 100644 driver-core/src/test/java/com/datastax/driver/core/ColumnDefinitionsAssert.java create mode 100644 driver-core/src/test/java/com/datastax/driver/core/PreparedStatementInvalidationTest.java diff --git a/changelog/README.md b/changelog/README.md index bbbc15a80f2..112c13942f3 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -3,6 +3,7 @@ ### 3.3.2 (in progress) - [bug] JAVA-1666: Fix keyspace export when a UDT has case-sensitive field names. +- [improvement] JAVA-1196: Include hash of result set metadata in prepared statement id. ### 3.3.1 diff --git a/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java b/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java index 0bf225eed90..81e348afb4c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java @@ -39,7 +39,7 @@ abstract class ArrayBackedResultSet implements ResultSet { private static final Queue> EMPTY_QUEUE = new ArrayDeque>(0); - protected final ColumnDefinitions metadata; + protected volatile ColumnDefinitions metadata; protected final Token.Factory tokenFactory; private final boolean wasApplied; @@ -60,18 +60,42 @@ static ArrayBackedResultSet fromMessage(Responses.Result msg, SessionManager ses case ROWS: Responses.Result.Rows r = (Responses.Result.Rows) msg; - ColumnDefinitions columnDefs; - if (r.metadata.columns == null) { - Statement actualStatement = statement; - if (statement instanceof StatementWrapper) { - actualStatement = ((StatementWrapper) statement).getWrappedStatement(); - } - assert actualStatement instanceof BoundStatement; - columnDefs = ((BoundStatement) actualStatement).statement.getPreparedId().resultSetMetadata; - assert columnDefs != null; + Statement actualStatement = statement; + if (statement instanceof StatementWrapper) { + actualStatement = ((StatementWrapper) statement).getWrappedStatement(); + } + + ColumnDefinitions columnDefs = r.metadata.columns; + if (columnDefs == null) { + // If result set metadata is not present, it means the request had SKIP_METADATA set, the driver + // only ever does that for bound statements. + BoundStatement bs = (BoundStatement) actualStatement; + columnDefs = bs.preparedStatement().getPreparedId().resultSetMetadata.variables; } else { - columnDefs = r.metadata.columns; + // Otherwise, always use the response's metadata. + // In addition, if a new id is present it means we're executing a bound statement with protocol v5, + // the schema changed server-side, and we need to update the prepared statement (see + // CASSANDRA-10786). + MD5Digest newMetadataId = r.metadata.metadataId; + assert !(actualStatement instanceof BoundStatement) || + ProtocolFeature.PREPARED_METADATA_CHANGES.isSupportedBy(protocolVersion) || + newMetadataId == null; + if (newMetadataId != null) { + BoundStatement bs = ((BoundStatement) actualStatement); + PreparedId preparedId = bs.preparedStatement().getPreparedId(); + // Extra test for CASSANDRA-13992: conditional updates yield a different result set depending on + // whether the update was applied or not, so the prepared statement must never have result + // metadata, and we should always execute with skip_metadata = false. + // However the server sends a new_metadata_id in the response, so make sure we ignore it if the + // prepared statement did not have metadata in the first place. + // TODO remove the "if" (i.e. always assign resultSetMetadata) if CASSANDRA-13992 gets fixed before 4.0.0 GA + if (preparedId.resultSetMetadata.variables != null) { + preparedId.resultSetMetadata = + new PreparedId.PreparedMetadata(newMetadataId, columnDefs); + } + } } + assert columnDefs != null; Token.Factory tokenFactory = (session == null) ? null : session.getCluster().manager.metadata.tokenFactory(); @@ -224,7 +248,7 @@ public List getAllExecutionInfo() { private static class MultiPage extends ArrayBackedResultSet { private Queue> currentPage; - private final Queue>> nextPages = new ConcurrentLinkedQueue>>(); + private final Queue nextPages = new ConcurrentLinkedQueue(); private final Deque infos = new LinkedBlockingDeque(); @@ -280,8 +304,8 @@ public Row one() { @Override public int getAvailableWithoutFetching() { int available = currentPage.size(); - for (Queue> page : nextPages) - available += page.size(); + for (NextPage page : nextPages) + available += page.data.size(); return available; } @@ -297,9 +321,12 @@ private void prepareNextRow() { // Grab the current state now to get a consistent view in this iteration. FetchingState fetchingState = this.fetchState; - Queue> nextPage = nextPages.poll(); + NextPage nextPage = nextPages.poll(); if (nextPage != null) { - currentPage = nextPage; + if (nextPage.metadata != null) { + this.metadata = nextPage.metadata; + } + currentPage = nextPage.data; continue; } if (fetchingState == null) @@ -363,7 +390,16 @@ public void onSet(Connection connection, Message.Response response, ExecutionInf if (rm.kind == Responses.Result.Kind.ROWS) { Responses.Result.Rows rows = (Responses.Result.Rows) rm; info = update(info, rm, MultiPage.this.session, rows.metadata.pagingState, protocolVersion, codecRegistry, statement); - MultiPage.this.nextPages.offer(rows.data); + // If the query is a prepared 'SELECT *', the metadata can change between pages + ColumnDefinitions newMetadata = null; + if (rows.metadata.metadataId != null) { + newMetadata = rows.metadata.columns; + assert statement instanceof BoundStatement; + BoundStatement bs = (BoundStatement) statement; + bs.preparedStatement().getPreparedId().resultSetMetadata = + new PreparedId.PreparedMetadata(rows.metadata.metadataId, rows.metadata.columns); + } + MultiPage.this.nextPages.offer(new NextPage(newMetadata, rows.data)); MultiPage.this.fetchState = rows.metadata.pagingState == null ? null : new FetchingState(rows.metadata.pagingState, null); } else if (rm.kind == Responses.Result.Kind.VOID) { // We shouldn't really get a VOID message here but well, no harm in handling it I suppose @@ -443,6 +479,16 @@ private static class FetchingState { this.inProgress = inProgress; } } + + private static class NextPage { + final ColumnDefinitions metadata; + final Queue> data; + + NextPage(ColumnDefinitions metadata, Queue> data) { + this.metadata = metadata; + this.data = data; + } + } } // This method checks the value of the "[applied]" column manually, to avoid instantiating an ArrayBackedRow diff --git a/driver-core/src/main/java/com/datastax/driver/core/BatchStatement.java b/driver-core/src/main/java/com/datastax/driver/core/BatchStatement.java index 481798a7174..e820311895a 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/BatchStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/BatchStatement.java @@ -61,8 +61,6 @@ public enum Type { COUNTER } - ; - final Type batchType; private final List statements = new ArrayList(); @@ -97,7 +95,7 @@ IdAndValues getIdAndValues(ProtocolVersion protocolVersion, CodecRegistry codecR // We handle BatchStatement in add() so ... assert statement instanceof BoundStatement; BoundStatement st = (BoundStatement) statement; - idAndVals.ids.add(st.statement.getPreparedId().id); + idAndVals.ids.add(st.statement.getPreparedId().boundValuesMetadata.id); idAndVals.values.add(Arrays.asList(st.wrapper.values)); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/BoundStatement.java b/driver-core/src/main/java/com/datastax/driver/core/BoundStatement.java index 45264e81165..8855fa994ff 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/BoundStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/BoundStatement.java @@ -293,7 +293,10 @@ public BoundStatement setRoutingKey(ByteBuffer... routingKeyComponents) { */ @Override public String getKeyspace() { - return statement.getPreparedId().metadata.size() == 0 ? null : statement.getPreparedId().metadata.getKeyspace(0); + ColumnDefinitions defs = statement.getPreparedId().boundValuesMetadata.variables; + return defs.size() == 0 + ? null + : defs.getKeyspace(0); } /** diff --git a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java index ce4cb89dfd4..145100f0ccb 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java @@ -2218,13 +2218,15 @@ public void ensurePoolsSizing() { } public PreparedStatement addPrepared(PreparedStatement stmt) { - PreparedStatement previous = preparedQueries.putIfAbsent(stmt.getPreparedId().id, stmt); + PreparedStatement previous = preparedQueries.putIfAbsent(stmt.getPreparedId().boundValuesMetadata.id, stmt); if (previous != null) { logger.warn("Re-preparing already prepared query is generally an anti-pattern and will likely affect performance. " + "Consider preparing the statement only once. Query='{}'", stmt.getQueryString()); // The one object in the cache will get GCed once it's not referenced by the client anymore since we use a weak reference. // So we need to make sure that the instance we do return to the user is the one that is in the cache. + // However if the result metadata changed since the last PREPARE call, this also needs to be updated. + previous.getPreparedId().resultSetMetadata = stmt.getPreparedId().resultSetMetadata; return previous; } return stmt; diff --git a/driver-core/src/main/java/com/datastax/driver/core/DefaultPreparedStatement.java b/driver-core/src/main/java/com/datastax/driver/core/DefaultPreparedStatement.java index 9680664944b..2a4ca95ae5c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/DefaultPreparedStatement.java +++ b/driver-core/src/main/java/com/datastax/driver/core/DefaultPreparedStatement.java @@ -56,18 +56,18 @@ static DefaultPreparedStatement fromMessage(Responses.Result.Prepared msg, Clust ColumnDefinitions defs = msg.metadata.columns; ProtocolVersion protocolVersion = cluster.getConfiguration().getProtocolOptions().getProtocolVersion(); - - if (defs.size() == 0) { - return new DefaultPreparedStatement(new PreparedId(msg.statementId, defs, msg.resultMetadata.columns, null, protocolVersion), query, queryKeyspace, msg.getCustomPayload(), cluster); + PreparedId.PreparedMetadata boundValuesMetadata = new PreparedId.PreparedMetadata(msg.statementId, defs); + PreparedId.PreparedMetadata resultSetMetadata = new PreparedId.PreparedMetadata(msg.resultMetadataId, msg.resultMetadata.columns); + + int[] pkIndices = null; + if (defs.size() > 0) { + pkIndices = (protocolVersion.compareTo(V4) >= 0) + ? msg.metadata.pkIndices + : computePkIndices(cluster.getMetadata(), defs); } - int[] pkIndices = (protocolVersion.compareTo(V4) >= 0) - ? msg.metadata.pkIndices - : computePkIndices(cluster.getMetadata(), defs); - - PreparedId prepId = new PreparedId(msg.statementId, defs, msg.resultMetadata.columns, pkIndices, protocolVersion); - - return new DefaultPreparedStatement(prepId, query, queryKeyspace, msg.getCustomPayload(), cluster); + PreparedId preparedId = new PreparedId(boundValuesMetadata, resultSetMetadata, pkIndices, protocolVersion); + return new DefaultPreparedStatement(preparedId, query, queryKeyspace, msg.getCustomPayload(), cluster); } private static int[] computePkIndices(Metadata clusterMetadata, ColumnDefinitions boundColumns) { @@ -117,7 +117,7 @@ private static boolean allSet(int[] pkColumns) { @Override public ColumnDefinitions getVariables() { - return preparedId.metadata; + return preparedId.boundValuesMetadata.variables; } @Override diff --git a/driver-core/src/main/java/com/datastax/driver/core/PreparedId.java b/driver-core/src/main/java/com/datastax/driver/core/PreparedId.java index 9a0e255f380..3e297231254 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PreparedId.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PreparedId.java @@ -19,21 +19,37 @@ * Identifies a PreparedStatement. */ public class PreparedId { - // This class is mostly here to group PreparedStatement data that are need for - // execution but that we don't want to expose publicly (see JAVA-195) - final MD5Digest id; - final ColumnDefinitions metadata; - final ColumnDefinitions resultSetMetadata; + // This class is mostly here to group PreparedStatement data that are needed for + // execution but that we don't want to expose publicly (see JAVA-195) final int[] routingKeyIndexes; + final ProtocolVersion protocolVersion; - PreparedId(MD5Digest id, ColumnDefinitions metadata, ColumnDefinitions resultSetMetadata, int[] routingKeyIndexes, ProtocolVersion protocolVersion) { - this.id = id; - this.metadata = metadata; + final PreparedMetadata boundValuesMetadata; + + // can change over time, see JAVA-1196, JAVA-420 + volatile PreparedMetadata resultSetMetadata; + + PreparedId(PreparedMetadata boundValuesMetadata, PreparedMetadata resultSetMetadata, int[] routingKeyIndexes, ProtocolVersion protocolVersion) { + assert boundValuesMetadata != null; + assert resultSetMetadata != null; + this.boundValuesMetadata = boundValuesMetadata; this.resultSetMetadata = resultSetMetadata; this.routingKeyIndexes = routingKeyIndexes; this.protocolVersion = protocolVersion; } + + + static class PreparedMetadata { + + final MD5Digest id; + final ColumnDefinitions variables; + + PreparedMetadata(MD5Digest id, ColumnDefinitions variables) { + this.id = id; + this.variables = variables; + } + } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/ProtocolFeature.java b/driver-core/src/main/java/com/datastax/driver/core/ProtocolFeature.java new file mode 100644 index 00000000000..bbedf6e9084 --- /dev/null +++ b/driver-core/src/main/java/com/datastax/driver/core/ProtocolFeature.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +/** + * A listing of features that may or not apply to a given {@link ProtocolVersion}. + */ +enum ProtocolFeature { + + /** + * The capability of updating a prepared statement if the result's metadata changes at runtime (for example, if the + * query is a {@code SELECT *} and the table is altered). + */ + PREPARED_METADATA_CHANGES, + // + ; + + /** + * Determines whether or not the input version supports ths feature. + * + * @param version the version to test against. + * @return true if supported, false otherwise. + */ + boolean isSupportedBy(ProtocolVersion version) { + switch (this) { + case PREPARED_METADATA_CHANGES: + return version == ProtocolVersion.V5; + default: + return false; + } + } + +} diff --git a/driver-core/src/main/java/com/datastax/driver/core/Requests.java b/driver-core/src/main/java/com/datastax/driver/core/Requests.java index a4b69d2e284..3af73f4d9b8 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Requests.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Requests.java @@ -183,38 +183,48 @@ static class Execute extends Message.Request { @Override public void encode(Execute msg, ByteBuf dest, ProtocolVersion version) { CBUtil.writeBytes(msg.statementId.bytes, dest); + if (ProtocolFeature.PREPARED_METADATA_CHANGES.isSupportedBy(version)) + CBUtil.writeBytes(msg.resultMetadataId.bytes, dest); msg.options.encode(dest, version); } @Override public int encodedSize(Execute msg, ProtocolVersion version) { - return CBUtil.sizeOfBytes(msg.statementId.bytes) - + msg.options.encodedSize(version); + int size = CBUtil.sizeOfBytes(msg.statementId.bytes); + if (ProtocolFeature.PREPARED_METADATA_CHANGES.isSupportedBy(version)) + size += CBUtil.sizeOfBytes(msg.resultMetadataId.bytes); + size += msg.options.encodedSize(version); + return size; } }; final MD5Digest statementId; + final MD5Digest resultMetadataId; final QueryProtocolOptions options; - Execute(MD5Digest statementId, QueryProtocolOptions options, boolean tracingRequested) { + Execute(MD5Digest statementId, MD5Digest resultMetadataId, QueryProtocolOptions options, boolean tracingRequested) { super(Message.Request.Type.EXECUTE, tracingRequested); this.statementId = statementId; + this.resultMetadataId = resultMetadataId; this.options = options; } @Override protected Request copyInternal() { - return new Execute(statementId, options, isTracingRequested()); + return new Execute(statementId, resultMetadataId, options, isTracingRequested()); } @Override protected Request copyInternal(ConsistencyLevel newConsistencyLevel) { - return new Execute(statementId, options.copy(newConsistencyLevel), isTracingRequested()); + return new Execute(statementId, resultMetadataId, options.copy(newConsistencyLevel), isTracingRequested()); } @Override public String toString() { - return "EXECUTE " + statementId + " (" + options + ')'; + if (resultMetadataId != null) + return "EXECUTE preparedId: " + statementId + " resultMetadataId: " + resultMetadataId + " (" + options + ')'; + else + return "EXECUTE preparedId: " + statementId + " (" + options + ')'; } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/Responses.java b/driver-core/src/main/java/com/datastax/driver/core/Responses.java index cecd1e1ae9f..847a812eb93 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Responses.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Responses.java @@ -25,7 +25,6 @@ import java.nio.ByteBuffer; import java.util.*; -import static com.datastax.driver.core.ProtocolVersion.V4; import static com.datastax.driver.core.SchemaElement.*; class Responses { @@ -347,7 +346,8 @@ private enum Flag { // The order of that enum matters!! GLOBAL_TABLES_SPEC, HAS_MORE_PAGES, - NO_METADATA; + NO_METADATA, + METADATA_CHANGED; static EnumSet deserialize(int flags) { EnumSet set = EnumSet.noneOf(Flag.class); @@ -367,14 +367,16 @@ static int serialize(EnumSet flags) { } } - static final Metadata EMPTY = new Metadata(0, null, null, null); + static final Metadata EMPTY = new Metadata(null, 0, null, null, null); final int columnCount; final ColumnDefinitions columns; // Can be null if no metadata was asked by the query final ByteBuffer pagingState; final int[] pkIndices; + final MD5Digest metadataId; // only present if the flag METADATA_CHANGED is set (ROWS response only) - private Metadata(int columnCount, ColumnDefinitions columns, ByteBuffer pagingState, int[] pkIndices) { + private Metadata(MD5Digest metadataId, int columnCount, ColumnDefinitions columns, ByteBuffer pagingState, int[] pkIndices) { + this.metadataId = metadataId; this.columnCount = columnCount; this.columns = columns; this.pagingState = pagingState; @@ -391,6 +393,18 @@ static Metadata decode(ByteBuf body, boolean withPkIndices, ProtocolVersion prot EnumSet flags = Flag.deserialize(body.readInt()); int columnCount = body.readInt(); + ByteBuffer state = null; + if (flags.contains(Flag.HAS_MORE_PAGES)) + state = CBUtil.readValue(body); + + MD5Digest resultMetadataId = null; + if (flags.contains(Flag.METADATA_CHANGED)) { + assert ProtocolFeature.PREPARED_METADATA_CHANGES.isSupportedBy(protocolVersion) + : "METADATA_CHANGED flag is not supported in protocol version " + protocolVersion; + assert !flags.contains(Flag.NO_METADATA) : "METADATA_CHANGED and NO_METADATA are mutually exclusive flags"; + resultMetadataId = MD5Digest.wrap(CBUtil.readBytes(body)); + } + int[] pkIndices = null; int pkCount; if (withPkIndices && (pkCount = body.readInt()) > 0) { @@ -399,12 +413,8 @@ static Metadata decode(ByteBuf body, boolean withPkIndices, ProtocolVersion prot pkIndices[i] = (int) body.readShort(); } - ByteBuffer state = null; - if (flags.contains(Flag.HAS_MORE_PAGES)) - state = CBUtil.readValue(body); - if (flags.contains(Flag.NO_METADATA)) - return new Metadata(columnCount, null, state, pkIndices); + return new Metadata(resultMetadataId, columnCount, null, state, pkIndices); boolean globalTablesSpec = flags.contains(Flag.GLOBAL_TABLES_SPEC); @@ -425,7 +435,7 @@ static Metadata decode(ByteBuf body, boolean withPkIndices, ProtocolVersion prot defs[i] = new ColumnDefinitions.Definition(ksName, cfName, name, type); } - return new Metadata(columnCount, new ColumnDefinitions(defs, codecRegistry), state, pkIndices); + return new Metadata(resultMetadataId, columnCount, new ColumnDefinitions(defs, codecRegistry), state, pkIndices); } @Override @@ -517,10 +527,13 @@ static class Prepared extends Result { @Override public Result decode(ByteBuf body, ProtocolVersion version, CodecRegistry codecRegistry) { MD5Digest id = MD5Digest.wrap(CBUtil.readBytes(body)); - boolean withPkIndices = version.compareTo(V4) >= 0; + MD5Digest resultMetadataId = null; + if (ProtocolFeature.PREPARED_METADATA_CHANGES.isSupportedBy(version)) + resultMetadataId = MD5Digest.wrap(CBUtil.readBytes(body)); + boolean withPkIndices = version.compareTo(ProtocolVersion.V4) >= 0; Rows.Metadata metadata = Rows.Metadata.decode(body, withPkIndices, version, codecRegistry); Rows.Metadata resultMetadata = decodeResultMetadata(body, version, codecRegistry); - return new Prepared(id, metadata, resultMetadata); + return new Prepared(id, resultMetadataId, metadata, resultMetadata); } private Metadata decodeResultMetadata(ByteBuf body, ProtocolVersion version, CodecRegistry codecRegistry) { @@ -539,12 +552,14 @@ private Metadata decodeResultMetadata(ByteBuf body, ProtocolVersion version, Cod }; final MD5Digest statementId; + final MD5Digest resultMetadataId; final Rows.Metadata metadata; final Rows.Metadata resultMetadata; - private Prepared(MD5Digest statementId, Rows.Metadata metadata, Rows.Metadata resultMetadata) { + private Prepared(MD5Digest statementId, MD5Digest resultMetadataId, Rows.Metadata metadata, Rows.Metadata resultMetadata) { super(Kind.PREPARED); this.statementId = statementId; + this.resultMetadataId = resultMetadataId; this.metadata = metadata; this.resultMetadata = resultMetadata; } diff --git a/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java b/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java index 6b56248f69a..0dd9aecb064 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java +++ b/driver-core/src/main/java/com/datastax/driver/core/SessionManager.java @@ -574,16 +574,23 @@ else if (fetchSize != Integer.MAX_VALUE) request = new Requests.Query(qString, options, statement.isTracing()); } else if (statement instanceof BoundStatement) { BoundStatement bs = (BoundStatement) statement; - if (!cluster.manager.preparedQueries.containsKey(bs.statement.getPreparedId().id)) { + if (!cluster.manager.preparedQueries.containsKey(bs.statement.getPreparedId().boundValuesMetadata.id)) { throw new InvalidQueryException(String.format("Tried to execute unknown prepared query : %s. " - + "You may have used a PreparedStatement that was created with another Cluster instance.", bs.statement.getPreparedId().id)); + + "You may have used a PreparedStatement that was created with another Cluster instance.", bs.statement.getPreparedId().boundValuesMetadata.id)); } if (protocolVersion.compareTo(ProtocolVersion.V4) < 0) bs.ensureAllSet(); - boolean skipMetadata = protocolVersion != ProtocolVersion.V1 && bs.statement.getPreparedId().resultSetMetadata != null; - Requests.QueryProtocolOptions options = new Requests.QueryProtocolOptions(Message.Request.Type.EXECUTE, consistency, Arrays.asList(bs.wrapper.values), Collections.emptyMap(), - skipMetadata, fetchSize, usedPagingState, serialConsistency, defaultTimestamp); - request = new Requests.Execute(bs.statement.getPreparedId().id, options, statement.isTracing()); + + // skip resultset metadata if version > 1 (otherwise this feature is not supported) + // and if we already have metadata for the prepared statement being executed. + boolean skipMetadata = protocolVersion != ProtocolVersion.V1 && bs.statement.getPreparedId().resultSetMetadata.variables != null; + Requests.QueryProtocolOptions options = new Requests.QueryProtocolOptions(Message.Request.Type.EXECUTE, + consistency, Arrays.asList(bs.wrapper.values), Collections.emptyMap(), skipMetadata, + fetchSize, usedPagingState, serialConsistency, defaultTimestamp); + request = new Requests.Execute( + bs.statement.getPreparedId().boundValuesMetadata.id, + bs.statement.getPreparedId().resultSetMetadata.id, + options, statement.isTracing()); } else { assert statement instanceof BatchStatement : statement; assert pagingState == null; diff --git a/driver-core/src/test/java/com/datastax/driver/core/Assertions.java b/driver-core/src/test/java/com/datastax/driver/core/Assertions.java index 86ecc081c14..d86a1090e7c 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/Assertions.java +++ b/driver-core/src/test/java/com/datastax/driver/core/Assertions.java @@ -87,8 +87,12 @@ public static MaterializedViewMetadataAssert assertThat(MaterializedViewMetadata public static VersionNumberAssert assertThat(VersionNumber actual) { return new VersionNumberAssert(actual); } + public static ResultSetAssert assertThat(ResultSet rows) { return new ResultSetAssert(rows); } + public static ColumnDefinitionsAssert assertThat(ColumnDefinitions variables) { + return new ColumnDefinitionsAssert(variables); + } } diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java index 45ac66b91b7..6046c0ce747 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java @@ -1015,6 +1015,21 @@ public void run() { keyspace = null; } + protected void resetTestSession() throws Exception { + session.close(); + Cluster.Builder builder = ccmTestConfig.clusterProvider(this); + // add contact points only if the provided builder didn't do so + if (builder.getContactPoints().isEmpty()) + builder.addContactPoints(getContactPoints()); + builder.withPort(ccm.getBinaryPort()); + cluster = register(builder.build()); + cluster.init(); + + session.close(); + session = register(cluster.connect()); + useKeyspace(session, keyspace); + } + protected void closeCloseables() { if (closer != null) executeNoFail(new Callable() { diff --git a/driver-core/src/test/java/com/datastax/driver/core/ColumnDefinitionsAssert.java b/driver-core/src/test/java/com/datastax/driver/core/ColumnDefinitionsAssert.java new file mode 100644 index 00000000000..4f94bead04c --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/ColumnDefinitionsAssert.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import org.assertj.core.api.AbstractAssert; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +public class ColumnDefinitionsAssert extends AbstractAssert { + + public ColumnDefinitionsAssert(ColumnDefinitions actual) { + super(actual, ColumnDefinitionsAssert.class); + } + + public ColumnDefinitionsAssert hasSize(int expected) { + assertThat(actual.size()).isEqualTo(expected); + return this; + } + + public ColumnDefinitionsAssert containsVariable(String name, DataType type) { + try { + assertThat(actual.getType(name)).isEqualTo(type); + } catch (Exception e) { + fail(String.format("Expected actual to contain variable %s of type %s, but it did not", name, type), e); + } + return this; + } + + public ColumnDefinitionsAssert doesNotContainVariable(String name) { + assertThat(actual.getIndexOf(name)).isEqualTo(-1); + return this; + } +} diff --git a/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementInvalidationTest.java b/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementInvalidationTest.java new file mode 100644 index 00000000000..2d707777f12 --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/PreparedStatementInvalidationTest.java @@ -0,0 +1,256 @@ + +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + + +import com.datastax.driver.core.exceptions.NoHostAvailableException; +import com.datastax.driver.core.utils.CassandraVersion; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import static com.datastax.driver.core.Assertions.assertThat; +import static junit.framework.TestCase.fail; + +/** + * Note: at the time of writing, this test exercises features of an unreleased Cassandra version. To + * test against a local build, run with + * + *

    + *   -Dcassandra.version=4.0.0 -Dcassandra.directory=/path/to/cassandra
    + * 
    + */ +@CassandraVersion("4.0") +public class PreparedStatementInvalidationTest extends CCMTestsSupport { + + @Override + public Cluster.Builder createClusterBuilder() { + // TODO remove when protocol v5 is stable in C* 4 + return super.createClusterBuilderNoDebouncing().allowBetaProtocolVersion(); + } + + @BeforeMethod(groups = "short", alwaysRun = true) + public void setup() throws Exception { + execute("CREATE TABLE prepared_statement_invalidation_test (a int PRIMARY KEY, b int, c int);"); + execute("INSERT INTO prepared_statement_invalidation_test (a, b, c) VALUES (1, 1, 1);"); + execute("INSERT INTO prepared_statement_invalidation_test (a, b, c) VALUES (2, 2, 2);"); + execute("INSERT INTO prepared_statement_invalidation_test (a, b, c) VALUES (3, 3, 3);"); + execute("INSERT INTO prepared_statement_invalidation_test (a, b, c) VALUES (4, 4, 4);"); + } + + @AfterMethod(groups = "short", alwaysRun = true) + public void teardown() throws Exception { + execute("DROP TABLE prepared_statement_invalidation_test"); + } + + @Test(groups = "short") + public void should_update_statement_id_when_metadata_changed_across_executions() { + // given + PreparedStatement ps = session().prepare("SELECT * FROM prepared_statement_invalidation_test WHERE a = ?"); + MD5Digest idBefore = ps.getPreparedId().resultSetMetadata.id; + // when + session().execute("ALTER TABLE prepared_statement_invalidation_test ADD d int"); + BoundStatement bs = ps.bind(1); + ResultSet rows = session().execute(bs); + // then + MD5Digest idAfter = ps.getPreparedId().resultSetMetadata.id; + assertThat(idBefore).isNotEqualTo(idAfter); + assertThat(ps.getPreparedId().resultSetMetadata.variables) + .hasSize(4) + .containsVariable("d", DataType.cint()); + assertThat(bs.preparedStatement().getPreparedId().resultSetMetadata.variables) + .hasSize(4) + .containsVariable("d", DataType.cint()); + assertThat(rows.getColumnDefinitions()) + .hasSize(4) + .containsVariable("d", DataType.cint()); + } + + @Test(groups = "short") + public void should_update_statement_id_when_metadata_changed_across_pages() throws Exception { + // given + PreparedStatement ps = session().prepare("SELECT * FROM prepared_statement_invalidation_test"); + ResultSet rows = session().execute(ps.bind().setFetchSize(2)); + assertThat(rows.isFullyFetched()).isFalse(); + MD5Digest idBefore = ps.getPreparedId().resultSetMetadata.id; + ColumnDefinitions definitionsBefore = rows.getColumnDefinitions(); + assertThat(definitionsBefore) + .hasSize(3) + .doesNotContainVariable("d"); + // consume the first page + int remaining = rows.getAvailableWithoutFetching(); + while (remaining-- > 0) { + try { + rows.one().getInt("d"); + fail("expected an error"); + } catch (IllegalArgumentException e) { /*expected*/ } + } + + // when + session().execute("ALTER TABLE prepared_statement_invalidation_test ADD d int"); + + // then + // this should trigger a background fetch of the second page, and therefore update the definitions + for (Row row : rows) { + assertThat(row.isNull("d")).isTrue(); + } + MD5Digest idAfter = ps.getPreparedId().resultSetMetadata.id; + ColumnDefinitions definitionsAfter = rows.getColumnDefinitions(); + assertThat(idBefore).isNotEqualTo(idAfter); + assertThat(definitionsAfter) + .hasSize(4) + .containsVariable("d", DataType.cint()); + } + + @Test(groups = "short") + public void should_update_statement_id_when_metadata_changed_across_sessions() { + Session session1 = cluster().connect(); + useKeyspace(session1, keyspace); + Session session2 = cluster().connect(); + useKeyspace(session2, keyspace); + + PreparedStatement ps1 = session1.prepare("SELECT * FROM prepared_statement_invalidation_test WHERE a = ?"); + PreparedStatement ps2 = session2.prepare("SELECT * FROM prepared_statement_invalidation_test WHERE a = ?"); + + MD5Digest id1a = ps1.getPreparedId().resultSetMetadata.id; + MD5Digest id2a = ps2.getPreparedId().resultSetMetadata.id; + + ResultSet rows1 = session1.execute(ps1.bind(1)); + ResultSet rows2 = session2.execute(ps2.bind(1)); + + assertThat(rows1.getColumnDefinitions()) + .hasSize(3) + .containsVariable("a", DataType.cint()) + .containsVariable("b", DataType.cint()) + .containsVariable("c", DataType.cint()); + assertThat(rows2.getColumnDefinitions()) + .hasSize(3) + .containsVariable("a", DataType.cint()) + .containsVariable("b", DataType.cint()) + .containsVariable("c", DataType.cint()); + + session1.execute("ALTER TABLE prepared_statement_invalidation_test ADD d int"); + + rows1 = session1.execute(ps1.bind(1)); + rows2 = session2.execute(ps2.bind(1)); + + MD5Digest id1b = ps1.getPreparedId().resultSetMetadata.id; + MD5Digest id2b = ps2.getPreparedId().resultSetMetadata.id; + + assertThat(id1a).isNotEqualTo(id1b); + assertThat(id2a).isNotEqualTo(id2b); + + assertThat(ps1.getPreparedId().resultSetMetadata.variables) + .hasSize(4) + .containsVariable("d", DataType.cint()); + assertThat(ps2.getPreparedId().resultSetMetadata.variables) + .hasSize(4) + .containsVariable("d", DataType.cint()); + assertThat(rows1.getColumnDefinitions()) + .hasSize(4) + .containsVariable("d", DataType.cint()); + assertThat(rows2.getColumnDefinitions()) + .hasSize(4) + .containsVariable("d", DataType.cint()); + } + + @Test(groups = "short", expectedExceptions = NoHostAvailableException.class) + public void should_not_reprepare_invalid_statements() { + // given + session().execute("ALTER TABLE prepared_statement_invalidation_test ADD d int"); + PreparedStatement ps = session().prepare("SELECT a, b, c, d FROM prepared_statement_invalidation_test WHERE a = ?"); + session().execute("ALTER TABLE prepared_statement_invalidation_test DROP d"); + // when + session().execute(ps.bind()); + } + + @Test(groups = "short") + public void should_never_update_statement_id_for_conditional_updates_in_modern_protocol() { + should_never_update_statement_id_for_conditional_updates(session()); + } + + private void should_never_update_statement_id_for_conditional_updates(Session session) { + // Given + PreparedStatement ps = session.prepare( + "INSERT INTO prepared_statement_invalidation_test (a, b, c) VALUES (?, ?, ?) IF NOT EXISTS"); + + // Never store metadata in the prepared statement for conditional updates, since the result set can change + // depending on the outcome. + assertThat(ps.getPreparedId().resultSetMetadata.variables).isNull(); + MD5Digest idBefore = ps.getPreparedId().resultSetMetadata.id; + + // When + ResultSet rs = session.execute(ps.bind(5, 5, 5)); + + // Then + // Successful conditional update => only contains the [applied] column + assertThat(rs.wasApplied()).isTrue(); + assertThat(rs.getColumnDefinitions()) + .hasSize(1) + .containsVariable("[applied]", DataType.cboolean()); + // However the prepared statement shouldn't have changed + assertThat(ps.getPreparedId().resultSetMetadata.variables).isNull(); + assertThat(ps.getPreparedId().resultSetMetadata.id).isEqualTo(idBefore); + + + // When + rs = session.execute(ps.bind(5, 5, 5)); + + // Then + // Failed conditional update => regular metadata + assertThat(rs.wasApplied()).isFalse(); + assertThat(rs.getColumnDefinitions()).hasSize(4); + Row row = rs.one(); + assertThat(row.getBool("[applied]")).isFalse(); + assertThat(row.getInt("a")).isEqualTo(5); + assertThat(row.getInt("b")).isEqualTo(5); + assertThat(row.getInt("c")).isEqualTo(5); + // The prepared statement still shouldn't have changed + assertThat(ps.getPreparedId().resultSetMetadata.variables).isNull(); + assertThat(ps.getPreparedId().resultSetMetadata.id).isEqualTo(idBefore); + + + // When + session.execute("ALTER TABLE prepared_statement_invalidation_test ADD d int"); + rs = session.execute(ps.bind(5, 5, 5)); + + // Then + // Failed conditional update => regular metadata that should also contain the new column + assertThat(rs.wasApplied()).isFalse(); + assertThat(rs.getColumnDefinitions()).hasSize(5); + row = rs.one(); + assertThat(row.getBool("[applied]")).isFalse(); + assertThat(row.getInt("a")).isEqualTo(5); + assertThat(row.getInt("b")).isEqualTo(5); + assertThat(row.getInt("c")).isEqualTo(5); + assertThat(row.isNull("d")).isTrue(); + assertThat(ps.getPreparedId().resultSetMetadata.variables).isNull(); + assertThat(ps.getPreparedId().resultSetMetadata.id).isEqualTo(idBefore); + } + + @Test(groups = "short") + public void should_never_update_statement_for_conditional_updates_in_legacy_protocols() { + // Given + Cluster cluster = register(Cluster.builder() + .addContactPoints(getContactPoints()) + .withPort(ccm().getBinaryPort()) + .withProtocolVersion(ccm().getProtocolVersion(ProtocolVersion.V4)) + .build()); + Session session = cluster.connect(keyspace); + should_never_update_statement_id_for_conditional_updates(session); + } +} From 95b2039ba6c3e94bf418b525cf8e826fc83c62bf Mon Sep 17 00:00:00 2001 From: Joseph Lynch Date: Thu, 22 Jun 2017 19:52:42 -0700 Subject: [PATCH 161/512] JAVA-1670: Support user-provided JMX ports for CCMBridge This makes it possible to test multi node clusters and send the jmx commands to specific nodes for testing purposes (e.g. compaction, flushing, monitoring, repairs, etc ...) --- changelog/README.md | 1 + .../com/datastax/driver/core/CCMAccess.java | 10 +++ .../com/datastax/driver/core/CCMBridge.java | 40 ++++++++++-- .../datastax/driver/core/CCMBridgeTest.java | 65 +++++++++++++++++++ .../com/datastax/driver/core/CCMCache.java | 3 + .../datastax/driver/core/CCMTestsSupport.java | 3 + 6 files changed, 118 insertions(+), 4 deletions(-) create mode 100644 driver-core/src/test/java/com/datastax/driver/core/CCMBridgeTest.java diff --git a/changelog/README.md b/changelog/README.md index 112c13942f3..880c856c804 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -4,6 +4,7 @@ - [bug] JAVA-1666: Fix keyspace export when a UDT has case-sensitive field names. - [improvement] JAVA-1196: Include hash of result set metadata in prepared statement id. +- [improvement] JAVA-1670: Support user-provided JMX ports for CCMBridge. ### 3.3.1 diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java b/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java index 04e6648255b..7a32c39ab12 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMAccess.java @@ -101,6 +101,16 @@ enum Workload {cassandra, solr, hadoop, spark, cfs, graph} */ InetSocketAddress addressOfNode(int n); + /** + * Returns the address that the @{code nth} host in the CCM cluster is listening on JMX on (counting from 1, + * i.e, {@code jmxAddressOfNode(1)} returns the jmx address of the first node. + *

    + * In multi-DC setups, nodes are numbered in ascending order of their datacenter number. + * E.g. with 2 DCs and 3 nodes in each DC, the first node in DC 2 is number 4. + * + * @return the address of the JMX listener of the {@code nth} host in the cluster + */ + InetSocketAddress jmxAddressOfNode(int n); // Methods altering the whole cluster diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java index d79a8e8ae34..4181afd7cd2 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMBridge.java @@ -286,8 +286,12 @@ public static boolean isWindows() { private final int[] nodes; - private CCMBridge(String clusterName, VersionNumber cassandraVersion, VersionNumber dseVersion, String ipPrefix, - int storagePort, int thriftPort, int binaryPort, String jvmArgs, int[] nodes) { + private final int[] jmxPorts; + + + protected CCMBridge(String clusterName, VersionNumber cassandraVersion, VersionNumber dseVersion, String ipPrefix, + int storagePort, int thriftPort, int binaryPort, int[] jmxPorts, String jvmArgs, int[] nodes) { + this.clusterName = clusterName; this.cassandraVersion = cassandraVersion; this.dseVersion = dseVersion; @@ -299,6 +303,7 @@ private CCMBridge(String clusterName, VersionNumber cassandraVersion, VersionNum this.jvmArgs = jvmArgs; this.nodes = nodes; this.ccmDir = Files.createTempDir(); + this.jmxPorts = jmxPorts; } public static Builder builder() { @@ -319,6 +324,11 @@ public InetSocketAddress addressOfNode(int n) { return new InetSocketAddress(ipOfNode(n), binaryPort); } + @Override + public InetSocketAddress jmxAddressOfNode(int n) { + return new InetSocketAddress("localhost", jmxPorts[n - 1]); + } + @Override public VersionNumber getCassandraVersion() { return cassandraVersion; @@ -789,6 +799,7 @@ public static class Builder { private String ipPrefix = TestUtils.IP_PREFIX; int[] nodes = {1}; + private int[] jmxPorts = {}; private boolean start = true; private boolean dse = false; private VersionNumber version = null; @@ -921,6 +932,11 @@ public Builder withBinaryPort(int port) { return this; } + public Builder withJmxPorts(int... ports) { + this.jmxPorts = ports; + return this; + } + /** * Sets the DSE workload for a given node. * @@ -959,13 +975,29 @@ public CCMBridge build() { int storagePort = Integer.parseInt(cassandraConfiguration.get("storage_port").toString()); int thriftPort = Integer.parseInt(cassandraConfiguration.get("rpc_port").toString()); int binaryPort = Integer.parseInt(cassandraConfiguration.get("native_transport_port").toString()); + + // Copy any supplied jmx ports over, and find available ports for the rest + int numNodes = 0; + for (int i : nodes) { + numNodes += i; + } + + int[] generatedJmxPorts = new int[numNodes]; + for (int i = 0; i < numNodes; i++) { + if (i >= jmxPorts.length) { + generatedJmxPorts[i] = TestUtils.findAvailablePort(); + } else { + generatedJmxPorts[i] = jmxPorts[i]; + } + } + if (!isThriftSupported(cassandraVersion)) { // remove thrift configuration cassandraConfiguration.remove("start_rpc"); cassandraConfiguration.remove("rpc_port"); cassandraConfiguration.remove("thrift_prepared_statements_cache_size_mb"); } - final CCMBridge ccm = new CCMBridge(clusterName, cassandraVersion, dseVersion, ipPrefix, storagePort, thriftPort, binaryPort, joinJvmArgs(), nodes); + final CCMBridge ccm = new CCMBridge(clusterName, cassandraVersion, dseVersion, ipPrefix, storagePort, thriftPort, binaryPort, generatedJmxPorts, joinJvmArgs(), nodes); Runtime.getRuntime().addShutdownHook(new Thread() { @Override @@ -1068,7 +1100,7 @@ private void updateNodeConf(CCMBridge ccm) { for (int dc = 1; dc <= nodes.length; dc++) { int nodesInDc = nodes[dc - 1]; for (int i = 0; i < nodesInDc; i++) { - int jmxPort = TestUtils.findAvailablePort(); + int jmxPort = ccm.jmxAddressOfNode(n).getPort(); int debugPort = TestUtils.findAvailablePort(); logger.trace("Node {} in cluster {} using JMX port {} and debug port {}", n, ccm.getClusterName(), jmxPort, debugPort); File nodeConf = new File(ccm.getNodeDir(n), "node.conf"); diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMBridgeTest.java b/driver-core/src/test/java/com/datastax/driver/core/CCMBridgeTest.java new file mode 100644 index 00000000000..2ab741e6ab5 --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMBridgeTest.java @@ -0,0 +1,65 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import org.testng.annotations.Test; + +import javax.management.remote.JMXConnector; +import javax.management.remote.JMXConnectorFactory; +import javax.management.remote.JMXServiceURL; +import java.net.InetSocketAddress; + +import static org.assertj.core.api.Assertions.assertThat; + +/** + * A simple test to validate jmx ports work + */ +@Test +@CCMConfig(numberOfNodes = 3) +public class CCMBridgeTest extends CCMTestsSupport { + + @Test(groups = "short") + public void should_make_JMX_connection() throws Exception { + InetSocketAddress addr1 = ccm().jmxAddressOfNode(1); + InetSocketAddress addr2 = ccm().jmxAddressOfNode(2); + InetSocketAddress addr3 = ccm().jmxAddressOfNode(3); + + assertThat(addr1.getPort()).isNotEqualTo(addr2.getPort()); + assertThat(addr1.getPort()).isNotEqualTo(addr3.getPort()); + assertThat(addr2.getPort()).isNotEqualTo(addr3.getPort()); + + JMXServiceURL url = new JMXServiceURL( + String.format( + "service:jmx:rmi:///jndi/rmi://%s:%d/jmxrmi", + addr2.getAddress().getHostAddress(), addr2.getPort() + ) + ); + JMXConnector jmxc = JMXConnectorFactory.connect(url, null); + assertThat(jmxc.getConnectionId().isEmpty()).isFalse(); + } + + @Test(groups = "short") + public void should_configure_JMX_ports_through_builder() throws Exception { + CCMBridge.Builder ccmBuilder = CCMBridge.builder().withNodes(3).notStarted().withJmxPorts(12345); + CCMAccess ccm = ccmBuilder.build(); + assertThat(ccm.jmxAddressOfNode(1).getPort()).isEqualTo(12345); + + int port2 = ccm.jmxAddressOfNode(2).getPort(); + int port3 = ccm.jmxAddressOfNode(3).getPort(); + assertThat(port2).isBetween(0, 65535); + assertThat(port3).isBetween(0, 65535); + } +} \ No newline at end of file diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java b/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java index 78eb8435202..9b83d462c13 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMCache.java @@ -103,6 +103,9 @@ public InetSocketAddress addressOfNode(int n) { return ccm.addressOfNode(n); } + @Override + public InetSocketAddress jmxAddressOfNode(int n) { return ccm.jmxAddressOfNode(n); } + @Override public void start() { ccm.start(); diff --git a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java index 6046c0ce747..32903b1bb5b 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CCMTestsSupport.java @@ -92,6 +92,9 @@ public InetSocketAddress addressOfNode(int n) { return delegate.addressOfNode(n); } + @Override + public InetSocketAddress jmxAddressOfNode(int n) { return delegate.jmxAddressOfNode(n); } + @Override public File getCcmDir() { return delegate.getCcmDir(); From 5f42e52bb12907a8630f8289aada85c8301836f4 Mon Sep 17 00:00:00 2001 From: Dmitry Konstantinov Date: Mon, 30 Oct 2017 19:54:39 +0300 Subject: [PATCH 162/512] JAVA-1661: Avoid String.toLowerCase if possible in Metadata This method is invoked very frequently, minimize CPU usage and GC overheads. --- changelog/README.md | 1 + .../com/datastax/driver/core/Metadata.java | 107 +++++++++++++++--- .../datastax/driver/core/MetadataTest.java | 18 +++ 3 files changed, 109 insertions(+), 17 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 880c856c804..2da291725cf 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -5,6 +5,7 @@ - [bug] JAVA-1666: Fix keyspace export when a UDT has case-sensitive field names. - [improvement] JAVA-1196: Include hash of result set metadata in prepared statement id. - [improvement] JAVA-1670: Support user-provided JMX ports for CCMBridge. +- [improvement] JAVA-1661: Avoid String.toLowerCase if possible in Metadata. ### 3.3.1 diff --git a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java index 1eddbb84ca0..bd172d8759d 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Metadata.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Metadata.java @@ -18,6 +18,7 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Maps; +import io.netty.util.collection.IntObjectHashMap; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -45,7 +46,7 @@ public class Metadata { final ReentrantLock lock = new ReentrantLock(); // See https://github.com/apache/cassandra/blob/trunk/doc/cql3/CQL.textile#appendixA - private static final Set RESERVED_KEYWORDS = ImmutableSet.of( + private static final IntObjectHashMap> RESERVED_KEYWORDS = indexByCaseInsensitiveHash( "add", "allow", "alter", "and", "any", "apply", "asc", "authorize", "batch", "begin", "by", "columnfamily", "create", "delete", "desc", "drop", "each_quorum", "from", "grant", "in", "index", "inet", "infinity", "insert", "into", "keyspace", "keyspaces", "limit", "local_one", @@ -125,25 +126,32 @@ static String handleId(String id) { if (id == null) return null; - if (isAlphanumeric(id)) - return id.toLowerCase(); - - // Check if it's enclosed in quotes. If it is, remove them and unescape internal double quotes - return ParseUtils.unDoubleQuote(id); - } - - private static boolean isAlphanumeric(String s) { - for (int i = 0; i < s.length(); i++) { - char c = s.charAt(i); - if (!( + boolean isAlphanumericLowCase = true; + boolean isAlphanumeric = true; + for (int i = 0; i < id.length(); i++) { + char c = id.charAt(i); + if (c >= 65 && c <= 90) { // A-Z + isAlphanumericLowCase = false; + } else if (!( (c >= 48 && c <= 57) // 0-9 - || (c >= 65 && c <= 90) // A-Z || (c == 95) // _ (underscore) || (c >= 97 && c <= 122) // a-z - )) - return false; + )) { + isAlphanumeric = false; + isAlphanumericLowCase = false; + break; + } } - return true; + + if (isAlphanumericLowCase) { + return id; + } + if (isAlphanumeric) { + return id.toLowerCase(); + } + + // Check if it's enclosed in quotes. If it is, remove them and unescape internal double quotes + return ParseUtils.unDoubleQuote(id); } /** @@ -273,8 +281,73 @@ public static String quote(String id) { * @return {@code true} if the given identifier is a known reserved * CQL keyword, {@code false} otherwise. */ + public static boolean isReservedCqlKeyword(String id) { - return id != null && RESERVED_KEYWORDS.contains(id.toLowerCase()); + if (id == null) { + return false; + } + int hash = caseInsensitiveHash(id); + List keywords = RESERVED_KEYWORDS.get(hash); + if (keywords == null) { + return false; + } else { + for (char[] keyword : keywords) { + if (equalsIgnoreCaseAscii(id, keyword)) { + return true; + } + } + return false; + } + } + + private static int caseInsensitiveHash(String str) { + int hashCode = 17; + for (int i = 0; i < str.length(); i++) { + char c = toLowerCaseAscii(str.charAt(i)); + hashCode = 31 * hashCode + c; + } + return hashCode; + } + + // keyword is expected as a second argument always in low case + private static boolean equalsIgnoreCaseAscii(String str1, char[] str2LowCase) { + if (str1.length() != str2LowCase.length) return false; + + for (int i = 0; i < str1.length(); i++) { + char c1 = str1.charAt(i); + char c2Low = str2LowCase[i]; + if (c1 == c2Low) { + continue; + } + char low1 = toLowerCaseAscii(c1); + if (low1 == c2Low) { + continue; + } + return false; + } + return true; + } + + private static char toLowerCaseAscii(char c) { + if (c >= 65 && c <= 90) { // A-Z + c ^= 0x20; // convert to low case + } + return c; + } + + private static IntObjectHashMap> indexByCaseInsensitiveHash(String... words) { + IntObjectHashMap> result = new IntObjectHashMap>(); + for (String word : words) { + char[] wordAsCharArray = word.toLowerCase().toCharArray(); + int hash = caseInsensitiveHash(word); + List list = result.get(hash); + if (list == null) { + list = new ArrayList(); + result.put(hash, list); + } + list.add(wordAsCharArray); + } + return result; } /** diff --git a/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java index d101791c543..d28e6aeb7ba 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/MetadataTest.java @@ -125,6 +125,7 @@ private Map getTokenForHosts(Metadata metadata) { public void handleId_should_lowercase_unquoted_alphanumeric_identifiers() { assertThat(Metadata.handleId("FooBar1")).isEqualTo("foobar1"); assertThat(Metadata.handleId("Foo_Bar_1")).isEqualTo("foo_bar_1"); + assertThat(Metadata.handleId("foo_bar_1")).isEqualTo("foo_bar_1"); } @Test(groups = "unit") @@ -161,4 +162,21 @@ public void escapeId_should_quote_reserved_cql_keywords() { assertThat(Metadata.quoteIfNecessary("columnfamily")).isEqualTo("\"columnfamily\""); } + @Test(groups = "unit") + public void should_detect_reserved_keywords_in_upper_case() { + assertThat(Metadata.isReservedCqlKeyword("COLUMNFAMILY")).isTrue(); + assertThat(Metadata.isReservedCqlKeyword("TEST_COLUMNFAMILY")).isFalse(); + } + + @Test(groups = "unit") + public void should_detect_reserved_keywords_in_lower_case() { + assertThat(Metadata.isReservedCqlKeyword("columnfamily")).isTrue(); + assertThat(Metadata.isReservedCqlKeyword("test_columnfamily")).isFalse(); + } + + @Test(groups = "unit") + public void should_detect_reserved_keywords_in_mixed_case() { + assertThat(Metadata.isReservedCqlKeyword("ColumnFamily")).isTrue(); + assertThat(Metadata.isReservedCqlKeyword("Test_ColumnFamily")).isFalse(); + } } From 83bfcad9bd3a1390ab91b4afa70402b687915307 Mon Sep 17 00:00:00 2001 From: Dmitry Konstantinov Date: Mon, 30 Oct 2017 17:50:15 +0300 Subject: [PATCH 163/512] JAVA-1659: Expose low-level flusher tuning options Introduce new tuning options: - com.datastax.driver.FLUSHER_SCHEDULE_PERIOD_NS - com.datastax.driver.FLUSHER_RUN_WITHOUT_WORK_TIMES Old behavior is kept as default. See also CASSANDRA-13651 for observations about the similar component on the server side. --- changelog/README.md | 1 + .../main/java/com/datastax/driver/core/Connection.java | 10 ++++++++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 2da291725cf..5c23244889f 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -6,6 +6,7 @@ - [improvement] JAVA-1196: Include hash of result set metadata in prepared statement id. - [improvement] JAVA-1670: Support user-provided JMX ports for CCMBridge. - [improvement] JAVA-1661: Avoid String.toLowerCase if possible in Metadata. +- [improvement] JAVA-1659: Expose low-level flusher tuning options. ### 3.3.1 diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index 73cff42a968..c46832854ec 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -66,6 +66,8 @@ class Connection { private static final byte[] EMPTY_BYTE_ARRAY = new byte[0]; private static final boolean DISABLE_COALESCING = SystemProperties.getBoolean("com.datastax.driver.DISABLE_COALESCING", false); + private static final int FLUSHER_SCHEDULE_PERIOD_NS = SystemProperties.getInt("com.datastax.driver.FLUSHER_SCHEDULE_PERIOD_NS", 10000); + private static final int FLUSHER_RUN_WITHOUT_WORK_TIMES = SystemProperties.getInt("com.datastax.driver.FLUSHER_RUN_WITHOUT_WORK_TIMES", 5); enum State {OPEN, TRASHED, RESURRECTING, GONE} @@ -953,7 +955,7 @@ public void run() { runsWithNoWork = 0; } else { // either reschedule or cancel - if (++runsWithNoWork > 5) { + if (++runsWithNoWork > FLUSHER_RUN_WITHOUT_WORK_TIMES) { running.set(false); if (queued.isEmpty() || !running.compareAndSet(false, true)) return; @@ -962,7 +964,11 @@ public void run() { EventLoop eventLoop = eventLoopRef.get(); if (eventLoop != null && !eventLoop.isShuttingDown()) { - eventLoop.schedule(this, 10000, TimeUnit.NANOSECONDS); + if (FLUSHER_SCHEDULE_PERIOD_NS > 0) { + eventLoop.schedule(this, FLUSHER_SCHEDULE_PERIOD_NS, TimeUnit.NANOSECONDS); + } else { + eventLoop.execute(this); + } } } } From f5d0e7e79854c04c4ed67cbd479fc544fc53eea6 Mon Sep 17 00:00:00 2001 From: Dmitry Konstantinov Date: Mon, 30 Oct 2017 18:31:37 +0300 Subject: [PATCH 164/512] JAVA-1660: Support netty-transport-native-epoll in OSGi container --- changelog/README.md | 1 + driver-core/pom.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/README.md b/changelog/README.md index 5c23244889f..044e967b577 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -7,6 +7,7 @@ - [improvement] JAVA-1670: Support user-provided JMX ports for CCMBridge. - [improvement] JAVA-1661: Avoid String.toLowerCase if possible in Metadata. - [improvement] JAVA-1659: Expose low-level flusher tuning options. +- [improvement] JAVA-1660: Support netty-transport-native-epoll in OSGi container. ### 3.3.1 diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 2d0034acebb..3434673f955 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -228,7 +228,7 @@ ${project.build.outputDirectory}/META-INF - + From ea1f57fffde5bcb4e9579005984ee499ff889c03 Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 20 Nov 2017 09:10:50 -0800 Subject: [PATCH 165/512] Fix failing test --- .../com/datastax/driver/core/ExportAsStringTest.java | 12 ++++++++---- pom.xml | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java b/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java index 2576f18b8fa..10ea7473331 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/ExportAsStringTest.java @@ -20,14 +20,15 @@ import com.google.common.collect.ImmutableMap; import com.google.common.io.ByteStreams; import com.google.common.io.Closer; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.testng.annotations.Test; + import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.PrintStream; import java.util.Map; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.testng.annotations.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; @@ -51,7 +52,7 @@ public class ExportAsStringTest extends CCMTestsSupport { * is failed. */ @Test(groups = "short") - public void create_schema_and_ensure_exported_cql_is_as_expected() { + public void should_create_schema_and_ensure_exported_cql_is_as_expected() { String keyspace = "complex_ks"; Map replicationOptions = ImmutableMap.of("class", "SimpleStrategy", "replication_factor", 1); @@ -204,6 +205,9 @@ private String getExpectedCqlString() { Closer closer = Closer.create(); try { InputStream is = ExportAsStringTest.class.getResourceAsStream(resourceName); + assertThat(is) + .as("No reference script for this version (was looking for src/test/resources" + resourceName + ")") + .isNotNull(); closer.register(is); ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos); diff --git a/pom.xml b/pom.xml index 57a9eb8811a..7d665b4c15c 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ UTF-8 UTF-8 - 3.10 + 3.11.1 1.6 1.2.17 1.7.25 From 6fcbc316be90aefffb8f59bd8aa689747fff66ce Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 20 Nov 2017 10:32:48 -0800 Subject: [PATCH 166/512] [maven-release-plugin] prepare release 3.3.2 --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 3434673f955..1b247045e40 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index e50c6ff6400..5d0456c80e7 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 780f512bd14..2694b4791ee 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 3f2607f21ee..64c4947830d 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 68ce7bd2b99..9f5255b43ef 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index bb066034f77..fb2dd6e2128 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 6a83dbac0bb..71ad04e05b4 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 14df05792c5..85efa65108a 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2-SNAPSHOT + 3.3.2 pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index 277ef8a6f55..dd0cdc33826 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index c2e2e95a1f8..4b3daa5f88e 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 26c16dc2f5b..7ce9889d5ec 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index 7d665b4c15c..fce6ac14863 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 pom DataStax Java Driver for Apache Cassandra @@ -1076,7 +1076,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - HEAD + 3.3.2 From 160d2a0d841c197ef353d5bc74ea6d737052518f Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 20 Nov 2017 10:32:58 -0800 Subject: [PATCH 167/512] [maven-release-plugin] prepare for next development iteration --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 1b247045e40..3c48ee204af 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 5d0456c80e7..2fd4eef3fba 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 2694b4791ee..b2b9e1fa617 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 64c4947830d..ce0b3fdeadb 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 9f5255b43ef..c8616e7448a 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index fb2dd6e2128..15ef3884c59 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 71ad04e05b4..0741b144651 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 85efa65108a..46b9f0fd971 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2 + 3.3.3-SNAPSHOT pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index dd0cdc33826..86f7de1392c 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index 4b3daa5f88e..efc5fd08d7d 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 7ce9889d5ec..ccc4c0b2589 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index fce6ac14863..1a3e60b4eee 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT pom DataStax Java Driver for Apache Cassandra @@ -1076,7 +1076,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - 3.3.2 + HEAD From 1a0066f6e765e98faebf397955d2f168abda6938 Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 20 Nov 2017 10:37:48 -0800 Subject: [PATCH 168/512] Revert release attempt --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 2 +- 12 files changed, 12 insertions(+), 12 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 3c48ee204af..3434673f955 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 2fd4eef3fba..e50c6ff6400 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index b2b9e1fa617..780f512bd14 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index ce0b3fdeadb..3f2607f21ee 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index c8616e7448a..68ce7bd2b99 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 15ef3884c59..bb066034f77 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 0741b144651..6a83dbac0bb 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 46b9f0fd971..14df05792c5 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index 86f7de1392c..277ef8a6f55 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index efc5fd08d7d..c2e2e95a1f8 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index ccc4c0b2589..26c16dc2f5b 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index 1a3e60b4eee..7d665b4c15c 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.3-SNAPSHOT + 3.3.2-SNAPSHOT pom DataStax Java Driver for Apache Cassandra From ae618a5f90c3e4af9d7e3da46dadff0e14ef85c4 Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 20 Nov 2017 10:43:19 -0800 Subject: [PATCH 169/512] Update version in docs --- README.md | 14 +++++++------- changelog/README.md | 2 +- faq/README.md | 2 +- manual/compression/README.md | 2 +- manual/custom_codecs/extras/README.md | 2 +- manual/object_mapper/README.md | 2 +- manual/shaded_jar/README.md | 6 +++--- pom.xml | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index db302c4e2f6..dc743ec43b1 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ not yet have been released. You can find the documentation for latest version through [Java driver docs](http://datastax.github.io/java-driver/) or via the release tags, [e.g. -3.3.1](https://github.com/datastax/java-driver/tree/3.3.1).* +3.3.2](https://github.com/datastax/java-driver/tree/3.3.2).* A modern, [feature-rich](manual/) and highly tunable Java client library for Apache Cassandra (1.2+) and DataStax Enterprise (3.1+) using @@ -55,7 +55,7 @@ The driver contains the following modules: start material and technical details about the driver and its features. - API: http://www.datastax.com/drivers/java/3.2 - [changelog](changelog/) -- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.1.tar.gz) +- [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.2.tar.gz) **Feeback requested:** help us focus our efforts, provide your input on the [Platform and Runtime Survey](http://goo.gl/forms/qwUE6qnL7U) (we kept it short). @@ -68,7 +68,7 @@ it in your application using the following Maven dependency: com.datastax.cassandra cassandra-driver-core - 3.3.1 + 3.3.2 ``` @@ -78,7 +78,7 @@ Note that the object mapper is published as a separate artifact: com.datastax.cassandra cassandra-driver-mapping - 3.3.1 + 3.3.2 ``` @@ -88,7 +88,7 @@ The 'extras' module is also published as a separate artifact: com.datastax.cassandra cassandra-driver-extras - 3.3.1 + 3.3.2 ``` @@ -97,12 +97,12 @@ We also provide a [shaded JAR](manual/shaded_jar/) to avoid the explicit dependency to Netty. If you can't use a dependency management tool, a -[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.1.tar.gz) +[binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.2.tar.gz) is available for download. ## Compatibility -The Java client driver 3.3.1 ([branch 3.x](https://github.com/datastax/java-driver/tree/3.x)) is compatible with Apache +The Java client driver 3.3.2 ([branch 3.x](https://github.com/datastax/java-driver/tree/3.x)) is compatible with Apache Cassandra 1.2, 2.0, 2.1, 2.2 and 3.0 (see [this page](http://datastax.github.io/java-driver/manual/native_protocol) for the most up-to-date compatibility information). diff --git a/changelog/README.md b/changelog/README.md index 044e967b577..a97d6d08b25 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,6 +1,6 @@ ## Changelog -### 3.3.2 (in progress) +### 3.3.2 - [bug] JAVA-1666: Fix keyspace export when a UDT has case-sensitive field names. - [improvement] JAVA-1196: Include hash of result set metadata in prepared statement id. diff --git a/faq/README.md b/faq/README.md index d902570f6bf..b9adb5c79eb 100644 --- a/faq/README.md +++ b/faq/README.md @@ -258,7 +258,7 @@ If properly used, the following log message will be logged at INFO on startup: > Found Netty's native epoll transport in the classpath, but NIO was forced through the FORCE_NIO system property. -[Blobs.java]: https://github.com/datastax/java-driver/tree/3.3.1/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java +[Blobs.java]: https://github.com/datastax/java-driver/tree/3.3.2/driver-examples/src/main/java/com/datastax/driver/examples/datatypes/Blobs.java [CASSANDRA-7304]: https://issues.apache.org/jira/browse/CASSANDRA-7304 [Parameters and Binding]: ../manual/statements/prepared/#parameters-and-binding [Mapper options]: ../manual/object_mapper/using/#mapper-options diff --git a/manual/compression/README.md b/manual/compression/README.md index 7bbb89aedbe..541777b209a 100644 --- a/manual/compression/README.md +++ b/manual/compression/README.md @@ -85,4 +85,4 @@ cluster = Cluster.builder() .build(); ``` -[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.3.1/cassandra-driver-parent-3.3.1.pom +[pom]: https://repo1.maven.org/maven2/com/datastax/cassandra/cassandra-driver-parent/3.3.2/cassandra-driver-parent-3.3.2.pom diff --git a/manual/custom_codecs/extras/README.md b/manual/custom_codecs/extras/README.md index 9a30f888380..09cd8f85dbd 100644 --- a/manual/custom_codecs/extras/README.md +++ b/manual/custom_codecs/extras/README.md @@ -10,7 +10,7 @@ The module is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-extras - 3.3.1 + 3.3.2 ``` diff --git a/manual/object_mapper/README.md b/manual/object_mapper/README.md index cc8f6901de7..f4a9f92744c 100644 --- a/manual/object_mapper/README.md +++ b/manual/object_mapper/README.md @@ -11,7 +11,7 @@ The mapper is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-mapping - 3.3.1 + 3.3.2 ``` diff --git a/manual/shaded_jar/README.md b/manual/shaded_jar/README.md index 7a49f2bcb85..1973ab7e7a0 100644 --- a/manual/shaded_jar/README.md +++ b/manual/shaded_jar/README.md @@ -12,7 +12,7 @@ package name: com.datastax.cassandra cassandra-driver-core - 3.3.1 + 3.3.2 shaded @@ -32,7 +32,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-core - 3.3.1 + 3.3.2 shaded @@ -44,7 +44,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-mapping - 3.3.1 + 3.3.2 com.datastax.cassandra diff --git a/pom.xml b/pom.xml index 7d665b4c15c..2b4ed25f412 100644 --- a/pom.xml +++ b/pom.xml @@ -631,7 +631,7 @@ - 3.3.0 + 3.3.1 ../clirr-ignores.xml com/datastax/shaded/** From 7548daedcd5795062f8cd09ea9c059acb7b5ef66 Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 20 Nov 2017 10:44:55 -0800 Subject: [PATCH 170/512] [maven-release-plugin] prepare release 3.3.2 --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 3434673f955..1b247045e40 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index e50c6ff6400..5d0456c80e7 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 780f512bd14..2694b4791ee 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 3f2607f21ee..64c4947830d 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 68ce7bd2b99..9f5255b43ef 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index bb066034f77..fb2dd6e2128 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 6a83dbac0bb..71ad04e05b4 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 14df05792c5..85efa65108a 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2-SNAPSHOT + 3.3.2 pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index 277ef8a6f55..dd0cdc33826 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index c2e2e95a1f8..4b3daa5f88e 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 26c16dc2f5b..7ce9889d5ec 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2-SNAPSHOT + 3.3.2 cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index 2b4ed25f412..da648356ec5 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2-SNAPSHOT + 3.3.2 pom DataStax Java Driver for Apache Cassandra @@ -1076,7 +1076,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - HEAD + 3.3.2 From c723d5ecd7f0b0faedd180f5dc3fd492353bbfb9 Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 20 Nov 2017 10:45:05 -0800 Subject: [PATCH 171/512] [maven-release-plugin] prepare for next development iteration --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 1b247045e40..3c48ee204af 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index 5d0456c80e7..2fd4eef3fba 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 2694b4791ee..b2b9e1fa617 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 64c4947830d..ce0b3fdeadb 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 9f5255b43ef..c8616e7448a 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index fb2dd6e2128..15ef3884c59 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 71ad04e05b4..0741b144651 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 85efa65108a..46b9f0fd971 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2 + 3.3.3-SNAPSHOT pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index dd0cdc33826..86f7de1392c 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index 4b3daa5f88e..efc5fd08d7d 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index 7ce9889d5ec..ccc4c0b2589 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.3.2 + 3.3.3-SNAPSHOT cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index da648356ec5..585a105ec63 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.3.2 + 3.3.3-SNAPSHOT pom DataStax Java Driver for Apache Cassandra @@ -1076,7 +1076,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - 3.3.2 + HEAD From f21fa6f3a08fa0b4dbe6a42a03d322ce1d194573 Mon Sep 17 00:00:00 2001 From: marcogalluzzi Date: Tue, 28 Nov 2017 15:03:25 +0000 Subject: [PATCH 172/512] Update Manual and API links version Both Manual and API links point at version 3.2. I've changed to the correct 3.3 version. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 25b0d4754d7..f580628fdf8 100644 --- a/README.md +++ b/README.md @@ -51,9 +51,9 @@ The driver contains the following modules: driver releases and important announcements (low frequency). [@DataStaxEng](https://twitter.com/datastaxeng) has more news including other drivers, Cassandra, and DSE. -- DOCS: the [manual](http://docs.datastax.com/en/developer/java-driver/3.2/manual/) has quick +- DOCS: the [manual](http://docs.datastax.com/en/developer/java-driver/3.3/manual/) has quick start material and technical details about the driver and its features. -- API: http://www.datastax.com/drivers/java/3.2 +- API: http://www.datastax.com/drivers/java/3.3 - [changelog](changelog/) - [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.0.tar.gz) From 2dcdbf106643a9d2ca41a7c134f4f9dc93b605b3 Mon Sep 17 00:00:00 2001 From: marcogalluzzi Date: Tue, 28 Nov 2017 15:03:25 +0000 Subject: [PATCH 173/512] Update Manual and API links version Both Manual and API links point at version 3.2. I've changed to the correct 3.3 version. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dc743ec43b1..69ad033b41d 100644 --- a/README.md +++ b/README.md @@ -51,9 +51,9 @@ The driver contains the following modules: driver releases and important announcements (low frequency). [@DataStaxEng](https://twitter.com/datastaxeng) has more news including other drivers, Cassandra, and DSE. -- DOCS: the [manual](http://docs.datastax.com/en/developer/java-driver/3.2/manual/) has quick +- DOCS: the [manual](http://docs.datastax.com/en/developer/java-driver/3.3/manual/) has quick start material and technical details about the driver and its features. -- API: http://www.datastax.com/drivers/java/3.2 +- API: http://www.datastax.com/drivers/java/3.3 - [changelog](changelog/) - [binary tarball](http://downloads.datastax.com/java-driver/cassandra-java-driver-3.3.2.tar.gz) From 46e6b11a96829330bcd5a0cd80287f687f2c7ea0 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 8 Dec 2017 16:30:52 -0600 Subject: [PATCH 174/512] JAVA-1671: Remove unnecessary test on prepared statement metadata As CASSANDRA-13992 is fixed this test is no longer needed. --- changelog/README.md | 2 ++ .../datastax/driver/core/ArrayBackedResultSet.java | 11 +---------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 9ec1129ed00..3fd53ac6cfe 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -2,6 +2,8 @@ ### 3.4.0 (In progress) +- [improvement] JAVA-1671: Remove unnecessary test on prepared statement metadata. + Merged from 3.3.x: - [bug] JAVA-1555: Include VIEW and CDC in WriteType. diff --git a/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java b/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java index 81e348afb4c..f14ad91256b 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ArrayBackedResultSet.java @@ -83,16 +83,7 @@ static ArrayBackedResultSet fromMessage(Responses.Result msg, SessionManager ses if (newMetadataId != null) { BoundStatement bs = ((BoundStatement) actualStatement); PreparedId preparedId = bs.preparedStatement().getPreparedId(); - // Extra test for CASSANDRA-13992: conditional updates yield a different result set depending on - // whether the update was applied or not, so the prepared statement must never have result - // metadata, and we should always execute with skip_metadata = false. - // However the server sends a new_metadata_id in the response, so make sure we ignore it if the - // prepared statement did not have metadata in the first place. - // TODO remove the "if" (i.e. always assign resultSetMetadata) if CASSANDRA-13992 gets fixed before 4.0.0 GA - if (preparedId.resultSetMetadata.variables != null) { - preparedId.resultSetMetadata = - new PreparedId.PreparedMetadata(newMetadataId, columnDefs); - } + preparedId.resultSetMetadata = new PreparedId.PreparedMetadata(newMetadataId, columnDefs); } } assert columnDefs != null; From 1f57d1feefda4d7a247912a924869469223be2df Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 21 Dec 2017 13:10:31 -0600 Subject: [PATCH 175/512] JAVA-1694: Upgrade to jackson-databind 2.7.9.2 to address CVE-2015-15095 --- changelog/README.md | 1 + pom.xml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/changelog/README.md b/changelog/README.md index 3fd53ac6cfe..4244d99fb68 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -3,6 +3,7 @@ ### 3.4.0 (In progress) - [improvement] JAVA-1671: Remove unnecessary test on prepared statement metadata. +- [bug] JAVA-1694: Upgrade to jackson-databind 2.7.9.2 to address CVE-2015-15095. Merged from 3.3.x: diff --git a/pom.xml b/pom.xml index 3b3379f7369..6aa6e30132b 100644 --- a/pom.xml +++ b/pom.xml @@ -58,7 +58,7 @@ 2.1.9 2.8.8 - 2.7.9.1 + 2.7.9.2 2.9.1 1.0 1.0.4 From abed4c2e03477a2716a1c674aa2aa9bc2ab5bd13 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 2 Jan 2018 09:41:52 -0800 Subject: [PATCH 176/512] JAVA-1685: Clarify recommendation on preparing SELECT * --- changelog/README.md | 1 + manual/statements/prepared/README.md | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 4244d99fb68..71777e11d87 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -4,6 +4,7 @@ - [improvement] JAVA-1671: Remove unnecessary test on prepared statement metadata. - [bug] JAVA-1694: Upgrade to jackson-databind 2.7.9.2 to address CVE-2015-15095. +- [documentation] JAVA-1685: Clarify recommendation on preparing SELECT *. Merged from 3.3.x: diff --git a/manual/statements/prepared/README.md b/manual/statements/prepared/README.md index 2132db700ae..e6d351d07a8 100644 --- a/manual/statements/prepared/README.md +++ b/manual/statements/prepared/README.md @@ -249,10 +249,9 @@ is currently no mechanism for Cassandra to invalidate the existing metadata. Be the driver is not able to properly react to these changes and will improperly read rows after a schema change is made. -Therefore it is currently recommended to not create prepared statements -for 'SELECT *' queries if you plan on making schema changes involving -adding or dropping columns. Alternatively you should list all columns of interest -in your statement, i.e.: `SELECT a, b, c FROM tbl`. +Therefore it is currently recommended to list all columns of interest in +your prepared statements (i.e. `SELECT a, b, c FROM table`), instead of +relying on `SELECT *`. This will be addressed in a future release of both Cassandra and the driver. Follow [CASSANDRA-10786] and [JAVA-1196] for more information. @@ -264,4 +263,4 @@ This will be addressed in a future release of both Cassandra and the driver. Fo [execute]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- [executeAsync]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- [CASSANDRA-10786]: https://issues.apache.org/jira/browse/CASSANDRA-10786 -[JAVA-1196]: https://datastax-oss.atlassian.net/browse/JAVA-1196 \ No newline at end of file +[JAVA-1196]: https://datastax-oss.atlassian.net/browse/JAVA-1196 From 2fef368c578f4d4a365486883b3db6cda50ff4df Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 2 Jan 2018 10:01:29 -0800 Subject: [PATCH 177/512] JAVA-1679: Improve error message on batch log write timeout --- changelog/README.md | 1 + .../driver/core/exceptions/WriteTimeoutException.java | 4 +++- .../driver/core/exceptions/ExceptionsScassandraTest.java | 2 +- .../com/datastax/driver/core/exceptions/ExceptionsTest.java | 4 ++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 71777e11d87..b312f54918d 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -5,6 +5,7 @@ - [improvement] JAVA-1671: Remove unnecessary test on prepared statement metadata. - [bug] JAVA-1694: Upgrade to jackson-databind 2.7.9.2 to address CVE-2015-15095. - [documentation] JAVA-1685: Clarify recommendation on preparing SELECT *. +- [improvement] JAVA-1679: Improve error message on batch log write timeout. Merged from 3.3.x: diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteTimeoutException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteTimeoutException.java index df0c80916cc..21b5779ec64 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteTimeoutException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/WriteTimeoutException.java @@ -40,7 +40,9 @@ public WriteTimeoutException(ConsistencyLevel consistency, WriteType writeType, public WriteTimeoutException(InetSocketAddress address, ConsistencyLevel consistency, WriteType writeType, int received, int required) { super( address, - String.format("Cassandra timeout during write query at consistency %s (%d replica were required but only %d acknowledged the write)", consistency, required, received), + String.format("Cassandra timeout during %s write query at consistency %s " + + "(%d replica were required but only %d acknowledged the write)", + writeType, consistency, required, received), consistency, received, required); diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java index daa3347f234..3e37ee9afd7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsScassandraTest.java @@ -103,7 +103,7 @@ public void should_throw_proper_write_timeout_exception() { query(); fail("expected a WriteTimeoutException"); } catch (WriteTimeoutException e) { - assertThat(e.getMessage()).isEqualTo("Cassandra timeout during write query at consistency LOCAL_ONE (1 replica were required but only 0 acknowledged the write)"); + assertThat(e.getMessage()).isEqualTo("Cassandra timeout during SIMPLE write query at consistency LOCAL_ONE (1 replica were required but only 0 acknowledged the write)"); assertThat(e.getConsistencyLevel()).isEqualTo(LOCAL_ONE); assertThat(e.getReceivedAcknowledgements()).isEqualTo(0); assertThat(e.getRequiredAcknowledgements()).isEqualTo(1); diff --git a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsTest.java b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsTest.java index d5b18085e5a..d3116804246 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/exceptions/ExceptionsTest.java @@ -304,7 +304,7 @@ public void should_create_proper_read_timeout_exception() { @Test(groups = "unit") public void should_create_proper_write_timeout_exception() { WriteTimeoutException e = new WriteTimeoutException(address1, LOCAL_QUORUM, WriteType.BATCH, 2, 3); - assertThat(e.getMessage()).isEqualTo("Cassandra timeout during write query at consistency LOCAL_QUORUM (3 replica were required but only 2 acknowledged the write)"); + assertThat(e.getMessage()).isEqualTo("Cassandra timeout during BATCH write query at consistency LOCAL_QUORUM (3 replica were required but only 2 acknowledged the write)"); assertThat(e.getConsistencyLevel()).isEqualTo(LOCAL_QUORUM); assertThat(e.getReceivedAcknowledgements()).isEqualTo(2); assertThat(e.getRequiredAcknowledgements()).isEqualTo(3); @@ -312,7 +312,7 @@ public void should_create_proper_write_timeout_exception() { assertThat(e.getAddress()).isEqualTo(address1); assertThat(e.getHost()).isEqualTo(address1.getAddress()); e = e.copy(address2); - assertThat(e.getMessage()).isEqualTo("Cassandra timeout during write query at consistency LOCAL_QUORUM (3 replica were required but only 2 acknowledged the write)"); + assertThat(e.getMessage()).isEqualTo("Cassandra timeout during BATCH write query at consistency LOCAL_QUORUM (3 replica were required but only 2 acknowledged the write)"); assertThat(e.getConsistencyLevel()).isEqualTo(LOCAL_QUORUM); assertThat(e.getReceivedAcknowledgements()).isEqualTo(2); assertThat(e.getRequiredAcknowledgements()).isEqualTo(3); From 993838ca5681f82e83b8d230a80c9038cd6f3a30 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 2 Jan 2018 11:06:07 -0800 Subject: [PATCH 178/512] JAVA-1672: Remove schema agreement check when repreparing on up --- changelog/README.md | 1 + .../src/main/java/com/datastax/driver/core/Cluster.java | 6 ------ 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index b312f54918d..7ee216070ac 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -6,6 +6,7 @@ - [bug] JAVA-1694: Upgrade to jackson-databind 2.7.9.2 to address CVE-2015-15095. - [documentation] JAVA-1685: Clarify recommendation on preparing SELECT *. - [improvement] JAVA-1679: Improve error message on batch log write timeout. +- [improvement] JAVA-1672: Remove schema agreement check when repreparing on up. Merged from 3.3.x: diff --git a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java index 145100f0ccb..5e514a86c5c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java @@ -2249,12 +2249,6 @@ private Connection prepareAllQueries(Host host, Connection reusedConnection) thr ? connectionFactory.open(host) : reusedConnection; - try { - ControlConnection.waitForSchemaAgreement(connection, this); - } catch (ExecutionException e) { - // As below, just move on - } - // Furthermore, along with each prepared query we keep the current keyspace at the time of preparation // as we need to make it is the same when we re-prepare on new/restarted nodes. Most query will use the // same keyspace so keeping it each time is slightly wasteful, but this doesn't really matter and is From d437684370001f3a6c8c9e420de8baffa3a20433 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 2 Jan 2018 10:47:19 -0800 Subject: [PATCH 179/512] JAVA-1677: Warn if auth is configured on the client but not the server --- changelog/README.md | 1 + .../com/datastax/driver/core/Connection.java | 6 +++ .../driver/core/NoAuthenticationTest.java | 46 +++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 driver-core/src/test/java/com/datastax/driver/core/NoAuthenticationTest.java diff --git a/changelog/README.md b/changelog/README.md index 7ee216070ac..bc58e4c16c9 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -7,6 +7,7 @@ - [documentation] JAVA-1685: Clarify recommendation on preparing SELECT *. - [improvement] JAVA-1679: Improve error message on batch log write timeout. - [improvement] JAVA-1672: Remove schema agreement check when repreparing on up. +- [improvement] JAVA-1677: Warn if auth is configured on the client but not the server. Merged from 3.3.x: diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index c46832854ec..d33a1093319 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -246,6 +246,12 @@ private AsyncFunction onStartupResponse(final ProtocolVe public ListenableFuture apply(Message.Response response) throws Exception { switch (response.type) { case READY: + if (factory.authProvider != AuthProvider.NONE) { + logger.warn("{} did not send an authentication challenge; " + + "This is suspicious because the driver expects authentication " + + "(configured auth provider = {})", + address, factory.authProvider.getClass().getName()); + } return checkClusterName(protocolVersion, initExecutor); case ERROR: Responses.Error error = (Responses.Error) response; diff --git a/driver-core/src/test/java/com/datastax/driver/core/NoAuthenticationTest.java b/driver-core/src/test/java/com/datastax/driver/core/NoAuthenticationTest.java new file mode 100644 index 00000000000..973ba8e13af --- /dev/null +++ b/driver-core/src/test/java/com/datastax/driver/core/NoAuthenticationTest.java @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +import org.apache.log4j.Level; +import org.testng.annotations.Test; + +import static org.assertj.core.api.Assertions.assertThat; + +@CCMConfig(createCluster = false) +public class NoAuthenticationTest extends CCMTestsSupport { + + @Test(groups = "short") + public void should_warn_if_auth_configured_but_server_does_not_send_challenge() { + Cluster cluster = register(Cluster.builder() + .addContactPoints(getContactPoints()) + .withPort(ccm().getBinaryPort()) + .withCredentials("bogus", "bogus") + .build()); + Level previous = TestUtils.setLogLevel(Connection.class, Level.WARN); + MemoryAppender logs = new MemoryAppender().enableFor(Connection.class); + try { + cluster.init(); + } finally { + TestUtils.setLogLevel(Connection.class, previous); + logs.disableFor(Connection.class); + } + assertThat(logs.get()) + .contains("did not send an authentication challenge; " + + "This is suspicious because the driver expects authentication " + + "(configured auth provider = com.datastax.driver.core.PlainTextAuthProvider)"); + } +} From b4e444ec7a489f46e62ca02692fa062c65101bf4 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Fri, 8 Dec 2017 15:16:59 -0600 Subject: [PATCH 180/512] JAVA-1651: Add NO_COMPACT startup option --- changelog/README.md | 1 + .../com/datastax/driver/core/Cluster.java | 21 +++++++++++++- .../com/datastax/driver/core/Connection.java | 4 +-- .../datastax/driver/core/ProtocolOptions.java | 29 ++++++++++++++++++- .../com/datastax/driver/core/Requests.java | 9 ++++-- 5 files changed, 58 insertions(+), 6 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index bc58e4c16c9..3e55b6701c0 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -8,6 +8,7 @@ - [improvement] JAVA-1679: Improve error message on batch log write timeout. - [improvement] JAVA-1672: Remove schema agreement check when repreparing on up. - [improvement] JAVA-1677: Warn if auth is configured on the client but not the server. +- [new feature] JAVA-1651: Add NO_COMPACT startup option. Merged from 3.3.x: diff --git a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java index 5e514a86c5c..726314e9fa7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Cluster.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Cluster.java @@ -687,6 +687,7 @@ public static class Builder implements Initializer { private boolean metricsEnabled = true; private boolean jmxEnabled = true; private boolean allowBetaProtocolVersion = false; + private boolean noCompact = false; private Collection listeners; @@ -1295,6 +1296,24 @@ public Builder withNettyOptions(NettyOptions nettyOptions) { return this; } + /** + * Enables the NO_COMPACT startup option. + *

    + * When this option is supplied, SELECT, UPDATE, DELETE and + * BATCH statements on COMPACT STORAGE tables function in "compatibility" mode which + * allows seeing these tables as if they were "regular" CQL tables. + *

    + * This option only effects interactions with tables using COMPACT STORAGE and is only supported by + * C* 4.0+ and DSE 6.0+. + * + * @return this builder. + * @see CASSANDRA-10857 + */ + public Builder withNoCompact() { + this.noCompact = true; + return this; + } + /** * The configuration that will be used for the new cluster. *

    @@ -1306,7 +1325,7 @@ public Builder withNettyOptions(NettyOptions nettyOptions) { */ @Override public Configuration getConfiguration() { - ProtocolOptions protocolOptions = new ProtocolOptions(port, protocolVersion, maxSchemaAgreementWaitSeconds, sslOptions, authProvider) + ProtocolOptions protocolOptions = new ProtocolOptions(port, protocolVersion, maxSchemaAgreementWaitSeconds, sslOptions, authProvider, noCompact) .setCompression(compression); MetricsOptions metricsOptions = new MetricsOptions(metricsEnabled, jmxEnabled); diff --git a/driver-core/src/main/java/com/datastax/driver/core/Connection.java b/driver-core/src/main/java/com/datastax/driver/core/Connection.java index d33a1093319..9dd3e8d16ae 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Connection.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Connection.java @@ -232,8 +232,8 @@ private AsyncFunction onChannelReady(final ProtocolVersion protocolV return new AsyncFunction() { @Override public ListenableFuture apply(Void input) throws Exception { - ProtocolOptions.Compression compression = factory.configuration.getProtocolOptions().getCompression(); - Future startupResponseFuture = write(new Requests.Startup(compression)); + ProtocolOptions protocolOptions = factory.configuration.getProtocolOptions(); + Future startupResponseFuture = write(new Requests.Startup(protocolOptions.getCompression(), protocolOptions.isNoCompact())); return GuavaCompatibility.INSTANCE.transformAsync(startupResponseFuture, onStartupResponse(protocolVersion, initExecutor), initExecutor); } diff --git a/driver-core/src/main/java/com/datastax/driver/core/ProtocolOptions.java b/driver-core/src/main/java/com/datastax/driver/core/ProtocolOptions.java index 77848c0fc99..ae2841b8df7 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/ProtocolOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/ProtocolOptions.java @@ -99,6 +99,8 @@ public String toString() { private final SSLOptions sslOptions; // null if no SSL private final AuthProvider authProvider; + private final boolean noCompact; + private volatile Compression compression = Compression.NONE; /** @@ -118,7 +120,7 @@ public ProtocolOptions() { * @param port the port to use for the binary protocol. */ public ProtocolOptions(int port) { - this(port, null, DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS, null, AuthProvider.NONE); + this(port, null, DEFAULT_MAX_SCHEMA_AGREEMENT_WAIT_SECONDS, null, AuthProvider.NONE, false); } /** @@ -135,11 +137,30 @@ public ProtocolOptions(int port) { * the Cassandra nodes. */ public ProtocolOptions(int port, ProtocolVersion protocolVersion, int maxSchemaAgreementWaitSeconds, SSLOptions sslOptions, AuthProvider authProvider) { + this(port, protocolVersion, maxSchemaAgreementWaitSeconds, sslOptions, authProvider, false); + } + + /** + * Creates a new {@code ProtocolOptions} instance using the provided port + * and SSL context. + * + * @param port the port to use for the binary protocol. + * @param protocolVersion the protocol version to use. This can be {@code null}, in which case the + * version used will be the biggest version supported by the first node the driver connects to. + * See {@link Cluster.Builder#withProtocolVersion} for more details. + * @param sslOptions the SSL options to use. Use {@code null} if SSL is not + * to be used. + * @param authProvider the {@code AuthProvider} to use for authentication against + * the Cassandra nodes. + * @param noCompact whether or not to include the NO_COMPACT startup option. + */ + public ProtocolOptions(int port, ProtocolVersion protocolVersion, int maxSchemaAgreementWaitSeconds, SSLOptions sslOptions, AuthProvider authProvider, boolean noCompact) { this.port = port; this.initialProtocolVersion = protocolVersion; this.maxSchemaAgreementWaitSeconds = maxSchemaAgreementWaitSeconds; this.sslOptions = sslOptions; this.authProvider = authProvider; + this.noCompact = noCompact; } void register(Cluster.Manager manager) { @@ -231,4 +252,10 @@ public AuthProvider getAuthProvider() { return authProvider; } + /** + * @return Whether or not to include the NO_COMPACT startup option. + */ + public boolean isNoCompact() { + return noCompact; + } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/Requests.java b/driver-core/src/main/java/com/datastax/driver/core/Requests.java index 3af73f4d9b8..163261761a3 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Requests.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Requests.java @@ -35,6 +35,7 @@ static class Startup extends Message.Request { private static final String CQL_VERSION = "3.0.0"; static final String COMPRESSION_OPTION = "COMPRESSION"; + static final String NO_COMPACT_OPTION = "NO_COMPACT"; static final Message.Coder coder = new Message.Coder() { @Override @@ -50,21 +51,25 @@ public int encodedSize(Startup msg, ProtocolVersion version) { private final Map options; private final ProtocolOptions.Compression compression; + private final boolean noCompact; - Startup(ProtocolOptions.Compression compression) { + Startup(ProtocolOptions.Compression compression, boolean noCompact) { super(Message.Request.Type.STARTUP); this.compression = compression; + this.noCompact = noCompact; ImmutableMap.Builder map = new ImmutableMap.Builder(); map.put(CQL_VERSION_OPTION, CQL_VERSION); if (compression != ProtocolOptions.Compression.NONE) map.put(COMPRESSION_OPTION, compression.toString()); + if (noCompact) + map.put(NO_COMPACT_OPTION, "true"); this.options = map.build(); } @Override protected Request copyInternal() { - return new Startup(compression); + return new Startup(compression, noCompact); } @Override From 922d614dfd54599698a291620aca6409b870e665 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Thu, 4 Jan 2018 11:01:32 -0500 Subject: [PATCH 181/512] Add note to README about JDK 6 support --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index f580628fdf8..a72e8c3e3c1 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,8 @@ Other features are available only when using Apache Cassandra 2.0 or higher (e.g Trying to use these with a cluster running Cassandra 1.2 will result in an [UnsupportedFeatureException](https://github.com/datastax/java-driver/blob/3.x/driver-core/src/main/java/com/datastax/driver/core/exceptions/UnsupportedFeatureException.java) being thrown. +The java driver supports Java JDK versions 6 and above. + __Note__: DataStax products do not support big-endian systems. ## Upgrading from previous versions From 93172fb236e3a91bb81183d9efd9e7e57020466c Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 2 Jan 2018 14:14:59 -0800 Subject: [PATCH 182/512] JAVA-1683: Add metrics to track writes to nodes --- changelog/README.md | 1 + .../com/datastax/driver/core/MetricsUtil.java | 33 +++++++++++++++++++ .../datastax/driver/core/RequestHandler.java | 18 +++++++++- 3 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 driver-core/src/main/java/com/datastax/driver/core/MetricsUtil.java diff --git a/changelog/README.md b/changelog/README.md index 3e55b6701c0..6e13aae2618 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -9,6 +9,7 @@ - [improvement] JAVA-1672: Remove schema agreement check when repreparing on up. - [improvement] JAVA-1677: Warn if auth is configured on the client but not the server. - [new feature] JAVA-1651: Add NO_COMPACT startup option. +- [improvement] JAVA-1683: Add metrics to track writes to nodes. Merged from 3.3.x: diff --git a/driver-core/src/main/java/com/datastax/driver/core/MetricsUtil.java b/driver-core/src/main/java/com/datastax/driver/core/MetricsUtil.java new file mode 100644 index 00000000000..f1a880df8d4 --- /dev/null +++ b/driver-core/src/main/java/com/datastax/driver/core/MetricsUtil.java @@ -0,0 +1,33 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +public class MetricsUtil { + + public static String hostMetricName(String prefix, Host host) { + StringBuilder result = new StringBuilder(prefix); + boolean first = true; + for (byte b : host.getSocketAddress().getAddress().getAddress()) { + if (first) { + first = false; + } else { + result.append('_'); + } + result.append(b & 0xFF); + } + return result.toString(); + } +} diff --git a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java index 49f0869fdf0..97a45f9d3dc 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java @@ -50,6 +50,8 @@ class RequestHandler { private static final Logger logger = LoggerFactory.getLogger(RequestHandler.class); + private static final boolean HOST_METRICS_ENABLED = Boolean.getBoolean("com.datastax.driver.HOST_METRICS_ENABLED"); + final String id; private final SessionManager manager; @@ -234,6 +236,10 @@ private boolean metricsEnabled() { return manager.configuration().getMetricsOptions().isEnabled(); } + private boolean hostMetricsEnabled() { + return HOST_METRICS_ENABLED && metricsEnabled(); + } + private Metrics metrics() { return manager.cluster.manager.metrics; } @@ -290,8 +296,18 @@ void findNextHostAndQuery() { try { Host host; while (!isDone.get() && (host = queryPlan.next()) != null && !queryStateRef.get().isCancelled()) { - if (query(host)) + if (query(host)) { + if (hostMetricsEnabled()) { + metrics().getRegistry() + .counter(MetricsUtil.hostMetricName("writes.", host)) + .inc(); + } return; + } else if (hostMetricsEnabled()) { + metrics().getRegistry() + .counter(MetricsUtil.hostMetricName("write-errors.", host)) + .inc(); + } } if (current != null) { if (triedHosts == null) From 58af03b7474fc25643b7531e6e2c3103fab17f16 Mon Sep 17 00:00:00 2001 From: olim7t Date: Tue, 9 Jan 2018 10:55:28 -0800 Subject: [PATCH 183/512] JAVA-1229: Allow specifying the keyspace for individual queries --- changelog/README.md | 1 + .../driver/mapping/AnnotationParser.java | 92 +++--- .../driver/mapping/MappingManager.java | 112 +++++-- .../mapping/MapperDefaultKeyspaceTest.java | 253 ---------------- .../mapping/MapperInvalidAnnotationsTest.java | 28 +- .../driver/mapping/MapperKeyspaceTest.java | 273 ++++++++++++++++++ .../driver/mapping/MapperUDTTest.java | 4 +- 7 files changed, 425 insertions(+), 338 deletions(-) delete mode 100644 driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java create mode 100644 driver-mapping/src/test/java/com/datastax/driver/mapping/MapperKeyspaceTest.java diff --git a/changelog/README.md b/changelog/README.md index 6e13aae2618..948dae22e02 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -10,6 +10,7 @@ - [improvement] JAVA-1677: Warn if auth is configured on the client but not the server. - [new feature] JAVA-1651: Add NO_COMPACT startup option. - [improvement] JAVA-1683: Add metrics to track writes to nodes. +- [new feature] JAVA-1229: Allow specifying the keyspace for individual queries. Merged from 3.3.x: diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java index d07108209bc..7b8dfac9adc 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/AnnotationParser.java @@ -28,12 +28,6 @@ import java.util.*; import java.util.concurrent.atomic.AtomicInteger; -/** - * Static methods that facilitates parsing: - * - {@link #parseEntity(Class, MappingManager)}: entity classes into {@link EntityMapper} instances - * - {@link #parseUDT(Class, MappingManager)}: UDT classes into {@link MappedUDTCodec} instances. - * - {@link #parseAccessor(Class, MappingManager)}: Accessor interfaces into {@link AccessorMapper} instances. - */ class AnnotationParser { private static final Comparator POSITION_COMPARATOR = new Comparator() { @@ -46,37 +40,43 @@ public int compare(AliasedMappedProperty o1, AliasedMappedProperty o2) { private AnnotationParser() { } - static EntityMapper parseEntity(final Class entityClass, MappingManager mappingManager) { + static EntityMapper parseEntity(final Class entityClass, String keyspaceOverride, MappingManager mappingManager) { Table table = AnnotationChecks.getTypeAnnotation(Table.class, entityClass); - String ksName = table.caseSensitiveKeyspace() ? Metadata.quote(table.keyspace()) : table.keyspace().toLowerCase(); + String keyspaceName; + String loggedKeyspace = mappingManager.getSession().getLoggedKeyspace(); + if (!Strings.isNullOrEmpty(keyspaceOverride)) { + keyspaceName = keyspaceOverride; + } else if (!Strings.isNullOrEmpty(table.keyspace())) { + keyspaceName = (table.caseSensitiveKeyspace()) ? Metadata.quote(table.keyspace()) : table.keyspace(); + } else if (!Strings.isNullOrEmpty(loggedKeyspace)) { + keyspaceName = Metadata.quote(loggedKeyspace); + } else { + throw new IllegalArgumentException(String.format( + "Error creating mapper for %s, you must provide a keyspace name " + + "(either as an argument to the MappingManager.mapper() call, " + + "or via the @Table annotation, or by having a default keyspace on your Session)", + entityClass + )); + } + String tableName = table.caseSensitiveTable() ? Metadata.quote(table.name()) : table.name().toLowerCase(); ConsistencyLevel writeConsistency = table.writeConsistency().isEmpty() ? null : ConsistencyLevel.valueOf(table.writeConsistency().toUpperCase()); ConsistencyLevel readConsistency = table.readConsistency().isEmpty() ? null : ConsistencyLevel.valueOf(table.readConsistency().toUpperCase()); - if (Strings.isNullOrEmpty(table.keyspace())) { - String loggedKeyspace = mappingManager.getSession().getLoggedKeyspace(); - if (Strings.isNullOrEmpty(loggedKeyspace)) - throw new IllegalArgumentException(String.format( - "Error creating mapper for %s, the @Table annotation declares no default keyspace, and the session is not currently logged to any keyspace", - entityClass - )); - ksName = Metadata.quote(loggedKeyspace); - } - - KeyspaceMetadata keyspaceMetadata = mappingManager.getSession().getCluster().getMetadata().getKeyspace(ksName); + KeyspaceMetadata keyspaceMetadata = mappingManager.getSession().getCluster().getMetadata().getKeyspace(keyspaceName); if (keyspaceMetadata == null) - throw new IllegalArgumentException(String.format("Keyspace %s does not exist", ksName)); + throw new IllegalArgumentException(String.format("Keyspace %s does not exist", keyspaceName)); AbstractTableMetadata tableMetadata = keyspaceMetadata.getTable(tableName); if (tableMetadata == null) { tableMetadata = keyspaceMetadata.getMaterializedView(tableName); if (tableMetadata == null) - throw new IllegalArgumentException(String.format("Table or materialized view %s does not exist in keyspace %s", tableName, ksName)); + throw new IllegalArgumentException(String.format("Table or materialized view %s does not exist in keyspace %s", tableName, keyspaceName)); } - EntityMapper mapper = new EntityMapper(entityClass, ksName, tableName, writeConsistency, readConsistency); + EntityMapper mapper = new EntityMapper(entityClass, keyspaceName, tableName, writeConsistency, readConsistency); List pks = new ArrayList(); List ccs = new ArrayList(); @@ -99,7 +99,7 @@ static EntityMapper parseEntity(final Class entityClass, MappingManage if (!mappedProperty.isComputed() && tableMetadata.getColumn(mappedProperty.getMappedName()) == null) throw new IllegalArgumentException(String.format("Column %s does not exist in table %s.%s", - mappedProperty.getMappedName(), ksName, tableName)); + mappedProperty.getMappedName(), keyspaceName, tableName)); if (mappedProperty.isPartitionKey()) pks.add(aliasedMappedProperty); @@ -110,7 +110,7 @@ else if (mappedProperty.isClusteringColumn()) // if the property is of a UDT type, parse it now for (Class udt : TypeMappings.findUDTs(mappedProperty.getPropertyType().getType())) - mappingManager.getUDTCodec(udt); + mappingManager.getUDTCodec(udt, keyspaceName); } Collections.sort(pks, POSITION_COMPARATOR); @@ -123,29 +123,35 @@ else if (mappedProperty.isClusteringColumn()) return mapper; } - static MappedUDTCodec parseUDT(Class udtClass, MappingManager mappingManager) { + static MappedUDTCodec parseUDT(Class udtClass, String keyspaceOverride, MappingManager mappingManager) { UDT udt = AnnotationChecks.getTypeAnnotation(UDT.class, udtClass); - String ksName = udt.caseSensitiveKeyspace() ? Metadata.quote(udt.keyspace()) : udt.keyspace().toLowerCase(); - String udtName = udt.caseSensitiveType() ? Metadata.quote(udt.name()) : udt.name().toLowerCase(); - - if (Strings.isNullOrEmpty(udt.keyspace())) { - String loggedKeyspace = mappingManager.getSession().getLoggedKeyspace(); - if (Strings.isNullOrEmpty(loggedKeyspace)) - throw new IllegalArgumentException(String.format( - "Error creating UDT codec for %s, the @UDT annotation declares no default keyspace, and the session is not currently logged to any keyspace", - udtClass - )); - ksName = Metadata.quote(loggedKeyspace); + String keyspaceName; + String loggedKeyspace = mappingManager.getSession().getLoggedKeyspace(); + if (!Strings.isNullOrEmpty(keyspaceOverride)) { + keyspaceName = keyspaceOverride; + } else if (!Strings.isNullOrEmpty(udt.keyspace())) { + keyspaceName = (udt.caseSensitiveKeyspace()) ? Metadata.quote(udt.keyspace()) : udt.keyspace(); + } else if (!Strings.isNullOrEmpty(loggedKeyspace)) { + keyspaceName = Metadata.quote(loggedKeyspace); + } else { + throw new IllegalArgumentException(String.format( + "Error creating mapper for %s, you must provide a keyspace name " + + "(either as an argument to the MappingManager.mapper() call, " + + "or via the @Table annotation, or by having a default keyspace on your Session)", + udtClass + )); } - KeyspaceMetadata keyspaceMetadata = mappingManager.getSession().getCluster().getMetadata().getKeyspace(ksName); + String udtName = udt.caseSensitiveType() ? Metadata.quote(udt.name()) : udt.name().toLowerCase(); + + KeyspaceMetadata keyspaceMetadata = mappingManager.getSession().getCluster().getMetadata().getKeyspace(keyspaceName); if (keyspaceMetadata == null) - throw new IllegalArgumentException(String.format("Keyspace %s does not exist", ksName)); + throw new IllegalArgumentException(String.format("Keyspace %s does not exist", keyspaceName)); UserType userType = keyspaceMetadata.getUserType(udtName); if (userType == null) - throw new IllegalArgumentException(String.format("User type %s does not exist in keyspace %s", udtName, ksName)); + throw new IllegalArgumentException(String.format("User type %s does not exist in keyspace %s", udtName, keyspaceName)); Map propertyMappers = new HashMap(); @@ -158,10 +164,10 @@ static MappedUDTCodec parseUDT(Class udtClass, MappingManager mappingM if (!userType.contains(mappedProperty.getMappedName())) throw new IllegalArgumentException(String.format("Field %s does not exist in type %s.%s", - mappedProperty.getMappedName(), ksName, userType.getTypeName())); + mappedProperty.getMappedName(), keyspaceName, userType.getTypeName())); for (Class fieldUdt : TypeMappings.findUDTs(mappedProperty.getPropertyType().getType())) - mappingManager.getUDTCodec(fieldUdt); + mappingManager.getUDTCodec(fieldUdt, keyspaceName); propertyMappers.put(mappedProperty.getMappedName(), aliasedMappedProperty); } @@ -237,12 +243,12 @@ private static ParamMapper newParamMapper(String className, String methodName, i if (paramType instanceof Class) { Class paramClass = (Class) paramType; if (TypeMappings.isMappedUDT(paramClass)) - mappingManager.getUDTCodec(paramClass); + mappingManager.getUDTCodec(paramClass, null); return new ParamMapper(paramName, idx, TypeToken.of(paramType), codecClass); } else if (paramType instanceof ParameterizedType) { for (Class udt : TypeMappings.findUDTs(paramType)) - mappingManager.getUDTCodec(udt); + mappingManager.getUDTCodec(udt, null); return new ParamMapper(paramName, idx, TypeToken.of(paramType), codecClass); } else { diff --git a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java index 8514466da8a..0460f13507a 100644 --- a/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java +++ b/driver-mapping/src/main/java/com/datastax/driver/mapping/MappingManager.java @@ -16,6 +16,7 @@ package com.datastax.driver.mapping; import com.datastax.driver.core.*; +import com.datastax.driver.core.utils.MoreObjects; import com.datastax.driver.mapping.annotations.Accessor; import com.datastax.driver.mapping.annotations.Table; import com.datastax.driver.mapping.annotations.UDT; @@ -24,6 +25,7 @@ import java.util.HashSet; import java.util.Iterator; +import java.util.Map; import java.util.Set; import java.util.concurrent.ConcurrentHashMap; @@ -38,8 +40,8 @@ public class MappingManager { private final MappingConfiguration configuration; final int protocolVersionAsInt; - private final ConcurrentHashMap, Mapper> mappers = new ConcurrentHashMap, Mapper>(); - private final ConcurrentHashMap, MappedUDTCodec> udtCodecs = new ConcurrentHashMap, MappedUDTCodec>(); + private final ConcurrentHashMap> mappers = new ConcurrentHashMap>(); + private final ConcurrentHashMap> udtCodecs = new ConcurrentHashMap>(); private final ConcurrentHashMap, Object> accessors = new ConcurrentHashMap, Object>(); @@ -164,23 +166,24 @@ public void onUserTypeRemoved(UserType type) { @Override public void onUserTypeChanged(UserType current, UserType previous) { synchronized (udtCodecs) { - Set> deletedCodecs = new HashSet>(); - Iterator> it = udtCodecs.values().iterator(); + Set deletedCodecs = new HashSet(); + Iterator>> it = udtCodecs.entrySet().iterator(); while (it.hasNext()) { - MappedUDTCodec codec = it.next(); + Map.Entry> entry = it.next(); + MappedUDTCodec codec = entry.getValue(); if (previous.equals(codec.getCqlType())) { LOGGER.warn("User type {} has been altered; existing mappers for @UDT annotated {} might not work properly anymore", previous, codec.getUdtClass()); - deletedCodecs.add(codec); + deletedCodecs.add(entry.getKey()); it.remove(); } } - for (MappedUDTCodec deletedCodec : deletedCodecs) { + for (CacheKey key : deletedCodecs) { // try to register an updated version of the previous codec try { - getUDTCodec(deletedCodec.getUdtClass()); + getUDTCodec(key.klass, key.keyspace); } catch (Exception e) { - LOGGER.error("Could not update mapping for @UDT annotated " + deletedCodec.getUdtClass(), e); + LOGGER.error("Could not update mapping for @UDT annotated " + key.klass, e); } } } @@ -217,19 +220,33 @@ public MappingConfiguration getConfiguration() { * Creates a {@code Mapper} for the provided class (that must be annotated by a * {@link Table} annotation). *

    - * The {@code MappingManager} only ever keeps one Mapper for each class, and so calling this + * The {@code MappingManager} only ever keeps one Mapper for each class and keyspace, and so calling this * method multiple times on the same class will always return the same object. *

    * If the type of any field in the class is an {@link UDT}-annotated classes, a codec for that * class will automatically be created and registered with the underlying {@code Cluster}. * This works recursively with UDTs nested in other UDTs or in collections. * - * @param the type of the class to map. - * @param klass the (annotated) class for which to return the mapper. - * @return the {@code Mapper} object for class {@code klass}. + * @param the type of the class to map. + * @param klass the (annotated) class for which to return the mapper. + * @param keyspace the target keyspace for the mapping (must be quoted if case-sensitive). If this is {@code null}, + * the mapper will try to use the keyspace defined by the annotation, or the default keyspace on the + * session, or fail if neither is declared. + */ + public Mapper mapper(Class klass, String keyspace) { + return getMapper(klass, keyspace); + } + + /** + * Creates a {@code Mapper} for the provided class, using the default keyspace (either the one declared in the + * {@link Table} annotation, or the logged keyspace on the session). + *

    + * This is equivalent to {@code this.mapper(klass, null)}. + * + * @see #mapper(Class, String) */ public Mapper mapper(Class klass) { - return getMapper(klass); + return mapper(klass, null); } /** @@ -243,12 +260,26 @@ public Mapper mapper(Class klass) { * for a class that references this UDT class (creating a mapper will automatically * process all UDTs that it uses). * - * @param the type of the class to map. - * @param klass the (annotated) class for which to return the codec. - * @return the codec that maps the provided class to the corresponding user-defined type. + * @param the type of the class to map. + * @param klass the (annotated) class for which to return the codec. + * @param keyspace the target keyspace for the mapping (must be quoted if case-sensitive). If this is {@code null}, + * the mapper will try to use the keyspace defined by the annotation, or the default keyspace on the + * session, or fail if neither is declared. + */ + public TypeCodec udtCodec(Class klass, String keyspace) { + return getUDTCodec(klass, keyspace); + } + + /** + * Creates a {@code TypeCodec} for the provided class, using the default keyspace (either the one declared in the + * {@link Table} annotation, or the logged keyspace on the session). + *

    + * This is equivalent to {@code this.udtCodec(klass, null)}. + * + * @see #udtCodec(Class, String) */ public TypeCodec udtCodec(Class klass) { - return getUDTCodec(klass); + return udtCodec(klass, null); } /** @@ -267,12 +298,13 @@ public T createAccessor(Class klass) { } @SuppressWarnings("unchecked") - private Mapper getMapper(Class klass) { - Mapper mapper = (Mapper) mappers.get(klass); + private Mapper getMapper(Class klass, String keyspace) { + CacheKey cacheKey = new CacheKey(klass, keyspace); + Mapper mapper = (Mapper) mappers.get(cacheKey); if (mapper == null) { - EntityMapper entityMapper = AnnotationParser.parseEntity(klass, this); + EntityMapper entityMapper = AnnotationParser.parseEntity(klass, keyspace, this); mapper = new Mapper(this, klass, entityMapper); - Mapper old = (Mapper) mappers.putIfAbsent(klass, mapper); + Mapper old = (Mapper) mappers.putIfAbsent(cacheKey, mapper); if (old != null) { mapper = old; } @@ -281,12 +313,13 @@ private Mapper getMapper(Class klass) { } @SuppressWarnings("unchecked") - TypeCodec getUDTCodec(Class mappedClass) { - MappedUDTCodec codec = (MappedUDTCodec) udtCodecs.get(mappedClass); + TypeCodec getUDTCodec(Class mappedClass, String keyspace) { + CacheKey cacheKey = new CacheKey(mappedClass, keyspace); + MappedUDTCodec codec = (MappedUDTCodec) udtCodecs.get(cacheKey); if (codec == null) { - codec = AnnotationParser.parseUDT(mappedClass, this); + codec = AnnotationParser.parseUDT(mappedClass, keyspace, this); session.getCluster().getConfiguration().getCodecRegistry().register(codec); - MappedUDTCodec old = (MappedUDTCodec) udtCodecs.putIfAbsent(mappedClass, codec); + MappedUDTCodec old = (MappedUDTCodec) udtCodecs.putIfAbsent(cacheKey, codec); if (old != null) { codec = old; } @@ -308,4 +341,31 @@ private T getAccessor(Class klass) { } return accessor; } + + private static class CacheKey { + final Class klass; + final String keyspace; + + CacheKey(Class klass, String keyspace) { + this.klass = klass; + this.keyspace = keyspace; + } + + @Override + public boolean equals(Object other) { + if (other == this) { + return true; + } else if (other instanceof CacheKey) { + CacheKey that = (CacheKey) other; + return this.klass.equals(that.klass) && MoreObjects.equal(this.keyspace, that.keyspace); + } else { + return false; + } + } + + @Override + public int hashCode() { + return MoreObjects.hashCode(klass, keyspace); + } + } } diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java deleted file mode 100644 index 9a10cd9606a..00000000000 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperDefaultKeyspaceTest.java +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (C) 2012-2017 DataStax Inc. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.datastax.driver.mapping; - -import com.datastax.driver.core.CCMTestsSupport; -import com.datastax.driver.core.Session; -import com.datastax.driver.core.utils.CassandraVersion; -import com.datastax.driver.core.utils.MoreObjects; -import com.datastax.driver.core.utils.UUIDs; -import com.datastax.driver.mapping.annotations.*; -import org.testng.annotations.Test; - -import java.util.UUID; - -import static org.testng.Assert.assertEquals; -import static org.testng.Assert.assertNull; - -/** - * Tests usage of mapping annotations without specifying a keyspace. - */ -@CassandraVersion("2.1.0") -@SuppressWarnings("unused") -public class MapperDefaultKeyspaceTest extends CCMTestsSupport { - - private static final String KEYSPACE = "mapper_default_keyspace_test_ks"; - - @Override - public void onTestContextInitialized() { - execute( - String.format("CREATE KEYSPACE IF NOT EXISTS %s WITH replication = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 }", KEYSPACE), - String.format("CREATE TYPE IF NOT EXISTS %s.group_name (name text)", KEYSPACE), - String.format("CREATE TABLE IF NOT EXISTS %s.groups (group_id uuid PRIMARY KEY, name text)", KEYSPACE), - String.format("CREATE TABLE IF NOT EXISTS %s.groups2 (group_id uuid PRIMARY KEY, name frozen)", KEYSPACE)); - } - - @Test(groups = "short") - public void testTableWithDefaultKeyspace() throws Exception { - // Ensure that the test session is logged into the keyspace. - session().execute("USE " + KEYSPACE); - - MappingManager manager = new MappingManager(session()); - Mapper m = manager.mapper(Group.class); - Group group = new Group("testGroup"); - UUID groupId = group.getGroupId(); - - // Check the save operation. - m.save(group); - - // Check the select operation. - Group selectedGroup = m.get(groupId); - assertEquals(selectedGroup.getGroupId(), groupId); - - // Check the delete operation. - m.delete(group); - assertNull(m.get(groupId)); - } - - @Test(groups = "short") - public void testUDTWithDefaultKeyspace() throws Exception { - // Ensure that the test session is logged into the keyspace. - session().execute("USE " + KEYSPACE); - - MappingManager manager = new MappingManager(session()); - Mapper m = manager.mapper(Group2.class); - Group2 group = new Group2(new GroupName("testGroup")); - UUID groupId = group.getGroupId(); - - // Check the save operation. - m.save(group); - - // Check the select operation. - Group2 selectedGroup = m.get(groupId); - assertEquals(selectedGroup.getGroupId(), groupId); - - // Check the delete operation. - m.delete(group); - assertNull(m.get(groupId)); - } - - @Test(groups = "short", - expectedExceptions = IllegalArgumentException.class, - expectedExceptionsMessageRegExp = "Error creating mapper for class com.datastax.driver.mapping.MapperDefaultKeyspaceTest\\$Group, the @Table annotation declares no default keyspace, and the session is not currently logged to any keyspace") - public void should_throw_a_meaningful_error_message_when_no_default_table_keyspace_and_session_not_logged() { - Session session2 = cluster().connect(); - MappingManager manager = new MappingManager(session2); - manager.mapper(Group.class); - } - - @Test(groups = "short", - expectedExceptions = IllegalArgumentException.class, - expectedExceptionsMessageRegExp = "Error creating UDT codec for class com.datastax.driver.mapping.MapperDefaultKeyspaceTest\\$GroupName, the @UDT annotation declares no default keyspace, and the session is not currently logged to any keyspace") - public void should_throw_a_meaningful_error_message_when_no_default_udt_keyspace_and_session_not_logged() { - Session session2 = cluster().connect(); - MappingManager manager = new MappingManager(session2); - manager.udtCodec(GroupName.class); - } - - - /* - * An entity that does not specify a keyspace in its @Table annotation. When a keyspace is - * not specified, the mapper uses the session's logged in keyspace. - */ - @Table(name = "groups") - public static class Group { - - @PartitionKey - @Column(name = "group_id") - private UUID groupId; - - private String name; - - public Group() { - } - - public Group(String name) { - this.name = name; - this.groupId = UUIDs.random(); - } - - public UUID getGroupId() { - return groupId; - } - - public void setGroupId(UUID groupId) { - this.groupId = groupId; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object other) { - if (other == null || other.getClass() != this.getClass()) - return false; - - Group that = (Group) other; - return MoreObjects.equal(groupId, that.groupId) - && MoreObjects.equal(name, that.name); - } - - @Override - public int hashCode() { - return MoreObjects.hashCode(groupId, name); - } - } - - @Table(keyspace = KEYSPACE, name = "groups2") - public static class Group2 { - - @PartitionKey - @Column(name = "group_id") - private UUID groupId; - - @Frozen - private GroupName name; - - public Group2() { - } - - public Group2(GroupName name) { - this.name = name; - this.groupId = UUIDs.random(); - } - - public UUID getGroupId() { - return groupId; - } - - public void setGroupId(UUID groupId) { - this.groupId = groupId; - } - - public GroupName getName() { - return name; - } - - public void setName(GroupName name) { - this.name = name; - } - - @Override - public boolean equals(Object other) { - if (other == null || other.getClass() != this.getClass()) - return false; - - Group2 that = (Group2) other; - return MoreObjects.equal(groupId, that.groupId) - && MoreObjects.equal(name, that.name); - } - - @Override - public int hashCode() { - return MoreObjects.hashCode(groupId, name); - } - } - - /* - * User defined type without a keyspace specified. The mapper will use the session's logged - * keyspace when a keyspace is not specified in the @UDT annotation. - */ - @UDT(name = "group_name") - public static class GroupName { - private String name; - - public GroupName() { - } - - public GroupName(String name) { - this.name = name; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object other) { - if (other instanceof GroupName) { - GroupName that = (GroupName) other; - return this.name.equals(that.name); - } - return false; - } - - @Override - public int hashCode() { - return MoreObjects.hashCode(name); - } - } - -} diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java index bdd12c124c0..d2d2b8334bf 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperInvalidAnnotationsTest.java @@ -60,7 +60,7 @@ static class Invalid1 { "@Table annotation was not found on class " + "com.datastax.driver.mapping.MapperInvalidAnnotationsTest\\$Invalid1") public void should_throw_IAE_when_Table_annotation_not_found_on_entity_class() throws Exception { - AnnotationParser.parseEntity(Invalid1.class, mappingManager); + AnnotationParser.parseEntity(Invalid1.class, null, mappingManager); } @Test(groups = "unit", expectedExceptions = IllegalArgumentException.class, @@ -68,7 +68,7 @@ public void should_throw_IAE_when_Table_annotation_not_found_on_entity_class() t "@UDT annotation was not found on class " + "com.datastax.driver.mapping.MapperInvalidAnnotationsTest\\$Invalid1") public void should_throw_IAE_when_UDT_annotation_not_found_on_udt_class() throws Exception { - AnnotationParser.parseUDT(Invalid1.class, mappingManager); + AnnotationParser.parseUDT(Invalid1.class, null, mappingManager); } @Table(name = "foo") @@ -81,7 +81,7 @@ static class Invalid2 { "Cannot have both @Table and @UDT on class " + "com.datastax.driver.mapping.MapperInvalidAnnotationsTest\\$Invalid2") public void should_throw_IAE_when_UDT_annotation_found_on_entity_class() throws Exception { - AnnotationParser.parseEntity(Invalid2.class, mappingManager); + AnnotationParser.parseEntity(Invalid2.class, null, mappingManager); } @Test(groups = "unit", expectedExceptions = IllegalArgumentException.class, @@ -89,7 +89,7 @@ public void should_throw_IAE_when_UDT_annotation_found_on_entity_class() throws "Cannot have both @UDT and @Table on class " + "com.datastax.driver.mapping.MapperInvalidAnnotationsTest\\$Invalid2") public void should_throw_IAE_when_Table_annotation_found_on_udt_class() throws Exception { - AnnotationParser.parseUDT(Invalid2.class, mappingManager); + AnnotationParser.parseUDT(Invalid2.class, null, mappingManager); } @Table(name = "foo") @@ -102,7 +102,7 @@ static class Invalid3 { "Cannot have both @Table and @Accessor on class " + "com.datastax.driver.mapping.MapperInvalidAnnotationsTest\\$Invalid3") public void should_throw_IAE_when_Accessor_annotation_found_on_entity_class() throws Exception { - AnnotationParser.parseEntity(Invalid3.class, mappingManager); + AnnotationParser.parseEntity(Invalid3.class, null, mappingManager); } @UDT(name = "foo") @@ -115,7 +115,7 @@ static class Invalid4 { "Cannot have both @UDT and @Accessor on class " + "com.datastax.driver.mapping.MapperInvalidAnnotationsTest\\$Invalid4") public void should_throw_IAE_when_Accessor_annotation_found_on_udt_class() throws Exception { - AnnotationParser.parseUDT(Invalid4.class, mappingManager); + AnnotationParser.parseUDT(Invalid4.class, null, mappingManager); } @Test(groups = "unit", expectedExceptions = IllegalArgumentException.class, @@ -173,7 +173,7 @@ static class Invalid8 { expectedExceptionsMessageRegExp = "Annotation @Field is not allowed on property 'invalid'") public void should_throw_IAE_when_Field_annotation_found_on_entity_class_field() throws Exception { - AnnotationParser.parseEntity(Invalid8.class, mappingManager); + AnnotationParser.parseEntity(Invalid8.class, null, mappingManager); } @UDT(name = "foo", keyspace = "ks") @@ -191,7 +191,7 @@ public int getInvalid() { expectedExceptionsMessageRegExp = "Annotation @Column is not allowed on property 'invalid'") public void should_throw_IAE_when_Column_annotation_found_on_udt_class_field() throws Exception { - AnnotationParser.parseUDT(Invalid9.class, mappingManager); + AnnotationParser.parseUDT(Invalid9.class, null, mappingManager); } @Table(name = "foo", keyspace = "ks") @@ -207,7 +207,7 @@ static class Invalid10 { expectedExceptionsMessageRegExp = "Property 'invalid' cannot be annotated with both @PartitionKey and @ClusteringColumn") public void should_throw_IAE_when_PartitionKey_and_ClusteringColumn_on_same_property() throws Exception { - AnnotationParser.parseEntity(Invalid10.class, mappingManager); + AnnotationParser.parseEntity(Invalid10.class, null, mappingManager); } @Table(name = "foo", keyspace = "ks") @@ -223,7 +223,7 @@ static class Invalid11 { expectedExceptionsMessageRegExp = "Property 'invalid' cannot be annotated with both @Column and @Computed") public void should_throw_IAE_when_Computed_and_Column_on_same_property() throws Exception { - AnnotationParser.parseEntity(Invalid11.class, mappingManager); + AnnotationParser.parseEntity(Invalid11.class, null, mappingManager); } @Table(name = "foo", keyspace = "ks") @@ -238,7 +238,7 @@ static class Invalid12 { expectedExceptionsMessageRegExp = "Property 'invalid': attribute 'value' of annotation @Computed is mandatory for computed properties") public void should_throw_IAE_when_Computed_with_empty_value() throws Exception { - AnnotationParser.parseEntity(Invalid12.class, mappingManager); + AnnotationParser.parseEntity(Invalid12.class, null, mappingManager); } @Table(name = "foo", keyspace = "ks") @@ -253,7 +253,7 @@ static class Invalid13 { expectedExceptionsMessageRegExp = "Invalid ordering value -1 for annotation @PartitionKey of property 'invalid', was expecting 0") public void should_throw_IAE_when_PartitionKey_with_wrong_order() throws Exception { - AnnotationParser.parseEntity(Invalid13.class, mappingManager); + AnnotationParser.parseEntity(Invalid13.class, null, mappingManager); } @Table(name = "foo", keyspace = "ks") @@ -268,7 +268,7 @@ public void setNotReadable(int i) { expectedExceptionsMessageRegExp = "Property 'notReadable' is not readable") public void should_throw_IAE_when_unreadable_property() throws Exception { - AnnotationParser.parseEntity(Invalid14.class, mappingManager); + AnnotationParser.parseEntity(Invalid14.class, null, mappingManager); } @Table(name = "foo", keyspace = "ks") @@ -284,7 +284,7 @@ public int getNotWritable() { expectedExceptionsMessageRegExp = "Property 'notWritable' is not writable") public void should_throw_IAE_when_unwritable_property() throws Exception { - AnnotationParser.parseEntity(Invalid15.class, mappingManager); + AnnotationParser.parseEntity(Invalid15.class, null, mappingManager); } } diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperKeyspaceTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperKeyspaceTest.java new file mode 100644 index 00000000000..b5328aeb89c --- /dev/null +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperKeyspaceTest.java @@ -0,0 +1,273 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.mapping; + +import com.datastax.driver.core.CCMTestsSupport; +import com.datastax.driver.core.Row; +import com.datastax.driver.core.Session; +import com.datastax.driver.core.utils.CassandraVersion; +import com.datastax.driver.mapping.annotations.PartitionKey; +import com.datastax.driver.mapping.annotations.Table; +import com.datastax.driver.mapping.annotations.UDT; +import org.assertj.core.util.Preconditions; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Test; + +import static com.datastax.driver.core.Assertions.assertThat; + +@CassandraVersion("2.0") +public class MapperKeyspaceTest extends CCMTestsSupport { + + @Override + public void onTestContextInitialized() { + execute( + "CREATE KEYSPACE IF NOT EXISTS MapperKeyspaceTest WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}", + "CREATE TYPE IF NOT EXISTS MapperKeyspaceTest.address(street text)", + "CREATE TABLE IF NOT EXISTS MapperKeyspaceTest.user(name text PRIMARY KEY, address frozen

    )", + "CREATE KEYSPACE IF NOT EXISTS MapperKeyspaceTest2 WITH replication = {'class': 'SimpleStrategy', 'replication_factor': 1}", + "CREATE TYPE IF NOT EXISTS MapperKeyspaceTest2.address(street text)", + "CREATE TABLE IF NOT EXISTS MapperKeyspaceTest2.user(name text PRIMARY KEY, address frozen
    )" + ); + } + + @BeforeMethod(groups = "short") + public void setup() { + execute("TRUNCATE MapperKeyspaceTest.user", "TRUNCATE MapperKeyspaceTest2.user"); + } + + @Test(groups = "short", expectedExceptions = IllegalArgumentException.class, + expectedExceptionsMessageRegExp = ".* you must provide a keyspace name .*") + public void should_fail_if_no_keyspace_provided() { + new TestScenario(UserWithoutKeyspace.class) + .check(); + } + + @Test(groups="short") + public void should_use_session_keyspace() { + // Only works if it's not defined by the annotation + new TestScenario(UserWithoutKeyspace.class) + .withSessionKeyspace("MapperKeyspaceTest") + .withExpectedKeyspace("MapperKeyspaceTest") + .check(); + } + + @Test(groups = "short") + public void should_use_annotation_keyspace() { + new TestScenario(UserWithKeyspace.class) + .withExpectedKeyspace("MapperKeyspaceTest") + .check(); + // Annotation takes precedence over session keyspace: + new TestScenario(UserWithKeyspace.class) + .withSessionKeyspace("MapperKeyspaceTest2") + .withExpectedKeyspace("MapperKeyspaceTest") + .check(); + } + + @Test(groups = "short") + public void should_use_keyspace_provided_when_creating_mapper() { + // Provided nowhere except in the mapper call: + new TestScenario(UserWithoutKeyspace.class) + .withMapperKeyspace("MapperKeyspaceTest") + .withExpectedKeyspace("MapperKeyspaceTest") + .check(); + // Mapper takes precedence over session: + new TestScenario(UserWithoutKeyspace.class) + .withSessionKeyspace("MapperKeyspaceTest") + .withMapperKeyspace("MapperKeyspaceTest2") + .withExpectedKeyspace("MapperKeyspaceTest2") + .check(); + // Mapper takes precedence over annotation: + new TestScenario(UserWithKeyspace.class) + .withMapperKeyspace("MapperKeyspaceTest2") + .withExpectedKeyspace("MapperKeyspaceTest2") + .check(); + } + + private class TestScenario { + + private final Class userClass; + private final UserT sampleUser; + + private String sessionKeyspace; + private String mapperKeyspace; + private String expectedKeyspace; + + TestScenario(Class userClass) { + this.userClass = userClass; + this.sampleUser = buildSampleUser(userClass); + } + + @SuppressWarnings("unchecked") + private UserT buildSampleUser(Class userClass) { + // Hacky but we know the subclasses so no need to be more fancy + if (userClass == UserWithKeyspace.class) { + return (UserT) new UserWithKeyspace("user1", new AddressWithKeyspace("street")); + } else if (userClass == UserWithoutKeyspace.class) { + return (UserT) new UserWithoutKeyspace("user1", new AddressWithoutKeyspace("street")); + } else { + throw new AssertionError("Unsupported user class " + userClass); + } + } + + /** + * The keyspace passed to Cluster.connect() + */ + TestScenario withSessionKeyspace(String sessionKeyspace) { + this.sessionKeyspace = sessionKeyspace; + return this; + } + + /** + * The keyspace passed to MappingManager.mapper() + */ + TestScenario withMapperKeyspace(String mapperKeyspace) { + this.mapperKeyspace = mapperKeyspace; + return this; + } + + /** + * The keyspace where we expect data to be saved + */ + TestScenario withExpectedKeyspace(String expectedKeyspace) { + this.expectedKeyspace = expectedKeyspace; + return this; + } + + void check() { + Session session = cluster().connect(sessionKeyspace); + MappingManager manager = new MappingManager(session); + Mapper mapper = manager.mapper(userClass, mapperKeyspace); + + mapper.save(sampleUser); + assertThat(expectedKeyspace).isNotNull(); + Row row = session().execute(String.format("SELECT * FROM %s.user WHERE name = ?", expectedKeyspace), sampleUser.getName()).one(); + assertThat(row).isNotNull(); + + UserT loadedUser = mapper.get(sampleUser.getName()); + assertThat(loadedUser.getName()).isEqualTo(sampleUser.getName()); + assertThat(loadedUser.getAddress().getStreet()).isEqualTo(sampleUser.getAddress().getStreet()); + + mapper.delete(sampleUser); + row = session().execute(String.format("SELECT * FROM %s.user WHERE name = ?", expectedKeyspace), sampleUser.getName()).one(); + assertThat(row).isNull(); + } + } + + @SuppressWarnings("unused") + public static class Address { + private String street; + + public Address() { + } + + public Address(String street) { + this.street = street; + } + + public String getStreet() { + return street; + } + + public void setStreet(String street) { + this.street = street; + } + } + + @SuppressWarnings("unused") + @UDT(keyspace = "MapperKeyspaceTest", name = "address") + public static class AddressWithKeyspace extends Address { + public AddressWithKeyspace() { + } + + public AddressWithKeyspace(String street) { + super(street); + } + } + + @SuppressWarnings("unused") + @UDT(name = "address") + public static class AddressWithoutKeyspace extends Address { + public AddressWithoutKeyspace() { + } + + public AddressWithoutKeyspace(String street) { + super(street); + } + } + + @SuppressWarnings("unused") + public static class User { + @PartitionKey + private String name; + private AddressT address; + + public User() { + } + + public User(String name, AddressT address) { + this.name = name; + this.address = address; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public AddressT getAddress() { + return address; + } + + public void setAddress(AddressT address) { + this.address = address; + } + } + + @SuppressWarnings("unused") + @Table(keyspace = "MapperKeyspaceTest", name = "user") + public static class UserWithKeyspace extends User { + public UserWithKeyspace() { + } + + public UserWithKeyspace(String name, AddressWithKeyspace address) { + super(name, address); + } + + @Override + public AddressWithKeyspace getAddress() { + return super.getAddress(); + } + } + + @SuppressWarnings("unused") + @Table(name = "user") + public static class UserWithoutKeyspace extends User { + public UserWithoutKeyspace() { + } + + public UserWithoutKeyspace(String name, AddressWithoutKeyspace address) { + super(name, address); + } + + @Override + public AddressWithoutKeyspace getAddress() { + return super.getAddress(); + } + } +} diff --git a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java index 1288609e5a1..0ff7f39a559 100644 --- a/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java +++ b/driver-mapping/src/test/java/com/datastax/driver/mapping/MapperUDTTest.java @@ -626,7 +626,7 @@ public void setProvince(String province) { @Test(groups = "short", expectedExceptions = IllegalArgumentException.class) public void should_fail_to_create_codec_if_class_has_field_not_in_udt() { MappingManager manager = new MappingManager(session()); - manager.getUDTCodec(AddressUnknownField.class); + manager.getUDTCodec(AddressUnknownField.class, keyspace); } @UDT(name = "nonexistent") @@ -652,7 +652,7 @@ public String getName() { @Test(groups = "short", expectedExceptions = IllegalArgumentException.class) public void should_fail_to_create_codec_if_udt_does_not_exist() { MappingManager manager = new MappingManager(session()); - manager.getUDTCodec(NonExistentUDT.class); + manager.getUDTCodec(NonExistentUDT.class, keyspace); } @Table(name = "users") From 13ac1762dfda44e45f9411a69a495dc8aacd2fdc Mon Sep 17 00:00:00 2001 From: olim7t Date: Thu, 16 Nov 2017 13:44:37 -0800 Subject: [PATCH 184/512] JAVA-1682: Provide a way to record latencies for cancelled speculative executions Those latencies are emitted with a CancelledSpeculativeExecutionException, which allows LatencyTracker implementations to choose whether to include them or not. For example, a tracker that wants to detect "slowness" of a node might want to record them (otherwise a node that always hits the speculative execution threshold would appear to have no measurement), whereas a tracker that monitors latencies of successful executions should ignore them. --- changelog/README.md | 1 + ...ancelledSpeculativeExecutionException.java | 29 +++++++++++++++++++ .../driver/core/PercentileTracker.java | 3 +- .../datastax/driver/core/RequestHandler.java | 9 ++++++ 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 driver-core/src/main/java/com/datastax/driver/core/CancelledSpeculativeExecutionException.java diff --git a/changelog/README.md b/changelog/README.md index 948dae22e02..496a051c743 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -11,6 +11,7 @@ - [new feature] JAVA-1651: Add NO_COMPACT startup option. - [improvement] JAVA-1683: Add metrics to track writes to nodes. - [new feature] JAVA-1229: Allow specifying the keyspace for individual queries. +- [improvement] JAVA-1682: Provide a way to record latencies for cancelled speculative executions. Merged from 3.3.x: diff --git a/driver-core/src/main/java/com/datastax/driver/core/CancelledSpeculativeExecutionException.java b/driver-core/src/main/java/com/datastax/driver/core/CancelledSpeculativeExecutionException.java new file mode 100644 index 00000000000..6ee22899128 --- /dev/null +++ b/driver-core/src/main/java/com/datastax/driver/core/CancelledSpeculativeExecutionException.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2012-2017 DataStax Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.datastax.driver.core; + +/** + * Special exception that gets emitted to {@link LatencyTracker}s with the latencies of cancelled speculative + * executions. This allows those trackers to choose whether to ignore those latencies or not. + */ +class CancelledSpeculativeExecutionException extends Exception { + + static CancelledSpeculativeExecutionException INSTANCE = new CancelledSpeculativeExecutionException(); + + private CancelledSpeculativeExecutionException() { + super(); + } +} diff --git a/driver-core/src/main/java/com/datastax/driver/core/PercentileTracker.java b/driver-core/src/main/java/com/datastax/driver/core/PercentileTracker.java index 6f60df2f1b2..1f554af75ea 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/PercentileTracker.java +++ b/driver-core/src/main/java/com/datastax/driver/core/PercentileTracker.java @@ -255,7 +255,8 @@ protected boolean include(Host host, Statement statement, Exception exception) { OverloadedException.class, BootstrappingException.class, UnpreparedException.class, - QueryValidationException.class // query validation also happens at early stages in the coordinator + QueryValidationException.class, // query validation also happens at early stages in the coordinator + CancelledSpeculativeExecutionException.class ); /** diff --git a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java index 97a45f9d3dc..6afa44f57f4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java +++ b/driver-core/src/main/java/com/datastax/driver/core/RequestHandler.java @@ -274,6 +274,7 @@ class SpeculativeExecution implements Connection.ResponseCallback { private volatile ConsistencyLevel retryConsistencyLevel; private final AtomicReference queryStateRef; private final AtomicBoolean nextExecutionScheduled = new AtomicBoolean(); + private final long startTime = System.nanoTime(); // This represents the number of times a retry has been triggered by the RetryPolicy (this is different from // queryStateRef.get().retryCount, because some retries don't involve the policy, for example after an @@ -511,10 +512,18 @@ void cancel() { // If it's still null, this will be handled by re-checking queryStateRef at the end of write(). if (connectionHandler != null && connectionHandler.cancelHandler()) connectionHandler.connection.release(); + Host queriedHost = current; + if (queriedHost != null && statement != Statement.DEFAULT) { + manager.cluster.manager.reportQuery(queriedHost, statement, CancelledSpeculativeExecutionException.INSTANCE, System.nanoTime() - startTime); + } return; } else if (!previous.inProgress && queryStateRef.compareAndSet(previous, QueryState.CANCELLED_WHILE_COMPLETE)) { if (logger.isTraceEnabled()) logger.trace("[{}] Cancelled while complete", id); + Host queriedHost = current; + if (queriedHost != null && statement != Statement.DEFAULT) { + manager.cluster.manager.reportQuery(queriedHost, statement, CancelledSpeculativeExecutionException.INSTANCE, System.nanoTime() - startTime); + } return; } } From 6f16812b7b08037a5671ed232df096981453f94e Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 8 Jan 2018 09:57:47 -0800 Subject: [PATCH 185/512] JAVA-1717: Add metrics to latency-aware policy --- changelog/README.md | 1 + .../core/policies/LatencyAwarePolicy.java | 73 +++++++++++++++++-- 2 files changed, 68 insertions(+), 6 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 496a051c743..67017998db1 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -12,6 +12,7 @@ - [improvement] JAVA-1683: Add metrics to track writes to nodes. - [new feature] JAVA-1229: Allow specifying the keyspace for individual queries. - [improvement] JAVA-1682: Provide a way to record latencies for cancelled speculative executions. +- [improvement] JAVA-1717: Add metrics to latency-aware policy. Merged from 3.3.x: diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java index dc9b876e1d3..866fa184f40 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java @@ -15,6 +15,7 @@ */ package com.datastax.driver.core.policies; +import com.codahale.metrics.Gauge; import com.datastax.driver.core.*; import com.datastax.driver.core.exceptions.*; import com.google.common.annotations.VisibleForTesting; @@ -62,6 +63,7 @@ public class LatencyAwarePolicy implements ChainableLoadBalancingPolicy { private static final Logger logger = LoggerFactory.getLogger(LatencyAwarePolicy.class); + private static final boolean HOST_METRICS_ENABLED = Boolean.getBoolean("com.datastax.driver.HOST_METRICS_ENABLED"); private final LoadBalancingPolicy childPolicy; private final Tracker latencyTracker; @@ -72,6 +74,7 @@ public class LatencyAwarePolicy implements ChainableLoadBalancingPolicy { private final long scale; private final long retryPeriod; private final long minMeasure; + private volatile Metrics metrics; private LatencyAwarePolicy(LoadBalancingPolicy childPolicy, double exclusionThreshold, @@ -176,6 +179,17 @@ private static ThreadFactory threadFactory(String nameFormat) { public void init(Cluster cluster, Collection hosts) { childPolicy.init(cluster, hosts); cluster.register(latencyTracker); + metrics = cluster.getMetrics(); + if (metrics != null) { + metrics.getRegistry().register( + "LatencyAwarePolicy.latencies.min", + new Gauge() { + @Override + public Long getValue() { + return latencyTracker.getMinAverage(); + } + }); + } } /** @@ -219,21 +233,45 @@ protected Host computeNext() { // If we haven't had enough data point yet to have a score, or the last update of the score // is just too old, include the host. - if (min < 0 || latency == null || latency.nbMeasure < minMeasure || (now - latency.timestamp) > retryPeriod) + if (min < 0 || latency == null || latency.nbMeasure < minMeasure || (now - latency.timestamp) > retryPeriod) { + if (hostMetricsEnabled()) { + metrics.getRegistry() + .counter(MetricsUtil.hostMetricName("LatencyAwarePolicy.inclusions-nodata.", host)) + .inc(); + } return host; + } // If the host latency is within acceptable bound of the faster known host, return // that host. Otherwise, skip it. - if (latency.average <= ((long) (exclusionThreshold * (double) min))) + if (latency.average <= ((long) (exclusionThreshold * (double) min))) { + if (hostMetricsEnabled()) { + metrics.getRegistry() + .counter(MetricsUtil.hostMetricName("LatencyAwarePolicy.inclusions.", host)) + .inc(); + } return host; + } if (skipped == null) skipped = new ArrayDeque(); skipped.offer(host); + if (hostMetricsEnabled()) { + metrics.getRegistry() + .counter(MetricsUtil.hostMetricName("LatencyAwarePolicy.exclusions.", host)) + .inc(); + } } - if (skipped != null && !skipped.isEmpty()) - return skipped.poll(); + if (skipped != null && !skipped.isEmpty()) { + Host host = skipped.poll(); + if (hostMetricsEnabled()) { + metrics.getRegistry() + .counter(MetricsUtil.hostMetricName("LatencyAwarePolicy.hits-while-excluded.", host)) + .inc(); + } + return host; + } return endOfData(); } @@ -384,16 +422,35 @@ private class Tracker implements LatencyTracker { private volatile long cachedMin = -1L; @Override - public void update(Host host, Statement statement, Exception exception, long newLatencyNanos) { + public void update(final Host host, Statement statement, Exception exception, long newLatencyNanos) { if (shouldConsiderNewLatency(statement, exception)) { HostLatencyTracker hostTracker = latencies.get(host); if (hostTracker == null) { hostTracker = new HostLatencyTracker(scale, (30L * minMeasure) / 100L); HostLatencyTracker old = latencies.putIfAbsent(host, hostTracker); - if (old != null) + if (old != null) { hostTracker = old; + } else if (hostMetricsEnabled()) { + String metricName = MetricsUtil.hostMetricName("LatencyAwarePolicy.latencies.", host); + if (!metrics.getRegistry().getNames().contains(metricName)) { + logger.info("Adding gauge " + metricName); + metrics.getRegistry().register( + metricName, + new Gauge() { + @Override + public Long getValue() { + TimestampedAverage latency = latencyTracker.latencyOf(host); + return (latency == null) ? -1 : latency.average; + } + }); + } + } } hostTracker.add(newLatencyNanos); + } else if (hostMetricsEnabled()) { + metrics.getRegistry() + .counter(MetricsUtil.hostMetricName("LatencyAwarePolicy.ignored-latencies.", host)) + .inc(); } } @@ -719,4 +776,8 @@ public void close() { childPolicy.close(); updaterService.shutdown(); } + + private boolean hostMetricsEnabled() { + return HOST_METRICS_ENABLED && metrics != null; + } } From 4281d0710666d6b8d408da50110b6031764cf2dd Mon Sep 17 00:00:00 2001 From: olim7t Date: Mon, 8 Jan 2018 10:37:35 -0800 Subject: [PATCH 186/512] Add host tracker in onUp/onAdd This avoids a race when onDown/onRemove removes the tracker, but pending requests complete after that and re-add it. --- .../core/policies/LatencyAwarePolicy.java | 62 +++++++++++-------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java index 866fa184f40..fc6c4cf2276 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java @@ -178,6 +178,9 @@ private static ThreadFactory threadFactory(String nameFormat) { @Override public void init(Cluster cluster, Collection hosts) { childPolicy.init(cluster, hosts); + for (Host host : hosts) { + latencyTracker.addHost(host); + } cluster.register(latencyTracker); metrics = cluster.getMetrics(); if (metrics != null) { @@ -303,6 +306,7 @@ public Snapshot getScoresSnapshot() { @Override public void onUp(Host host) { childPolicy.onUp(host); + latencyTracker.addHost(host); } @Override @@ -314,6 +318,7 @@ public void onDown(Host host) { @Override public void onAdd(Host host) { childPolicy.onAdd(host); + latencyTracker.addHost(host); } @Override @@ -423,34 +428,15 @@ private class Tracker implements LatencyTracker { @Override public void update(final Host host, Statement statement, Exception exception, long newLatencyNanos) { - if (shouldConsiderNewLatency(statement, exception)) { - HostLatencyTracker hostTracker = latencies.get(host); - if (hostTracker == null) { - hostTracker = new HostLatencyTracker(scale, (30L * minMeasure) / 100L); - HostLatencyTracker old = latencies.putIfAbsent(host, hostTracker); - if (old != null) { - hostTracker = old; - } else if (hostMetricsEnabled()) { - String metricName = MetricsUtil.hostMetricName("LatencyAwarePolicy.latencies.", host); - if (!metrics.getRegistry().getNames().contains(metricName)) { - logger.info("Adding gauge " + metricName); - metrics.getRegistry().register( - metricName, - new Gauge() { - @Override - public Long getValue() { - TimestampedAverage latency = latencyTracker.latencyOf(host); - return (latency == null) ? -1 : latency.average; - } - }); - } - } + HostLatencyTracker hostTracker = latencies.get(host); + if (hostTracker != null) { + if (shouldConsiderNewLatency(statement, exception)) { + hostTracker.add(newLatencyNanos); + } else if (hostMetricsEnabled()) { + metrics.getRegistry() + .counter(MetricsUtil.hostMetricName("LatencyAwarePolicy.ignored-latencies.", host)) + .inc(); } - hostTracker.add(newLatencyNanos); - } else if (hostMetricsEnabled()) { - metrics.getRegistry() - .counter(MetricsUtil.hostMetricName("LatencyAwarePolicy.ignored-latencies.", host)) - .inc(); } } @@ -490,7 +476,29 @@ public Map currentLatencies() { return map; } + public void addHost(final Host host) { + logger.debug("Adding tracker for {}", host); + HostLatencyTracker old = latencies.putIfAbsent(host, + new HostLatencyTracker(scale, (30L * minMeasure) / 100L)); + if (old == null && hostMetricsEnabled()) { + String metricName = MetricsUtil.hostMetricName("LatencyAwarePolicy.latencies.", host); + if (!metrics.getRegistry().getNames().contains(metricName)) { + logger.debug("Adding gauge " + metricName); + metrics.getRegistry().register( + metricName, + new Gauge() { + @Override + public Long getValue() { + TimestampedAverage latency = latencyTracker.latencyOf(host); + return (latency == null) ? -1 : latency.average; + } + }); + } + } + } + public void resetHost(Host host) { + logger.debug("Removing tracker for {}", host); latencies.remove(host); } From 5f4067ba005648bfa7b51678db1dec3d090edd1e Mon Sep 17 00:00:00 2001 From: olim7t Date: Thu, 11 Jan 2018 17:36:37 -0800 Subject: [PATCH 187/512] JAVA-1675: Remove dates from copyright headers --- changelog/README.md | 1 + driver-core/pom.xml | 2 +- .../core/AbstractAddressableByIndexData.java | 2 +- .../com/datastax/driver/core/AbstractData.java | 2 +- .../driver/core/AbstractGettableByIndexData.java | 2 +- .../driver/core/AbstractGettableData.java | 2 +- .../core/AbstractMonotonicTimestampGenerator.java | 2 +- .../driver/core/AbstractReconnectionHandler.java | 2 +- .../com/datastax/driver/core/AbstractSession.java | 2 +- .../driver/core/AbstractTableMetadata.java | 2 +- .../datastax/driver/core/AggregateMetadata.java | 2 +- .../driver/core/ArrayBackedResultSet.java | 2 +- .../com/datastax/driver/core/ArrayBackedRow.java | 2 +- .../core/AtomicMonotonicTimestampGenerator.java | 2 +- .../com/datastax/driver/core/AuthProvider.java | 2 +- .../com/datastax/driver/core/Authenticator.java | 2 +- .../com/datastax/driver/core/BatchStatement.java | 2 +- .../com/datastax/driver/core/BoundStatement.java | 2 +- .../java/com/datastax/driver/core/CBUtil.java | 2 +- .../CancelledSpeculativeExecutionException.java | 2 +- .../driver/core/ChainedResultSetFuture.java | 2 +- .../main/java/com/datastax/driver/core/Clock.java | 2 +- .../com/datastax/driver/core/CloseFuture.java | 2 +- .../java/com/datastax/driver/core/Cluster.java | 2 +- .../driver/core/ClusterNameMismatchException.java | 2 +- .../driver/core/ClusterWidePercentileTracker.java | 2 +- .../com/datastax/driver/core/ClusteringOrder.java | 2 +- .../com/datastax/driver/core/CodecRegistry.java | 2 +- .../java/com/datastax/driver/core/CodecUtils.java | 2 +- .../datastax/driver/core/ColumnDefinitions.java | 2 +- .../com/datastax/driver/core/ColumnMetadata.java | 2 +- .../com/datastax/driver/core/Configuration.java | 2 +- .../java/com/datastax/driver/core/Connection.java | 2 +- .../datastax/driver/core/ConsistencyLevel.java | 2 +- .../datastax/driver/core/ControlConnection.java | 2 +- .../datastax/driver/core/ConvictionPolicy.java | 2 +- .../java/com/datastax/driver/core/DataType.java | 2 +- .../driver/core/DataTypeClassNameParser.java | 2 +- .../driver/core/DataTypeCqlNameParser.java | 2 +- .../driver/core/DefaultPreparedStatement.java | 2 +- .../driver/core/DefaultResultSetFuture.java | 2 +- .../datastax/driver/core/DelegatingCluster.java | 2 +- .../com/datastax/driver/core/DirectedGraph.java | 2 +- .../datastax/driver/core/DriverThrowables.java | 2 +- .../java/com/datastax/driver/core/Duration.java | 2 +- .../com/datastax/driver/core/EventDebouncer.java | 2 +- .../driver/core/ExceptionCatchingRunnable.java | 2 +- .../com/datastax/driver/core/ExceptionCode.java | 2 +- .../com/datastax/driver/core/ExecutionInfo.java | 2 +- .../main/java/com/datastax/driver/core/Frame.java | 2 +- .../com/datastax/driver/core/FrameCompressor.java | 2 +- .../datastax/driver/core/FunctionMetadata.java | 2 +- .../datastax/driver/core/GettableByIndexData.java | 2 +- .../datastax/driver/core/GettableByNameData.java | 2 +- .../com/datastax/driver/core/GettableData.java | 2 +- .../datastax/driver/core/GuavaCompatibility.java | 2 +- .../main/java/com/datastax/driver/core/Host.java | 2 +- .../datastax/driver/core/HostConnectionPool.java | 2 +- .../com/datastax/driver/core/HostDistance.java | 2 +- .../com/datastax/driver/core/IndexMetadata.java | 2 +- .../com/datastax/driver/core/JdkSSLOptions.java | 2 +- .../datastax/driver/core/KeyspaceMetadata.java | 2 +- .../com/datastax/driver/core/LZ4Compressor.java | 2 +- .../com/datastax/driver/core/LatencyTracker.java | 2 +- .../java/com/datastax/driver/core/LocalDate.java | 2 +- .../core/LoggingMonotonicTimestampGenerator.java | 2 +- .../java/com/datastax/driver/core/MD5Digest.java | 2 +- .../driver/core/MaterializedViewMetadata.java | 2 +- .../java/com/datastax/driver/core/Message.java | 2 +- .../java/com/datastax/driver/core/Metadata.java | 2 +- .../java/com/datastax/driver/core/Metrics.java | 2 +- .../com/datastax/driver/core/MetricsOptions.java | 2 +- .../com/datastax/driver/core/MetricsUtil.java | 2 +- .../java/com/datastax/driver/core/Native.java | 2 +- .../com/datastax/driver/core/NettyOptions.java | 2 +- .../com/datastax/driver/core/NettySSLOptions.java | 2 +- .../java/com/datastax/driver/core/NettyUtil.java | 2 +- .../com/datastax/driver/core/PagingIterable.java | 2 +- .../com/datastax/driver/core/PagingState.java | 2 +- .../java/com/datastax/driver/core/ParseUtils.java | 2 +- .../driver/core/PerHostPercentileTracker.java | 2 +- .../datastax/driver/core/PercentileTracker.java | 2 +- .../driver/core/PlainTextAuthProvider.java | 2 +- .../com/datastax/driver/core/PoolingOptions.java | 2 +- .../java/com/datastax/driver/core/PreparedId.java | 2 +- .../datastax/driver/core/PreparedStatement.java | 2 +- .../com/datastax/driver/core/ProtocolEvent.java | 2 +- .../com/datastax/driver/core/ProtocolFeature.java | 2 +- .../com/datastax/driver/core/ProtocolOptions.java | 2 +- .../driver/core/ProtocolV1Authenticator.java | 2 +- .../com/datastax/driver/core/ProtocolVersion.java | 2 +- .../com/datastax/driver/core/QueryLogger.java | 2 +- .../com/datastax/driver/core/QueryOptions.java | 2 +- .../java/com/datastax/driver/core/QueryTrace.java | 2 +- .../datastax/driver/core/RegularStatement.java | 2 +- .../core/RemoteEndpointAwareJdkSSLOptions.java | 2 +- .../core/RemoteEndpointAwareNettySSLOptions.java | 2 +- .../core/RemoteEndpointAwareSSLOptions.java | 2 +- .../datastax/driver/core/ReplicationStategy.java | 2 +- .../com/datastax/driver/core/RequestHandler.java | 2 +- .../java/com/datastax/driver/core/Requests.java | 2 +- .../java/com/datastax/driver/core/Responses.java | 2 +- .../java/com/datastax/driver/core/ResultSet.java | 2 +- .../com/datastax/driver/core/ResultSetFuture.java | 2 +- .../main/java/com/datastax/driver/core/Row.java | 2 +- .../java/com/datastax/driver/core/SSLOptions.java | 2 +- .../driver/core/SchemaChangeListener.java | 2 +- .../driver/core/SchemaChangeListenerBase.java | 2 +- .../com/datastax/driver/core/SchemaElement.java | 2 +- .../com/datastax/driver/core/SchemaParser.java | 2 +- .../driver/core/ServerSideTimestampGenerator.java | 2 +- .../java/com/datastax/driver/core/Session.java | 2 +- .../com/datastax/driver/core/SessionManager.java | 2 +- .../datastax/driver/core/SettableByIndexData.java | 2 +- .../datastax/driver/core/SettableByNameData.java | 2 +- .../com/datastax/driver/core/SettableData.java | 2 +- .../datastax/driver/core/SimpleJSONParser.java | 2 +- .../com/datastax/driver/core/SimpleStatement.java | 2 +- .../datastax/driver/core/SnappyCompressor.java | 2 +- .../com/datastax/driver/core/SocketOptions.java | 2 +- .../java/com/datastax/driver/core/Statement.java | 2 +- .../datastax/driver/core/StatementWrapper.java | 2 +- .../datastax/driver/core/StreamIdGenerator.java | 2 +- .../datastax/driver/core/SystemProperties.java | 2 +- .../com/datastax/driver/core/TableMetadata.java | 2 +- .../driver/core/TableOptionsMetadata.java | 2 +- .../ThreadLocalMonotonicTimestampGenerator.java | 2 +- .../datastax/driver/core/ThreadingOptions.java | 2 +- .../datastax/driver/core/TimestampGenerator.java | 2 +- .../main/java/com/datastax/driver/core/Token.java | 2 +- .../java/com/datastax/driver/core/TokenRange.java | 2 +- .../java/com/datastax/driver/core/TupleType.java | 2 +- .../java/com/datastax/driver/core/TupleValue.java | 2 +- .../java/com/datastax/driver/core/TypeCodec.java | 2 +- .../java/com/datastax/driver/core/TypeTokens.java | 2 +- .../java/com/datastax/driver/core/UDTValue.java | 2 +- .../java/com/datastax/driver/core/UserType.java | 2 +- .../java/com/datastax/driver/core/VIntCoding.java | 2 +- .../com/datastax/driver/core/VersionNumber.java | 2 +- .../java/com/datastax/driver/core/WriteType.java | 2 +- .../core/exceptions/AlreadyExistsException.java | 2 +- .../core/exceptions/AuthenticationException.java | 2 +- .../core/exceptions/BootstrappingException.java | 2 +- .../core/exceptions/BusyConnectionException.java | 2 +- .../driver/core/exceptions/BusyPoolException.java | 2 +- .../core/exceptions/CodecNotFoundException.java | 2 +- .../core/exceptions/ConnectionException.java | 2 +- .../core/exceptions/CoordinatorException.java | 2 +- .../driver/core/exceptions/DriverException.java | 2 +- .../core/exceptions/DriverInternalError.java | 2 +- .../core/exceptions/FrameTooLongException.java | 2 +- .../exceptions/FunctionExecutionException.java | 2 +- .../InvalidConfigurationInQueryException.java | 2 +- .../core/exceptions/InvalidQueryException.java | 2 +- .../core/exceptions/InvalidTypeException.java | 2 +- .../core/exceptions/NoHostAvailableException.java | 2 +- .../exceptions/OperationTimedOutException.java | 2 +- .../core/exceptions/OverloadedException.java | 2 +- .../core/exceptions/PagingStateException.java | 2 +- .../driver/core/exceptions/ProtocolError.java | 2 +- .../exceptions/QueryConsistencyException.java | 2 +- .../core/exceptions/QueryExecutionException.java | 2 +- .../core/exceptions/QueryValidationException.java | 2 +- .../core/exceptions/ReadFailureException.java | 2 +- .../core/exceptions/ReadTimeoutException.java | 2 +- .../driver/core/exceptions/ServerError.java | 2 +- .../driver/core/exceptions/SyntaxError.java | 2 +- .../core/exceptions/TraceRetrievalException.java | 2 +- .../core/exceptions/TransportException.java | 2 +- .../driver/core/exceptions/TruncateException.java | 2 +- .../core/exceptions/UnauthorizedException.java | 2 +- .../core/exceptions/UnavailableException.java | 2 +- .../core/exceptions/UnpreparedException.java | 2 +- .../exceptions/UnresolvedUserTypeException.java | 2 +- .../exceptions/UnsupportedFeatureException.java | 2 +- .../UnsupportedProtocolVersionException.java | 2 +- .../core/exceptions/WriteFailureException.java | 2 +- .../core/exceptions/WriteTimeoutException.java | 2 +- .../driver/core/exceptions/package-info.java | 2 +- .../com/datastax/driver/core/package-info.java | 2 +- .../driver/core/policies/AddressTranslator.java | 2 +- .../policies/ChainableLoadBalancingPolicy.java | 2 +- .../com/datastax/driver/core/policies/Clock.java | 2 +- .../core/policies/ConstantReconnectionPolicy.java | 2 +- .../ConstantSpeculativeExecutionPolicy.java | 2 +- .../core/policies/DCAwareRoundRobinPolicy.java | 2 +- .../driver/core/policies/DefaultRetryPolicy.java | 2 +- .../DowngradingConsistencyRetryPolicy.java | 2 +- .../policies/EC2MultiRegionAddressTranslator.java | 2 +- .../driver/core/policies/ErrorAwarePolicy.java | 2 +- .../policies/ExponentialReconnectionPolicy.java | 2 +- .../core/policies/FallthroughRetryPolicy.java | 2 +- .../driver/core/policies/HostFilterPolicy.java | 2 +- .../policies/IdempotenceAwareRetryPolicy.java | 2 +- .../driver/core/policies/IdentityTranslator.java | 2 +- .../driver/core/policies/LatencyAwarePolicy.java | 2 +- .../driver/core/policies/LoadBalancingPolicy.java | 2 +- .../driver/core/policies/LoggingRetryPolicy.java | 2 +- .../policies/NoSpeculativeExecutionPolicy.java | 2 +- .../PercentileSpeculativeExecutionPolicy.java | 2 +- .../datastax/driver/core/policies/Policies.java | 2 +- .../driver/core/policies/ReconnectionPolicy.java | 2 +- .../driver/core/policies/RetryPolicy.java | 2 +- .../driver/core/policies/RollingCount.java | 2 +- .../driver/core/policies/RoundRobinPolicy.java | 2 +- .../core/policies/SpeculativeExecutionPolicy.java | 2 +- .../driver/core/policies/TokenAwarePolicy.java | 2 +- .../driver/core/policies/WhiteListPolicy.java | 2 +- .../driver/core/policies/package-info.java | 2 +- .../driver/core/querybuilder/Assignment.java | 2 +- .../datastax/driver/core/querybuilder/Batch.java | 2 +- .../driver/core/querybuilder/BindMarker.java | 2 +- .../driver/core/querybuilder/BuiltStatement.java | 2 +- .../datastax/driver/core/querybuilder/Clause.java | 2 +- .../datastax/driver/core/querybuilder/Delete.java | 2 +- .../datastax/driver/core/querybuilder/Insert.java | 2 +- .../driver/core/querybuilder/Ordering.java | 2 +- .../driver/core/querybuilder/QueryBuilder.java | 2 +- .../datastax/driver/core/querybuilder/Select.java | 2 +- .../driver/core/querybuilder/Truncate.java | 2 +- .../datastax/driver/core/querybuilder/Update.java | 2 +- .../datastax/driver/core/querybuilder/Using.java | 2 +- .../datastax/driver/core/querybuilder/Utils.java | 2 +- .../driver/core/querybuilder/package-info.java | 2 +- .../schemabuilder/AbstractCreateStatement.java | 2 +- .../datastax/driver/core/schemabuilder/Alter.java | 2 +- .../driver/core/schemabuilder/AlterKeyspace.java | 2 +- .../driver/core/schemabuilder/ColumnType.java | 2 +- .../driver/core/schemabuilder/Create.java | 2 +- .../driver/core/schemabuilder/CreateIndex.java | 2 +- .../driver/core/schemabuilder/CreateKeyspace.java | 2 +- .../driver/core/schemabuilder/CreateType.java | 2 +- .../datastax/driver/core/schemabuilder/Drop.java | 2 +- .../driver/core/schemabuilder/DropKeyspace.java | 2 +- .../core/schemabuilder/KeyspaceOptions.java | 2 +- .../core/schemabuilder/NativeColumnType.java | 2 +- .../driver/core/schemabuilder/SchemaBuilder.java | 2 +- .../core/schemabuilder/SchemaStatement.java | 2 +- .../driver/core/schemabuilder/StatementStart.java | 2 +- .../driver/core/schemabuilder/TableOptions.java | 2 +- .../driver/core/schemabuilder/UDTType.java | 2 +- .../driver/core/schemabuilder/package-info.java | 2 +- .../com/datastax/driver/core/utils/Bytes.java | 2 +- .../datastax/driver/core/utils/MoreFutures.java | 2 +- .../datastax/driver/core/utils/MoreObjects.java | 2 +- .../com/datastax/driver/core/utils/UUIDs.java | 2 +- .../com/datastax/driver/core/Driver.properties | 2 +- .../driver/core/AbstractBatchIdempotencyTest.java | 2 +- .../driver/core/AbstractPoliciesTest.java | 2 +- .../core/AbstractReconnectionHandlerTest.java | 2 +- .../core/AbstractReplicationStrategyTest.java | 2 +- .../driver/core/AggregateMetadataAssert.java | 2 +- .../driver/core/AggregateMetadataTest.java | 2 +- .../java/com/datastax/driver/core/Assertions.java | 2 +- .../com/datastax/driver/core/AsyncQueryTest.java | 2 +- .../datastax/driver/core/AsyncResultSetTest.java | 2 +- .../AtomicMonotonicTimestampGeneratorTest.java | 2 +- .../datastax/driver/core/AuthenticationTest.java | 2 +- .../core/BatchStatementIdempotencyTest.java | 2 +- .../datastax/driver/core/BatchStatementTest.java | 2 +- .../datastax/driver/core/BoundStatementTest.java | 2 +- .../java/com/datastax/driver/core/CCMAccess.java | 2 +- .../java/com/datastax/driver/core/CCMBridge.java | 2 +- .../com/datastax/driver/core/CCMBridgeTest.java | 2 +- .../java/com/datastax/driver/core/CCMCache.java | 2 +- .../java/com/datastax/driver/core/CCMConfig.java | 2 +- .../com/datastax/driver/core/CCMException.java | 2 +- .../com/datastax/driver/core/CCMTestsSupport.java | 2 +- .../com/datastax/driver/core/CCMWorkload.java | 2 +- .../datastax/driver/core/CaseSensitivityTest.java | 2 +- .../datastax/driver/core/ClockFactoryTest.java | 2 +- .../com/datastax/driver/core/ClusterAssert.java | 2 +- .../com/datastax/driver/core/ClusterInitTest.java | 2 +- .../datastax/driver/core/ClusterStressTest.java | 2 +- .../core/ClusterWidePercentileTrackerTest.java | 2 +- .../datastax/driver/core/CodecRegistryTest.java | 2 +- .../driver/core/ColumnDefinitionsAssert.java | 2 +- .../driver/core/ColumnDefinitionsTest.java | 2 +- .../driver/core/ColumnMetadataAssert.java | 2 +- .../com/datastax/driver/core/CompressionTest.java | 2 +- .../datastax/driver/core/ConditionChecker.java | 2 +- .../driver/core/ConditionalUpdateTest.java | 2 +- .../driver/core/ConnectionReleaseTest.java | 2 +- .../com/datastax/driver/core/ConsistencyTest.java | 2 +- .../driver/core/ControlConnectionTest.java | 2 +- .../driver/core/CountingReconnectionPolicy.java | 2 +- .../java/com/datastax/driver/core/CreateCCM.java | 2 +- .../datastax/driver/core/CustomPayloadTest.java | 2 +- .../driver/core/CustomPercentileTrackerTest.java | 2 +- .../com/datastax/driver/core/CustomTypeTest.java | 2 +- .../com/datastax/driver/core/DataProviders.java | 2 +- .../com/datastax/driver/core/DataTypeAssert.java | 2 +- .../driver/core/DataTypeClassNameParserTest.java | 2 +- .../driver/core/DataTypeCqlNameParserTest.java | 2 +- .../driver/core/DataTypeIntegrationTest.java | 2 +- .../com/datastax/driver/core/DataTypeTest.java | 2 +- .../core/DelegatingClusterIntegrationTest.java | 2 +- .../driver/core/DelegatingClusterTest.java | 2 +- .../driver/core/DirectCompressionTest.java | 2 +- .../datastax/driver/core/DirectedGraphTest.java | 2 +- .../datastax/driver/core/DseCCMClusterTest.java | 2 +- .../datastax/driver/core/DurationCodecTest.java | 2 +- .../driver/core/DurationIntegrationTest.java | 2 +- .../com/datastax/driver/core/DurationTest.java | 2 +- .../core/EventDebouncerIntegrationTest.java | 2 +- .../datastax/driver/core/EventDebouncerTest.java | 2 +- .../datastax/driver/core/ExportAsStringTest.java | 2 +- .../core/ExtendedPeerCheckDisabledTest.java | 2 +- .../java/com/datastax/driver/core/FakeHost.java | 2 +- .../com/datastax/driver/core/FetchingTest.java | 2 +- .../com/datastax/driver/core/FrameLengthTest.java | 2 +- .../driver/core/FunctionMetadataAssert.java | 2 +- .../driver/core/FunctionMetadataTest.java | 2 +- .../driver/core/GettableDataIntegrationTest.java | 2 +- .../datastax/driver/core/HeapCompressionTest.java | 2 +- .../com/datastax/driver/core/HeartbeatTest.java | 2 +- .../java/com/datastax/driver/core/HostAssert.java | 2 +- .../driver/core/HostConnectionPoolMultiTest.java | 2 +- .../driver/core/HostConnectionPoolTest.java | 2 +- .../driver/core/HostMetadataIntegrationTest.java | 2 +- .../datastax/driver/core/IndexMetadataAssert.java | 2 +- .../datastax/driver/core/IndexMetadataTest.java | 2 +- .../driver/core/Jdk8SSLEncryptionTest.java | 2 +- .../driver/core/KeyspaceMetadataAssert.java | 2 +- .../com/datastax/driver/core/LargeDataTest.java | 2 +- .../core/LoadBalancingPolicyBootstrapTest.java | 2 +- .../core/LoadBalancingPolicyRefreshTest.java | 2 +- .../com/datastax/driver/core/LocalDateAssert.java | 2 +- .../com/datastax/driver/core/LocalDateTest.java | 2 +- .../datastax/driver/core/M3PTokenFactoryTest.java | 2 +- .../driver/core/M3PTokenIntegrationTest.java | 2 +- .../driver/core/M3PTokenVnodeIntegrationTest.java | 2 +- .../com/datastax/driver/core/MappingCodec.java | 2 +- .../core/MaterializedViewMetadataAssert.java | 2 +- .../driver/core/MaterializedViewMetadataTest.java | 2 +- .../com/datastax/driver/core/MemoryAppender.java | 2 +- .../com/datastax/driver/core/MetadataTest.java | 2 +- .../datastax/driver/core/MetricsInFlightTest.java | 2 +- .../com/datastax/driver/core/MetricsTest.java | 2 +- .../driver/core/MissingRpcAddressTest.java | 2 +- .../java/com/datastax/driver/core/MockClocks.java | 2 +- .../datastax/driver/core/NettyOptionsTest.java | 2 +- .../driver/core/NetworkTopologyStrategyTest.java | 2 +- .../driver/core/NoAuthenticationTest.java | 2 +- .../driver/core/NodeListRefreshDebouncerTest.java | 2 +- .../driver/core/NodeRefreshDebouncerTest.java | 2 +- .../datastax/driver/core/OPPTokenFactoryTest.java | 2 +- .../driver/core/OPPTokenIntegrationTest.java | 2 +- .../driver/core/OPPTokenVnodeIntegrationTest.java | 2 +- .../com/datastax/driver/core/PagingStateTest.java | 2 +- .../com/datastax/driver/core/ParseUtilsTest.java | 2 +- .../driver/core/PerHostPercentileTrackerTest.java | 2 +- .../driver/core/PercentileTrackerTest.java | 2 +- .../core/PoolingOptionsIntegrationTest.java | 2 +- .../datastax/driver/core/PoolingOptionsTest.java | 2 +- .../com/datastax/driver/core/PreparedIdTest.java | 2 +- .../core/PreparedStatementInvalidationTest.java | 15 +++++++++++++++ .../driver/core/PreparedStatementTest.java | 2 +- .../driver/core/PrimitiveTypeSamples.java | 2 +- .../driver/core/ProtocolBetaVersionTest.java | 2 +- .../datastax/driver/core/ProtocolOptionsTest.java | 2 +- .../com/datastax/driver/core/ProtocolV1Test.java | 2 +- .../core/ProtocolVersionRenegotiationTest.java | 2 +- .../driver/core/QueryLoggerErrorsTest.java | 2 +- .../com/datastax/driver/core/QueryLoggerTest.java | 2 +- .../datastax/driver/core/QueryOptionsTest.java | 2 +- .../datastax/driver/core/QueryTimestampTest.java | 2 +- .../com/datastax/driver/core/QueryTracker.java | 2 +- .../datastax/driver/core/RPTokenFactoryTest.java | 2 +- .../driver/core/RPTokenIntegrationTest.java | 2 +- .../driver/core/RPTokenVnodeIntegrationTest.java | 2 +- .../com/datastax/driver/core/ReadTimeoutTest.java | 2 +- .../driver/core/RecommissionedNodeTest.java | 2 +- .../driver/core/ReconnectionPolicyTest.java | 2 +- .../datastax/driver/core/ReconnectionTest.java | 2 +- .../driver/core/RefreshConnectedHostTest.java | 2 +- .../driver/core/ReplicationStrategyTest.java | 2 +- .../datastax/driver/core/RequestHandlerTest.java | 2 +- .../com/datastax/driver/core/ResultSetAssert.java | 2 +- .../datastax/driver/core/ReusedStreamIdTest.java | 2 +- .../core/SSLAuthenticatedEncryptionTest.java | 2 +- .../datastax/driver/core/SSLEncryptionTest.java | 2 +- .../com/datastax/driver/core/SSLTestBase.java | 2 +- .../datastax/driver/core/ScassandraCluster.java | 2 +- .../datastax/driver/core/ScassandraTestBase.java | 2 +- .../datastax/driver/core/SchemaAgreementTest.java | 2 +- .../datastax/driver/core/SchemaChangesCCTest.java | 2 +- .../datastax/driver/core/SchemaChangesTest.java | 2 +- .../driver/core/SchemaRefreshDebouncerTest.java | 2 +- .../com/datastax/driver/core/SessionAssert.java | 2 +- .../datastax/driver/core/SessionErrorTest.java | 2 +- .../com/datastax/driver/core/SessionLeakTest.java | 2 +- .../datastax/driver/core/SessionStressTest.java | 2 +- .../com/datastax/driver/core/SessionTest.java | 2 +- .../driver/core/SimpleJSONParserTest.java | 2 +- .../core/SimpleStatementIntegrationTest.java | 2 +- .../datastax/driver/core/SimpleStatementTest.java | 2 +- .../datastax/driver/core/SimpleStrategyTest.java | 2 +- .../driver/core/SingleConnectionPoolTest.java | 2 +- .../driver/core/SingleTokenIntegrationTest.java | 2 +- .../driver/core/SortingLoadBalancingPolicy.java | 2 +- .../driver/core/SpeculativeExecutionTest.java | 2 +- .../datastax/driver/core/StateListenerBase.java | 2 +- .../datastax/driver/core/StateListenerTest.java | 2 +- .../driver/core/StatementIdempotenceTest.java | 2 +- .../driver/core/StatementWrapperTest.java | 2 +- .../driver/core/StreamIdGeneratorTest.java | 2 +- .../datastax/driver/core/TableMetadataAssert.java | 2 +- .../driver/core/TableMetadataCDCTest.java | 2 +- .../datastax/driver/core/TableMetadataTest.java | 2 +- .../com/datastax/driver/core/TestListener.java | 2 +- .../java/com/datastax/driver/core/TestUtils.java | 2 +- ...hreadLocalMonotonicTimestampGeneratorTest.java | 2 +- .../driver/core/ThreadingOptionsTest.java | 2 +- .../datastax/driver/core/TimeoutStressTest.java | 2 +- .../driver/core/TokenIntegrationTest.java | 2 +- .../datastax/driver/core/TokenRangeAssert.java | 2 +- .../com/datastax/driver/core/TokenRangeTest.java | 2 +- .../com/datastax/driver/core/TracingTest.java | 2 +- .../java/com/datastax/driver/core/TupleTest.java | 2 +- .../com/datastax/driver/core/TypeCodecAssert.java | 2 +- .../core/TypeCodecCollectionsIntegrationTest.java | 2 +- .../TypeCodecEncapsulationIntegrationTest.java | 2 +- ...TypeCodecNestedCollectionsIntegrationTest.java | 2 +- ...TypeCodecNestedUDTAndTupleIntegrationTest.java | 2 +- .../core/TypeCodecNumbersIntegrationTest.java | 2 +- ...peCodecOverlappingJavaTypeIntegrationTest.java | 2 +- .../com/datastax/driver/core/TypeCodecTest.java | 2 +- .../core/TypeCodecTupleIntegrationTest.java | 2 +- .../driver/core/TypeCodecUDTIntegrationTest.java | 2 +- .../driver/core/UnresolvedUserTypeTest.java | 2 +- .../com/datastax/driver/core/UserTypesTest.java | 2 +- .../datastax/driver/core/VersionNumberAssert.java | 2 +- .../datastax/driver/core/VersionNumberTest.java | 2 +- .../com/datastax/driver/core/WarningsTest.java | 2 +- .../core/exceptions/ConnectionExceptionTest.java | 2 +- .../core/exceptions/ExceptionsScassandraTest.java | 2 +- .../driver/core/exceptions/ExceptionsTest.java | 2 +- .../FunctionExecutionExceptionTest.java | 2 +- .../exceptions/NoHostAvailableExceptionTest.java | 2 +- .../exceptions/ReadWriteFailureExceptionTest.java | 2 +- .../AbstractRetryPolicyIntegrationTest.java | 2 +- .../CloseableLoadBalancingPolicyTest.java | 2 +- .../CustomRetryPolicyIntegrationTest.java | 2 +- .../policies/DCAwareRoundRobinPolicyTest.java | 2 +- .../DefaultRetryPolicyIntegrationTest.java | 2 +- .../policies/DelegatingLoadBalancingPolicy.java | 2 +- .../DelegatingSpeculativeExecutionPolicy.java | 2 +- ...dingConsistencyRetryPolicyIntegrationTest.java | 2 +- .../EC2MultiRegionAddressTranslatorTest.java | 2 +- .../policies/ErrorAwarePolicyIntegrationTest.java | 2 +- .../FallthroughRetryPolicyIntegrationTest.java | 2 +- .../core/policies/HostFilterPolicyTest.java | 2 +- ...dempotenceAwareRetryPolicyIntegrationTest.java | 2 +- .../core/policies/LatencyAwarePolicyTest.java | 2 +- .../policies/LimitingLoadBalancingPolicy.java | 2 +- .../LoggingRetryPolicyIntegrationTest.java | 2 +- .../driver/core/policies/RetryDecisionTest.java | 2 +- .../driver/core/policies/RollingCountTest.java | 2 +- .../core/policies/RoundRobinPolicyTest.java | 2 +- .../core/policies/TokenAwarePolicyTest.java | 2 +- .../driver/core/policies/WhiteListPolicyTest.java | 2 +- .../core/querybuilder/BatchIdempotencyTest.java | 2 +- .../querybuilder/QueryBuilder21ExecutionTest.java | 2 +- .../querybuilder/QueryBuilderExecutionTest.java | 2 +- .../core/querybuilder/QueryBuilderITest.java | 2 +- .../querybuilder/QueryBuilderRoutingKeyTest.java | 2 +- .../core/querybuilder/QueryBuilderTest.java | 2 +- .../QueryBuilderTupleExecutionTest.java | 2 +- .../QueryBuilderUDTExecutionTest.java | 2 +- .../core/schemabuilder/AlterKeyspaceTest.java | 2 +- .../driver/core/schemabuilder/AlterTest.java | 2 +- .../core/schemabuilder/CompactionOptionsTest.java | 2 +- .../schemabuilder/CompressionOptionsTest.java | 2 +- .../core/schemabuilder/CreateIndexTest.java | 2 +- .../core/schemabuilder/CreateKeyspaceTest.java | 2 +- .../driver/core/schemabuilder/CreateTest.java | 2 +- .../driver/core/schemabuilder/CreateTypeTest.java | 2 +- .../core/schemabuilder/DropKeyspaceTest.java | 2 +- .../driver/core/schemabuilder/DropTest.java | 2 +- .../core/schemabuilder/SchemaBuilderIT.java | 2 +- .../driver/core/utils/CassandraVersion.java | 2 +- .../datastax/driver/core/utils/DseVersion.java | 2 +- .../driver/core/utils/SocketChannelMonitor.java | 2 +- .../core/utils/UUIDsPIDFromPropertyTest.java | 2 +- .../driver/core/utils/UUIDsPIDNativeTest.java | 2 +- .../core/utils/UUIDsPIDPropertyInvalidTest.java | 2 +- .../com/datastax/driver/core/utils/UUIDsTest.java | 2 +- driver-core/src/test/resources/log4j.properties | 2 +- driver-dist/pom.xml | 2 +- driver-dist/src/assembly/binary-tarball.xml | 2 +- driver-examples/pom.xml | 2 +- .../examples/basic/CreateAndPopulateKeyspace.java | 2 +- .../examples/basic/ReadCassandraVersion.java | 2 +- .../basic/ReadTopologyAndSchemaMetadata.java | 2 +- .../datastax/driver/examples/datatypes/Blobs.java | 2 +- .../driver/examples/json/JacksonJsonColumn.java | 2 +- .../driver/examples/json/JacksonJsonFunction.java | 2 +- .../driver/examples/json/JacksonJsonRow.java | 2 +- .../driver/examples/json/Jsr353JsonColumn.java | 2 +- .../driver/examples/json/Jsr353JsonFunction.java | 2 +- .../driver/examples/json/Jsr353JsonRow.java | 2 +- .../driver/examples/json/PlainTextJson.java | 2 +- .../examples/paging/ForwardPagingRestUi.java | 2 +- .../examples/paging/RandomPagingRestUi.java | 2 +- driver-examples/src/main/resources/logback.xml | 2 +- driver-extras/pom.xml | 2 +- .../driver/extras/codecs/MappingCodec.java | 2 +- .../driver/extras/codecs/ParsingCodec.java | 2 +- .../extras/codecs/arrays/AbstractArrayCodec.java | 2 +- .../arrays/AbstractPrimitiveArrayCodec.java | 2 +- .../extras/codecs/arrays/DoubleArrayCodec.java | 2 +- .../extras/codecs/arrays/FloatArrayCodec.java | 2 +- .../extras/codecs/arrays/IntArrayCodec.java | 2 +- .../extras/codecs/arrays/LongArrayCodec.java | 2 +- .../extras/codecs/arrays/ObjectArrayCodec.java | 2 +- .../driver/extras/codecs/arrays/package-info.java | 2 +- .../extras/codecs/date/SimpleDateCodec.java | 2 +- .../extras/codecs/date/SimpleTimestampCodec.java | 2 +- .../driver/extras/codecs/date/package-info.java | 2 +- .../driver/extras/codecs/enums/EnumNameCodec.java | 2 +- .../extras/codecs/enums/EnumOrdinalCodec.java | 2 +- .../driver/extras/codecs/enums/package-info.java | 2 +- .../driver/extras/codecs/guava/OptionalCodec.java | 2 +- .../driver/extras/codecs/guava/package-info.java | 2 +- .../extras/codecs/jdk8/IgnoreJDK6Requirement.java | 2 +- .../driver/extras/codecs/jdk8/InstantCodec.java | 2 +- .../driver/extras/codecs/jdk8/LocalDateCodec.java | 2 +- .../driver/extras/codecs/jdk8/LocalTimeCodec.java | 2 +- .../driver/extras/codecs/jdk8/OptionalCodec.java | 2 +- .../extras/codecs/jdk8/ZonedDateTimeCodec.java | 2 +- .../driver/extras/codecs/jdk8/package-info.java | 2 +- .../driver/extras/codecs/joda/DateTimeCodec.java | 2 +- .../driver/extras/codecs/joda/InstantCodec.java | 2 +- .../driver/extras/codecs/joda/LocalDateCodec.java | 2 +- .../driver/extras/codecs/joda/LocalTimeCodec.java | 2 +- .../driver/extras/codecs/joda/package-info.java | 2 +- .../extras/codecs/json/JacksonJsonCodec.java | 2 +- .../extras/codecs/json/Jsr353JsonCodec.java | 2 +- .../driver/extras/codecs/json/package-info.java | 2 +- .../driver/extras/codecs/package-info.java | 2 +- .../extras/codecs/arrays/ArrayCodecsTest.java | 2 +- .../extras/codecs/date/SimpleDateCodecTest.java | 2 +- .../extras/codecs/date/SimpleDateCodecsTest.java | 2 +- .../codecs/date/SimpleTimestampCodecTest.java | 2 +- .../extras/codecs/enums/EnumCodecsTest.java | 2 +- .../extras/codecs/guava/OptionalCodecTest.java | 2 +- .../extras/codecs/jdk8/InstantCodecTest.java | 2 +- .../extras/codecs/jdk8/Jdk8TimeCodecsTest.java | 2 +- .../extras/codecs/jdk8/LocalDateCodecTest.java | 2 +- .../extras/codecs/jdk8/LocalTimeCodecTest.java | 2 +- .../extras/codecs/jdk8/OptionalCodecTest.java | 2 +- .../codecs/jdk8/ZonedDateTimeCodecTest.java | 2 +- .../extras/codecs/joda/DateTimeCodecTest.java | 2 +- .../extras/codecs/joda/InstantCodecTest.java | 2 +- .../extras/codecs/joda/JodaTimeCodecsTest.java | 2 +- .../extras/codecs/joda/LocalDateCodecTest.java | 2 +- .../extras/codecs/joda/LocalTimeCodecTest.java | 2 +- .../extras/codecs/json/JacksonJsonCodecTest.java | 2 +- .../extras/codecs/json/Jsr353JsonCodecTest.java | 2 +- driver-extras/src/test/resources/log4j.properties | 2 +- driver-mapping/pom.xml | 2 +- .../driver/mapping/AccessorInvocationHandler.java | 2 +- .../datastax/driver/mapping/AccessorMapper.java | 2 +- .../driver/mapping/AliasedMappedProperty.java | 2 +- .../datastax/driver/mapping/AnnotationChecks.java | 2 +- .../datastax/driver/mapping/AnnotationParser.java | 2 +- .../mapping/DefaultHierarchyScanStrategy.java | 2 +- .../driver/mapping/DefaultMappedProperty.java | 2 +- .../driver/mapping/DefaultNamingStrategy.java | 2 +- .../driver/mapping/DefaultPropertyMapper.java | 2 +- .../datastax/driver/mapping/DriverThrowables.java | 2 +- .../com/datastax/driver/mapping/EntityMapper.java | 2 +- .../driver/mapping/HierarchyScanStrategy.java | 2 +- .../MappedClassesOnlyHierarchyScanStrategy.java | 2 +- .../datastax/driver/mapping/MappedProperty.java | 2 +- .../datastax/driver/mapping/MappedUDTCodec.java | 2 +- .../java/com/datastax/driver/mapping/Mapper.java | 2 +- .../driver/mapping/MapperBoundStatement.java | 2 +- .../driver/mapping/MappingConfiguration.java | 2 +- .../datastax/driver/mapping/MappingManager.java | 2 +- .../com/datastax/driver/mapping/MethodMapper.java | 2 +- .../datastax/driver/mapping/NamingConvention.java | 2 +- .../driver/mapping/NamingConventions.java | 2 +- .../datastax/driver/mapping/NamingStrategy.java | 2 +- .../driver/mapping/PropertyAccessStrategy.java | 2 +- .../datastax/driver/mapping/PropertyMapper.java | 2 +- .../mapping/PropertyTransienceStrategy.java | 2 +- .../com/datastax/driver/mapping/QueryType.java | 2 +- .../datastax/driver/mapping/ReflectionUtils.java | 2 +- .../java/com/datastax/driver/mapping/Result.java | 2 +- .../com/datastax/driver/mapping/TypeMappings.java | 2 +- .../java/com/datastax/driver/mapping/Word.java | 2 +- .../driver/mapping/annotations/Accessor.java | 2 +- .../mapping/annotations/ClusteringColumn.java | 2 +- .../driver/mapping/annotations/Column.java | 2 +- .../driver/mapping/annotations/Computed.java | 2 +- .../driver/mapping/annotations/Defaults.java | 2 +- .../driver/mapping/annotations/Field.java | 2 +- .../driver/mapping/annotations/Frozen.java | 2 +- .../driver/mapping/annotations/FrozenKey.java | 2 +- .../driver/mapping/annotations/FrozenValue.java | 2 +- .../driver/mapping/annotations/Param.java | 2 +- .../driver/mapping/annotations/PartitionKey.java | 2 +- .../driver/mapping/annotations/Query.java | 2 +- .../mapping/annotations/QueryParameters.java | 2 +- .../driver/mapping/annotations/Table.java | 2 +- .../driver/mapping/annotations/Transient.java | 2 +- .../datastax/driver/mapping/annotations/UDT.java | 2 +- .../driver/mapping/MapperAccessorParamsTest.java | 2 +- .../driver/mapping/MapperAccessorTest.java | 2 +- .../driver/mapping/MapperAsyncResultTest.java | 2 +- .../datastax/driver/mapping/MapperAsyncTest.java | 2 +- .../driver/mapping/MapperCaseSensitivityTest.java | 2 +- .../driver/mapping/MapperCompositeKeyTest.java | 2 +- .../driver/mapping/MapperComputedFieldsTest.java | 2 +- .../driver/mapping/MapperCustomCodecTest.java | 2 +- .../mapping/MapperInvalidAnnotationsTest.java | 2 +- .../driver/mapping/MapperKeyspaceTest.java | 2 +- .../mapping/MapperMaterializedViewTest.java | 2 +- .../mapping/MapperNestedCollectionsTest.java | 2 +- .../driver/mapping/MapperNestedUDTTest.java | 2 +- .../datastax/driver/mapping/MapperOptionTest.java | 2 +- .../driver/mapping/MapperPolymorphismTest.java | 2 +- .../mapping/MapperPrimitiveTypes22Test.java | 2 +- .../driver/mapping/MapperPrimitiveTypesTest.java | 2 +- .../driver/mapping/MapperReconnectionTest.java | 2 +- .../driver/mapping/MapperSaveNullFieldsTest.java | 2 +- .../com/datastax/driver/mapping/MapperTest.java | 2 +- .../driver/mapping/MapperUDTCollectionsTest.java | 2 +- .../datastax/driver/mapping/MapperUDTTest.java | 2 +- ...ingConfigurationHierarchyScanStrategyTest.java | 2 +- .../MappingConfigurationNamingStrategyTest.java | 2 +- .../MappingConfigurationPropertyAccessTest.java | 2 +- ...appingConfigurationTransienceStrategyTest.java | 2 +- .../MappingConfigurationTransientTest.java | 2 +- .../driver/mapping/NamingConventionsTest.java | 2 +- .../driver/mapping/SyntheticFieldsMapperTest.java | 2 +- .../driver/mapping/UDTFieldMapperTest.java | 2 +- .../src/test/resources/log4j.properties | 2 +- driver-tests/osgi/pom.xml | 2 +- .../driver/osgi/api/MailboxException.java | 2 +- .../datastax/driver/osgi/api/MailboxMessage.java | 2 +- .../datastax/driver/osgi/api/MailboxService.java | 2 +- .../com/datastax/driver/osgi/impl/Activator.java | 2 +- .../datastax/driver/osgi/impl/MailboxImpl.java | 2 +- .../com/datastax/driver/osgi/BundleOptions.java | 2 +- .../datastax/driver/osgi/CCMBridgeListener.java | 2 +- .../driver/osgi/MailboxServiceDefaultIT.java | 2 +- .../driver/osgi/MailboxServiceGuava17IT.java | 2 +- .../driver/osgi/MailboxServiceGuava18IT.java | 2 +- .../driver/osgi/MailboxServiceGuava19IT.java | 2 +- .../driver/osgi/MailboxServiceGuava20IT.java | 2 +- .../driver/osgi/MailboxServiceGuava21IT.java | 2 +- .../driver/osgi/MailboxServiceHdrHistogramIT.java | 2 +- .../datastax/driver/osgi/MailboxServiceLZ4IT.java | 2 +- .../driver/osgi/MailboxServiceShadedIT.java | 2 +- .../driver/osgi/MailboxServiceSnappyIT.java | 2 +- .../datastax/driver/osgi/MailboxServiceTests.java | 2 +- .../osgi/src/test/resources/exam.properties | 2 +- driver-tests/osgi/src/test/resources/logback.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- .../com/datastax/driver/core/NettyUtilIT.java | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- .../com/datastax/driver/core/NettyUtilIT.java | 2 +- driver-tests/stress/pom.xml | 2 +- .../driver/stress/AsynchronousConsumer.java | 2 +- .../datastax/driver/stress/BlockingConsumer.java | 2 +- .../driver/stress/ConsistencyLevelConverter.java | 2 +- .../java/com/datastax/driver/stress/Consumer.java | 2 +- .../com/datastax/driver/stress/Generators.java | 2 +- .../datastax/driver/stress/QueryGenerator.java | 2 +- .../java/com/datastax/driver/stress/Reporter.java | 2 +- .../java/com/datastax/driver/stress/Stress.java | 2 +- pom.xml | 4 ++-- 677 files changed, 692 insertions(+), 676 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 67017998db1..fcd718c395a 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -13,6 +13,7 @@ - [new feature] JAVA-1229: Allow specifying the keyspace for individual queries. - [improvement] JAVA-1682: Provide a way to record latencies for cancelled speculative executions. - [improvement] JAVA-1717: Add metrics to latency-aware policy. +- [improvement] JAVA-1675: Remove dates from copyright headers. Merged from 3.3.x: diff --git a/driver-core/pom.xml b/driver-core/pom.xml index c773c3ee7c8..173c1f244f6 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -1,6 +1,6 @@ -[Metrics]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.html \ No newline at end of file +[Metrics]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Metrics.html \ No newline at end of file diff --git a/manual/native_protocol/README.md b/manual/native_protocol/README.md index be945e75664..fbab41473f2 100644 --- a/manual/native_protocol/README.md +++ b/manual/native_protocol/README.md @@ -63,7 +63,7 @@ All host(s) tried for query failed [/127.0.0.1:9042] Host /127.0.0.1:9042 does not support protocol version V3 but V2)) ``` -[gpv]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- +[gpv]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- #### Protocol version with mixed clusters @@ -94,19 +94,19 @@ To avoid this issue, you can use one the following workarounds: #### v1 to v2 * bound variables in simple statements - ([Session#execute(String, Object...)](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-java.lang.String-java.lang.Object...-)) -* [batch statements](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html) + ([Session#execute(String, Object...)](http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Session.html#execute-java.lang.String-java.lang.Object...-)) +* [batch statements](http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/BatchStatement.html) * [query paging](../paging/) #### v2 to v3 * the number of stream ids per connection goes from 128 to 32768 (see [Connection pooling](../pooling/)) -* [serial consistency on batch statements](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html#setSerialConsistencyLevel-com.datastax.driver.core.ConsistencyLevel-) +* [serial consistency on batch statements](http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/BatchStatement.html#setSerialConsistencyLevel-com.datastax.driver.core.ConsistencyLevel-) * [client-side timestamps](../query_timestamps/) #### v3 to v4 -* [query warnings](http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ExecutionInfo.html#getWarnings--) +* [query warnings](http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ExecutionInfo.html#getWarnings--) * allowed unset values in bound statements * [Custom payloads](../custom_payloads/) diff --git a/manual/object_mapper/README.md b/manual/object_mapper/README.md index 08e5f18797a..4c51d6b442b 100644 --- a/manual/object_mapper/README.md +++ b/manual/object_mapper/README.md @@ -11,7 +11,7 @@ The mapper is published as a separate Maven artifact: com.datastax.cassandra cassandra-driver-mapping - 3.3.0 + 3.4.0 ``` diff --git a/manual/object_mapper/creating/README.md b/manual/object_mapper/creating/README.md index cbb14bf2244..ed74cee44f5 100644 --- a/manual/object_mapper/creating/README.md +++ b/manual/object_mapper/creating/README.md @@ -149,9 +149,9 @@ User user = new User() .setName("John Doe"); ``` -[table]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Table.html +[table]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Table.html [case-sensitive]:http://docs.datastax.com/en/cql/3.3/cql/cql_reference/ucase-lcase_r.html -[consistency level]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ConsistencyLevel.html +[consistency level]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ConsistencyLevel.html [java-beans]:https://docs.oracle.com/javase/tutorial/javabeans/writing/properties.html [set-accessible]:https://docs.oracle.com/javase/8/docs/api/java/lang/reflect/AccessibleObject.html#setAccessible-boolean- @@ -189,7 +189,7 @@ CREATE TABLE users(id uuid PRIMARY KEY, "userName" text); private String userName; ``` -[column]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Column.html +[column]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Column.html #### Primary key fields @@ -213,8 +213,8 @@ private String areaCode; The order of the indices must match that of the columns in the table declaration. -[pk]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/PartitionKey.html -[cc]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/ClusteringColumn.html +[pk]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/PartitionKey.html +[cc]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/ClusteringColumn.html [pks]:http://thelastpickle.com/blog/2013/01/11/primary-keys-in-cql.html #### Computed fields @@ -250,7 +250,7 @@ version (see [JAVA-832](https://datastax-oss.atlassian.net/browse/JAVA-832)). [User Defined Functions]:http://www.planetcassandra.org/blog/user-defined-functions-in-cassandra-3-0/ -[computed]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Computed.html +[computed]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Computed.html #### Transient properties @@ -259,7 +259,7 @@ to table columns. [@Transient][transient] can be used to prevent a field or a Java bean property from being mapped. Like other column-level annotations, it should be placed on either the field declaration or the property getter method. -[transient]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Transient.html +[transient]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Transient.html ### Mapping User Types @@ -322,8 +322,8 @@ This also works with UDTs inside collections or other UDTs, with any arbitrary nesting level. [User Defined Types]: ../../udts/ -[udt]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/UDT.html -[field]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Field.html +[udt]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/UDT.html +[field]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Field.html ### Mapping collections @@ -359,9 +359,9 @@ private Map> frozenKeyValueMap; private Map> frozenValueMap; ``` -[frozen]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Frozen.html -[frozenkey]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/FrozenKey.html -[frozenvalue]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/FrozenValue.html +[frozen]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Frozen.html +[frozenkey]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/FrozenKey.html +[frozenvalue]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/FrozenValue.html ### Polymorphism support diff --git a/manual/object_mapper/custom_codecs/README.md b/manual/object_mapper/custom_codecs/README.md index 148164ad115..d8ab8880add 100644 --- a/manual/object_mapper/custom_codecs/README.md +++ b/manual/object_mapper/custom_codecs/README.md @@ -98,9 +98,9 @@ instance (one per column) and cache it for future use. This also works with [@Field][field] and [@Param][param] annotations. -[column]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Column.html -[field]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Field.html -[param]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Param.html +[column]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Column.html +[field]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Field.html +[param]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Param.html ## Implicit UDT codecs diff --git a/manual/object_mapper/using/README.md b/manual/object_mapper/using/README.md index d802378a28a..175e3dd7d1b 100644 --- a/manual/object_mapper/using/README.md +++ b/manual/object_mapper/using/README.md @@ -28,9 +28,9 @@ Mapper mapper = manager.mapper(User.class); calling `manager#mapper` more than once for the same class will return the previously generated mapper. -[Mapper]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/Mapper.html -[MappingManager]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/MappingManager.html -[Session]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html +[Mapper]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/Mapper.html +[MappingManager]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/MappingManager.html +[Session]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Session.html #### Basic CRUD operations @@ -179,7 +179,7 @@ It provides methods `one()`, `all()`, `iterator()`, `getExecutionInfo()` and `isExhausted()`. Note that iterating the `Result` will consume the `ResultSet`, and vice-versa. -[Result]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/Result.html +[Result]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/Result.html ### Accessors @@ -229,7 +229,7 @@ corresponds to which marker: ResultSet insert(@Param("u") UUID userId, @Param("n") String name); ``` -[param]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Param.html +[param]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/Param.html If a method argument is a Java enumeration, it must be annotated with `@Enumerated` to indicate how to convert it to a CQL type (the rules are @@ -297,7 +297,7 @@ query with the annotation [@QueryParameters]. Then, options like public ListenableFuture> getAllAsync(); ``` -[@QueryParameters]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/QueryParameters.html +[@QueryParameters]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/annotations/QueryParameters.html ### Mapping configuration @@ -341,6 +341,6 @@ PropertyMapper propertyMapper = new DefaultPropertyMapper() There is more to `DefaultPropertyMapper`; see the Javadocs and implementation for details. -[MappingConfiguration]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/MappingConfiguration.html -[PropertyMapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/PropertyMapper.html -[DefaultPropertyMapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/DefaultPropertyMapper.html +[MappingConfiguration]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/MappingConfiguration.html +[PropertyMapper]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/PropertyMapper.html +[DefaultPropertyMapper]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/mapping/DefaultPropertyMapper.html diff --git a/manual/paging/README.md b/manual/paging/README.md index 915600d8099..0e5d8b4406e 100644 --- a/manual/paging/README.md +++ b/manual/paging/README.md @@ -176,8 +176,8 @@ if (nextPage != null) { } ``` -[result_set]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSet.html -[paging_state]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PagingState.html +[result_set]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ResultSet.html +[paging_state]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PagingState.html Due to internal implementation details, `PagingState` instances are not diff --git a/manual/pooling/README.md b/manual/pooling/README.md index f8dbd94bd27..16dc75424da 100644 --- a/manual/pooling/README.md +++ b/manual/pooling/README.md @@ -283,16 +283,16 @@ either: [newConnectionThreshold][nct] so that enough connections are added by the time you reach the bottleneck. -[result_set_future]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ResultSetFuture.html -[pooling_options]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html -[lbp]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LoadBalancingPolicy.html -[nct]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setNewConnectionThreshold-com.datastax.driver.core.HostDistance-int- -[mrpc]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setMaxRequestsPerConnection-com.datastax.driver.core.HostDistance-int- -[sits]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setIdleTimeoutSeconds-int- -[rtm]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#getReadTimeoutMillis-- -[smqs]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setMaxQueueSize-int- -[sptm]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PoolingOptions.html#setPoolTimeoutMillis-int- -[nhae]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html -[getErrors]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- -[get_state]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#getState-- -[BusyPoolException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/BusyPoolException.html +[result_set_future]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ResultSetFuture.html +[pooling_options]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PoolingOptions.html +[lbp]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/LoadBalancingPolicy.html +[nct]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PoolingOptions.html#setNewConnectionThreshold-com.datastax.driver.core.HostDistance-int- +[mrpc]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PoolingOptions.html#setMaxRequestsPerConnection-com.datastax.driver.core.HostDistance-int- +[sits]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PoolingOptions.html#setIdleTimeoutSeconds-int- +[rtm]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#getReadTimeoutMillis-- +[smqs]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PoolingOptions.html#setMaxQueueSize-int- +[sptm]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PoolingOptions.html#setPoolTimeoutMillis-int- +[nhae]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[getErrors]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- +[get_state]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Session.html#getState-- +[BusyPoolException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/BusyPoolException.html diff --git a/manual/query_timestamps/README.md b/manual/query_timestamps/README.md index cb3f4dce9cf..8f7652bbb15 100644 --- a/manual/query_timestamps/README.md +++ b/manual/query_timestamps/README.md @@ -140,10 +140,10 @@ following: Steps 2 and 3 only apply if native protocol v3 or above is in use. -[TimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TimestampGenerator.html -[AtomicMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html -[ThreadLocalMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.html -[ServerSideTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ServerSideTimestampGenerator.html +[TimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/TimestampGenerator.html +[AtomicMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/AtomicMonotonicTimestampGenerator.html +[ThreadLocalMonotonicTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ThreadLocalMonotonicTimestampGenerator.html +[ServerSideTimestampGenerator]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ServerSideTimestampGenerator.html [gettimeofday]: http://man7.org/linux/man-pages/man2/settimeofday.2.html [JNR]: https://github.com/jnr/jnr-ffi diff --git a/manual/reconnection/README.md b/manual/reconnection/README.md index ccd4598a309..4cbe8e1c975 100644 --- a/manual/reconnection/README.md +++ b/manual/reconnection/README.md @@ -8,4 +8,4 @@ TODO cover: - scheduled reconnections vs. gossip events --> -[ReconnectionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ReconnectionPolicy.html \ No newline at end of file +[ReconnectionPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/ReconnectionPolicy.html \ No newline at end of file diff --git a/manual/retries/README.md b/manual/retries/README.md index a11adb93828..f86d20fe8d0 100644 --- a/manual/retries/README.md +++ b/manual/retries/README.md @@ -146,33 +146,33 @@ implementations to handle idempotence (the new behavior is equivalent to what yo `IdempotenceAwareRetryPolicy` before). -[RetryDecision]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html -[retry()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#retry-com.datastax.driver.core.ConsistencyLevel- -[tryNextHost()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#tryNextHost-com.datastax.driver.core.ConsistencyLevel- -[rethrow()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#rethrow-- -[ignore()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#ignore-- -[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html -[getErrors()]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- -[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html -[DefaultRetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html -[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- -[onWriteTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onWriteTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.WriteType-int-int-int- -[onUnavailable]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onUnavailable-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-int- -[onRequestError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- -[UnavailableException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/UnavailableException.html -[ReadTimeoutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ReadTimeoutException.html -[WriteTimeoutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/WriteTimeoutException.html -[OverloadedException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OverloadedException.html -[ServerError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ServerError.html -[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OperationTimedOutException.html -[ConnectionException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/ConnectionException.html -[QueryValidationException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/QueryValidationException.html -[InvalidQueryException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/InvalidQueryException.html -[InvalidConfigurationInQueryException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.html -[UnauthorizedException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/UnauthorizedException.html -[SyntaxError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/SyntaxError.html -[AlreadyExistsException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/AlreadyExistsException.html -[TruncateException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/TruncateException.html +[RetryDecision]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html +[retry()]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#retry-com.datastax.driver.core.ConsistencyLevel- +[tryNextHost()]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#tryNextHost-com.datastax.driver.core.ConsistencyLevel- +[rethrow()]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#rethrow-- +[ignore()]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.RetryDecision.html#ignore-- +[NoHostAvailableException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/NoHostAvailableException.html +[getErrors()]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/NoHostAvailableException.html#getErrors-- +[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.html +[DefaultRetryPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/DefaultRetryPolicy.html +[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- +[onWriteTimeout]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onWriteTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.WriteType-int-int-int- +[onUnavailable]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onUnavailable-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-int- +[onRequestError]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/DefaultRetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- +[UnavailableException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/UnavailableException.html +[ReadTimeoutException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/ReadTimeoutException.html +[WriteTimeoutException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/WriteTimeoutException.html +[OverloadedException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/OverloadedException.html +[ServerError]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/ServerError.html +[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/OperationTimedOutException.html +[ConnectionException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/ConnectionException.html +[QueryValidationException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/QueryValidationException.html +[InvalidQueryException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/InvalidQueryException.html +[InvalidConfigurationInQueryException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/InvalidConfigurationInQueryException.html +[UnauthorizedException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/UnauthorizedException.html +[SyntaxError]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/SyntaxError.html +[AlreadyExistsException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/AlreadyExistsException.html +[TruncateException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/TruncateException.html [query plan]: ../load_balancing/#query-plan [connection pool]: ../pooling/ diff --git a/manual/shaded_jar/README.md b/manual/shaded_jar/README.md index 6319c1a10fb..834d2fdc433 100644 --- a/manual/shaded_jar/README.md +++ b/manual/shaded_jar/README.md @@ -12,7 +12,7 @@ package name: com.datastax.cassandra cassandra-driver-core - 3.3.0 + 3.4.0 shaded @@ -32,7 +32,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-core - 3.3.0 + 3.4.0 shaded @@ -44,7 +44,7 @@ non-shaded JAR: com.datastax.cassandra cassandra-driver-mapping - 3.3.0 + 3.4.0 com.datastax.cassandra @@ -74,5 +74,5 @@ detects that shaded Netty classes are being used: Detected shaded Netty classes in the classpath; native epoll transport will not work properly, defaulting to NIO. -[NettyOptions]:http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/NettyOptions.html +[NettyOptions]:http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/NettyOptions.html [Netty native transports]:http://netty.io/wiki/native-transports.html diff --git a/manual/socket_options/README.md b/manual/socket_options/README.md index 8a0defd87e7..e822d20854c 100644 --- a/manual/socket_options/README.md +++ b/manual/socket_options/README.md @@ -117,15 +117,15 @@ To clarify: We might rename `SocketOptions.setReadTimeoutMillis` in a future version to clear up any confusion. -[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html -[setReadTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReadTimeoutMillis-int- -[setConnectTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setConnectTimeoutMillis-int- -[setKeepAlive]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setKeepAlive-boolean- -[setReceiveBufferSize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReceiveBufferSize-int- -[setReuseAddress]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setReuseAddress-boolean- -[setSendBufferSize]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setSendBufferSize-int- -[setSoLinger]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setSoLinger-int- -[setTcpNoDelay]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SocketOptions.html#setTcpNoDelay-boolean- -[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- -[onRequestError]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- -[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/exceptions/OperationTimedOutException.html \ No newline at end of file +[SocketOptions]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html +[setReadTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#setReadTimeoutMillis-int- +[setConnectTimeoutMillis]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#setConnectTimeoutMillis-int- +[setKeepAlive]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#setKeepAlive-boolean- +[setReceiveBufferSize]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#setReceiveBufferSize-int- +[setReuseAddress]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#setReuseAddress-boolean- +[setSendBufferSize]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#setSendBufferSize-int- +[setSoLinger]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#setSoLinger-int- +[setTcpNoDelay]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SocketOptions.html#setTcpNoDelay-boolean- +[onReadTimeout]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.html#onReadTimeout-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-int-int-boolean-int- +[onRequestError]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.html#onRequestError-com.datastax.driver.core.Statement-com.datastax.driver.core.ConsistencyLevel-com.datastax.driver.core.exceptions.DriverException-int- +[OperationTimedOutException]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/exceptions/OperationTimedOutException.html \ No newline at end of file diff --git a/manual/speculative_execution/README.md b/manual/speculative_execution/README.md index ceecc2a0f3b..38af43c2d7f 100644 --- a/manual/speculative_execution/README.md +++ b/manual/speculative_execution/README.md @@ -73,7 +73,7 @@ Speculative executions are controlled by an instance of `Cluster`. This policy defines the threshold after which a new speculative execution will be triggered. -[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html +[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html Two implementations are provided with the driver: @@ -101,7 +101,7 @@ way: * if no response has been received at t0 + 1000 milliseconds, start another speculative execution on a third node. -[ConstantSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html +[ConstantSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/ConstantSpeculativeExecutionPolicy.html #### [PercentileSpeculativeExecutionPolicy] @@ -160,10 +160,10 @@ Note that `PercentileTracker` may also be used with a slow query logger (see the [Logging](../logging/) section). In that case, you would create a single tracker object and share it with both components. -[PercentileSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html -[PercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PercentileTracker.html -[ClusterWidePercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ClusterWidePercentileTracker.html -[PerHostPercentileTracker]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PerHostPercentileTracker.html +[PercentileSpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/PercentileSpeculativeExecutionPolicy.html +[PercentileTracker]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PercentileTracker.html +[ClusterWidePercentileTracker]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ClusterWidePercentileTracker.html +[PerHostPercentileTracker]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PerHostPercentileTracker.html [hdr]: http://hdrhistogram.github.io/HdrHistogram/ #### Using your own @@ -210,7 +210,7 @@ client driver exec1 exec2 The only impact is that all executions of the same query always share the same query plan, so each host will be used by at most one execution. -[retry_policy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html +[retry_policy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.html ### Tuning and practical details @@ -225,8 +225,8 @@ You can monitor how many speculative executions were triggered with the It should only be a few percents of the total number of requests ([cluster.getMetrics().getRequestsTimer().getCount()][request_metric]). -[se_metric]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.Errors.html#getSpeculativeExecutions-- -[request_metric]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Metrics.html#getRequestsTimer-- +[se_metric]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Metrics.Errors.html#getSpeculativeExecutions-- +[request_metric]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Metrics.html#getRequestsTimer-- #### Stream id exhaustion @@ -255,8 +255,8 @@ sustained. If you're unsure of which native protocol version you're using, you can check with [cluster.getConfiguration().getProtocolOptions().getProtocolVersion()][protocol_version]. -[session_state]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.State.html -[protocol_version]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- +[session_state]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Session.State.html +[protocol_version]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/ProtocolOptions.html#getProtocolVersion-- #### Request ordering and client timestamps diff --git a/manual/ssl/README.md b/manual/ssl/README.md index 59249b586c2..1e8244d037e 100644 --- a/manual/ssl/README.md +++ b/manual/ssl/README.md @@ -185,8 +185,8 @@ Cluster cluster = Cluster.builder() .build(); ``` -[RemoteEndpointAwareSSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.html -[RemoteEndpointAwareJdkSSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html -[newSSLEngine]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html#newSSLEngine-io.netty.channel.socket.SocketChannel-java.net.InetSocketAddress- -[RemoteEndpointAwareNettySSLOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.html -[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/NettyOptions.html +[RemoteEndpointAwareSSLOptions]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/RemoteEndpointAwareSSLOptions.html +[RemoteEndpointAwareJdkSSLOptions]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html +[newSSLEngine]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/RemoteEndpointAwareJdkSSLOptions.html#newSSLEngine-io.netty.channel.socket.SocketChannel-java.net.InetSocketAddress- +[RemoteEndpointAwareNettySSLOptions]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/RemoteEndpointAwareNettySSLOptions.html +[NettyOptions]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/NettyOptions.html diff --git a/manual/statements/README.md b/manual/statements/README.md index 6efd14ce104..4e687abfc06 100644 --- a/manual/statements/README.md +++ b/manual/statements/README.md @@ -32,11 +32,11 @@ If you use custom policies ([RetryPolicy], [LoadBalancingPolicy], properties that influence statement execution. To achieve this, you can wrap your statements in a custom [StatementWrapper] implementation. -[Statement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Statement.html -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/QueryBuilder.html -[StatementWrapper]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/StatementWrapper.html -[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/RetryPolicy.html -[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/LoadBalancingPolicy.html -[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html -[execute]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- -[executeAsync]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- +[Statement]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Statement.html +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/querybuilder/QueryBuilder.html +[StatementWrapper]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/StatementWrapper.html +[RetryPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/RetryPolicy.html +[LoadBalancingPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/LoadBalancingPolicy.html +[SpeculativeExecutionPolicy]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/policies/SpeculativeExecutionPolicy.html +[execute]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- +[executeAsync]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- diff --git a/manual/statements/batch/README.md b/manual/statements/batch/README.md index 5f3b7930c32..42ad8ccb3c0 100644 --- a/manual/statements/batch/README.md +++ b/manual/statements/batch/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [BatchStatement].* -[BatchStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BatchStatement.html +[BatchStatement]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/BatchStatement.html diff --git a/manual/statements/built/README.md b/manual/statements/built/README.md index 405aa9d2161..a54ea218089 100644 --- a/manual/statements/built/README.md +++ b/manual/statements/built/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [QueryBuilder].* -[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/querybuilder/QueryBuilder.html \ No newline at end of file +[QueryBuilder]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/querybuilder/QueryBuilder.html \ No newline at end of file diff --git a/manual/statements/prepared/README.md b/manual/statements/prepared/README.md index e6d351d07a8..8f255790c8c 100644 --- a/manual/statements/prepared/README.md +++ b/manual/statements/prepared/README.md @@ -256,11 +256,11 @@ relying on `SELECT *`. This will be addressed in a future release of both Cassandra and the driver. Follow [CASSANDRA-10786] and [JAVA-1196] for more information. -[PreparedStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/PreparedStatement.html -[BoundStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/BoundStatement.html -[setPrepareOnAllHosts]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setPrepareOnAllHosts-boolean- -[setReprepareOnUp]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/QueryOptions.html#setReprepareOnUp-boolean- -[execute]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- -[executeAsync]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- +[PreparedStatement]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/PreparedStatement.html +[BoundStatement]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/BoundStatement.html +[setPrepareOnAllHosts]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/QueryOptions.html#setPrepareOnAllHosts-boolean- +[setReprepareOnUp]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/QueryOptions.html#setReprepareOnUp-boolean- +[execute]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Session.html#execute-com.datastax.driver.core.Statement- +[executeAsync]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Session.html#executeAsync-com.datastax.driver.core.Statement- [CASSANDRA-10786]: https://issues.apache.org/jira/browse/CASSANDRA-10786 [JAVA-1196]: https://datastax-oss.atlassian.net/browse/JAVA-1196 diff --git a/manual/statements/simple/README.md b/manual/statements/simple/README.md index 9967b0e4bf3..7740d40b42f 100644 --- a/manual/statements/simple/README.md +++ b/manual/statements/simple/README.md @@ -128,4 +128,4 @@ session.execute( 1, bytes); ``` -[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/SimpleStatement.html +[SimpleStatement]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/SimpleStatement.html diff --git a/manual/tuples/README.md b/manual/tuples/README.md index 345bcc517ff..276d3ff2dc9 100644 --- a/manual/tuples/README.md +++ b/manual/tuples/README.md @@ -96,7 +96,7 @@ bs.setList("l", Arrays.asList(oneTimeUsageTuple.newValue("1", "1"), oneTimeUsage session.execute(bs); ``` -[TupleType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html -[TupleValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleValue.html -[newValueVararg]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-java.lang.Object...- -[newValue]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/TupleType.html#newValue-- +[TupleType]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/TupleType.html +[TupleValue]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/TupleValue.html +[newValueVararg]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/TupleType.html#newValue-java.lang.Object...- +[newValue]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/TupleType.html#newValue-- diff --git a/manual/udts/README.md b/manual/udts/README.md index 760b87e9321..478c919c691 100644 --- a/manual/udts/README.md +++ b/manual/udts/README.md @@ -2,4 +2,4 @@ *Coming soon... In the meantime, see the javadoc for [UserType].* -[UserType]: http://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/core/UserType.html \ No newline at end of file +[UserType]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/UserType.html \ No newline at end of file diff --git a/pom.xml b/pom.xml index 61bca0bf56c..bbeb75bdb53 100644 --- a/pom.xml +++ b/pom.xml @@ -631,7 +631,7 @@ - 3.3.0 + 3.3.2 ../clirr-ignores.xml com/datastax/shaded/** From 2eba90ec83d20149a4160c6a45ea86917e0e3545 Mon Sep 17 00:00:00 2001 From: olim7t Date: Thu, 18 Jan 2018 14:12:25 -0800 Subject: [PATCH 194/512] [maven-release-plugin] prepare release 3.4.0 --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 173c1f244f6..0e66fd1ce39 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index bf96c3bae87..d8a1efed7bf 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index 6c3f858195b..b162e279ef0 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 0ef852735ac..84d63c7d6d0 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index da78cb6db2e..5b79bd71fbe 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 04d181035f2..6d1b2d120b4 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index 6b2adbf3f4c..d5bc9157dac 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index 9f089fa7e03..a0a431284d2 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0-SNAPSHOT + 3.4.0 pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index f943aa80c2a..e8fc3ad554d 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index 11188fa9574..d8edd06498e 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index e6940e2e52e..e3fb66c90cb 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0-SNAPSHOT + 3.4.0 cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index bbeb75bdb53..735005db35e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0-SNAPSHOT + 3.4.0 pom DataStax Java Driver for Apache Cassandra @@ -1076,7 +1076,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - HEAD + 3.4.0 From c73e5a288f564c4c410a4ac2b34c597bb86b0813 Mon Sep 17 00:00:00 2001 From: olim7t Date: Thu, 18 Jan 2018 14:12:35 -0800 Subject: [PATCH 195/512] [maven-release-plugin] prepare for next development iteration --- driver-core/pom.xml | 2 +- driver-dist/pom.xml | 2 +- driver-examples/pom.xml | 2 +- driver-extras/pom.xml | 2 +- driver-mapping/pom.xml | 2 +- driver-tests/osgi/pom.xml | 2 +- driver-tests/pom.xml | 2 +- driver-tests/shading/pom.xml | 2 +- driver-tests/shading/shaded/pom.xml | 2 +- driver-tests/shading/unshaded/pom.xml | 2 +- driver-tests/stress/pom.xml | 2 +- pom.xml | 4 ++-- 12 files changed, 13 insertions(+), 13 deletions(-) diff --git a/driver-core/pom.xml b/driver-core/pom.xml index 0e66fd1ce39..b38c8338152 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-core diff --git a/driver-dist/pom.xml b/driver-dist/pom.xml index d8a1efed7bf..358ab1e6907 100644 --- a/driver-dist/pom.xml +++ b/driver-dist/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-dist diff --git a/driver-examples/pom.xml b/driver-examples/pom.xml index b162e279ef0..3f6338ce082 100644 --- a/driver-examples/pom.xml +++ b/driver-examples/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-examples diff --git a/driver-extras/pom.xml b/driver-extras/pom.xml index 84d63c7d6d0..2c969a60b13 100644 --- a/driver-extras/pom.xml +++ b/driver-extras/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-extras diff --git a/driver-mapping/pom.xml b/driver-mapping/pom.xml index 5b79bd71fbe..8ba0dbb51af 100644 --- a/driver-mapping/pom.xml +++ b/driver-mapping/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-mapping diff --git a/driver-tests/osgi/pom.xml b/driver-tests/osgi/pom.xml index 6d1b2d120b4..b2b6a3b3735 100644 --- a/driver-tests/osgi/pom.xml +++ b/driver-tests/osgi/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-tests-osgi diff --git a/driver-tests/pom.xml b/driver-tests/pom.xml index d5bc9157dac..8aeb2da4cca 100644 --- a/driver-tests/pom.xml +++ b/driver-tests/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-tests-parent diff --git a/driver-tests/shading/pom.xml b/driver-tests/shading/pom.xml index a0a431284d2..36325c83651 100644 --- a/driver-tests/shading/pom.xml +++ b/driver-tests/shading/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0 + 3.4.1-SNAPSHOT pom diff --git a/driver-tests/shading/shaded/pom.xml b/driver-tests/shading/shaded/pom.xml index e8fc3ad554d..033a679fc55 100644 --- a/driver-tests/shading/shaded/pom.xml +++ b/driver-tests/shading/shaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-tests-shading-shaded diff --git a/driver-tests/shading/unshaded/pom.xml b/driver-tests/shading/unshaded/pom.xml index d8edd06498e..c0765ca9ec4 100644 --- a/driver-tests/shading/unshaded/pom.xml +++ b/driver-tests/shading/unshaded/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-shading - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-tests-shading-unshaded diff --git a/driver-tests/stress/pom.xml b/driver-tests/stress/pom.xml index e3fb66c90cb..e6c09cac0c8 100644 --- a/driver-tests/stress/pom.xml +++ b/driver-tests/stress/pom.xml @@ -22,7 +22,7 @@ com.datastax.cassandra cassandra-driver-tests-parent - 3.4.0 + 3.4.1-SNAPSHOT cassandra-driver-tests-stress diff --git a/pom.xml b/pom.xml index 735005db35e..3f4c5c92a98 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.datastax.cassandra cassandra-driver-parent - 3.4.0 + 3.4.1-SNAPSHOT pom DataStax Java Driver for Apache Cassandra @@ -1076,7 +1076,7 @@ limitations under the License. scm:git:git@github.com:datastax/java-driver.git scm:git:git@github.com:datastax/java-driver.git https://github.com/datastax/java-driver - 3.4.0 + HEAD From 57724bd63c3038e3728260c7640abcea06f33b86 Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Tue, 23 Jan 2018 22:33:26 -0600 Subject: [PATCH 196/512] Skip tests that require COMPACT STORAGE if C* >= 4.0 --- .../datastax/driver/core/CustomTypeTest.java | 37 ++++++++++++------- .../driver/core/TableMetadataTest.java | 4 ++ .../com/datastax/driver/core/TestUtils.java | 11 ++++++ 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/driver-core/src/test/java/com/datastax/driver/core/CustomTypeTest.java b/driver-core/src/test/java/com/datastax/driver/core/CustomTypeTest.java index ea1e466c1cc..91535ce6625 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CustomTypeTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CustomTypeTest.java @@ -16,6 +16,7 @@ package com.datastax.driver.core; import com.datastax.driver.core.utils.CassandraVersion; +import org.testng.SkipException; import org.testng.annotations.Test; import java.nio.ByteBuffer; @@ -45,20 +46,25 @@ public class CustomTypeTest extends CCMTestsSupport { @Override public void onTestContextInitialized() { - execute( - "CREATE TABLE test (" - + " k int," - + " c1 'DynamicCompositeType(s => UTF8Type, i => Int32Type)'," - + " c2 'ReversedType(CompositeType(UTF8Type, Int32Type))'," // reversed translates to CLUSTERING ORDER BY DESC - + " c3 'Int32Type'," // translates to int - + " PRIMARY KEY (k, c1, c2)" - + ") WITH COMPACT STORAGE", - "CREATE TABLE test_collection(" - + " k int PRIMARY KEY," - + " c1 list<'DynamicCompositeType(s => UTF8Type, i => Int32Type)'>," - + " c2 map<'DynamicCompositeType(s => UTF8Type, i => Int32Type)', 'DynamicCompositeType(s => UTF8Type, i => Int32Type)'>" - + ")" - ); + try { + TestUtils.compactStorageSupportCheck(ccm()); + execute( + "CREATE TABLE test (" + + " k int," + + " c1 'DynamicCompositeType(s => UTF8Type, i => Int32Type)'," + + " c2 'ReversedType(CompositeType(UTF8Type, Int32Type))'," // reversed translates to CLUSTERING ORDER BY DESC + + " c3 'Int32Type'," // translates to int + + " PRIMARY KEY (k, c1, c2)" + + ") WITH COMPACT STORAGE", + "CREATE TABLE test_collection(" + + " k int PRIMARY KEY," + + " c1 list<'DynamicCompositeType(s => UTF8Type, i => Int32Type)'>," + + " c2 map<'DynamicCompositeType(s => UTF8Type, i => Int32Type)', 'DynamicCompositeType(s => UTF8Type, i => Int32Type)'>" + + ")" + ); + } catch (SkipException e) { + // no op, tests will be skipped. + } } /** @@ -75,6 +81,7 @@ public void onTestContextInitialized() { */ @Test(groups = "short") public void should_serialize_and_deserialize_custom_types() { + TestUtils.compactStorageSupportCheck(ccm()); TableMetadata table = cluster().getMetadata().getKeyspace(keyspace).getTable("test"); @@ -120,6 +127,7 @@ public void should_serialize_and_deserialize_custom_types() { */ @Test(groups = "short") public void should_serialize_and_deserialize_collections_of_custom_types() { + TestUtils.compactStorageSupportCheck(ccm()); TableMetadata table = cluster().getMetadata().getKeyspace(keyspace).getTable("test_collection"); assertThat(table.getColumn("c1")).hasType(DataType.list(CUSTOM_DYNAMIC_COMPOSITE)); assertThat(table.getColumn("c2")).hasType(DataType.map(CUSTOM_DYNAMIC_COMPOSITE, CUSTOM_DYNAMIC_COMPOSITE)); @@ -154,6 +162,7 @@ public void should_serialize_and_deserialize_collections_of_custom_types() { @Test(groups = "short") @CassandraVersion("2.1.0") public void should_handle_udt_with_custom_type() { + TestUtils.compactStorageSupportCheck(ccm()); // Given: a UDT with custom types, and a table using it. session().execute("CREATE TYPE custom_udt (regular int, c1 'DynamicCompositeType(s => UTF8Type, i => Int32Type)', c2 'LongType')"); session().execute("CREATE TABLE custom_udt_tbl (k int primary key, v frozen)"); diff --git a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataTest.java b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataTest.java index 58ddf2abdb9..5ded7a07c73 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TableMetadataTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TableMetadataTest.java @@ -93,6 +93,7 @@ public void should_parse_counter_table() { @Test(groups = "short") public void should_parse_compact_static_table() { + TestUtils.compactStorageSupportCheck(ccm()); // given String cql = String.format("CREATE TABLE %s.compact_static (\n" + " k text,\n" @@ -114,6 +115,7 @@ public void should_parse_compact_static_table() { @Test(groups = "short") public void should_parse_dense_table() { + TestUtils.compactStorageSupportCheck(ccm()); // given String cql = String.format("CREATE TABLE %s.dense (\n" + " k int,\n" @@ -131,6 +133,7 @@ public void should_parse_dense_table() { @Test(groups = "short") public void should_parse_compact_dynamic_table() { + TestUtils.compactStorageSupportCheck(ccm()); // given String cql = String.format("CREATE TABLE %s.compact_dynamic (\n" + " k text,\n" @@ -150,6 +153,7 @@ public void should_parse_compact_dynamic_table() { @Test(groups = "short") public void should_parse_compact_table_with_multiple_clustering_columns() { + TestUtils.compactStorageSupportCheck(ccm()); // given String cql = String.format("CREATE TABLE %s.compact_composite (\n" + " k text,\n" diff --git a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java index 1b4916b679b..76795e43288 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java +++ b/driver-core/src/test/java/com/datastax/driver/core/TestUtils.java @@ -39,6 +39,7 @@ import java.util.*; import java.util.concurrent.*; import java.util.concurrent.atomic.AtomicInteger; +import org.testng.SkipException; import static com.datastax.driver.core.ConditionChecker.check; import static java.util.concurrent.TimeUnit.MINUTES; @@ -932,4 +933,14 @@ public static Level setLogLevel(String logger, Level newLevel) { return oldLevel; } + /** + * Throws a {@link SkipException} if the input {@link CCMAccess} does not support compact storage (C* 4.0+) + * @param ccm cluster to check against + */ + public static void compactStorageSupportCheck(CCMAccess ccm) { + if (ccm.getCassandraVersion().compareTo(VersionNumber.parse("4.0.0")) >= 0) { + throw new SkipException("Compact tables are not allowed in Cassandra starting with 4.0 version"); + } + } + } From 9a8a23fdc5e60f12a719ac490e6ec2fc001b1b4a Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Wed, 28 Feb 2018 14:42:55 +0100 Subject: [PATCH 197/512] JAVA-1448: TokenAwarePolicy should respect child policy ordering (#956) --- changelog/README.md | 5 + .../core/policies/TokenAwarePolicy.java | 221 ++++++++++---- .../core/policies/TokenAwarePolicyTest.java | 277 +++++++++++------- upgrade_guide/README.md | 14 + 4 files changed, 349 insertions(+), 168 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 8b0c2e215a5..76e180e70f7 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,5 +1,10 @@ ## Changelog +### 3.5.0 (in progress) + +- [improvement] JAVA-1448: TokenAwarePolicy should respect child policy ordering. + + ### 3.4.0 - [improvement] JAVA-1671: Remove unnecessary test on prepared statement metadata. diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java index ce3ce756f9c..5e97afb27e3 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/TokenAwarePolicy.java @@ -23,31 +23,70 @@ import java.util.*; /** - * A wrapper load balancing policy that add token awareness to a child policy. + * A wrapper load balancing policy that adds token awareness to a child policy. *

    * This policy encapsulates another policy. The resulting policy works in * the following way: *

      *
    • the {@code distance} method is inherited from the child policy.
    • - *
    • the iterator return by the {@code newQueryPlan} method will first - * return the {@code LOCAL} replicas for the query (based on {@link Statement#getRoutingKey}) - * if possible (i.e. if the query {@code getRoutingKey} method - * doesn't return {@code null} and if {@link Metadata#getReplicas} - * returns a non empty set of replicas for that partition key). If no - * local replica can be either found or successfully contacted, the rest - * of the query plan will fallback to one of the child policy.
    • + *
    • the iterator returned by the {@code newQueryPlan} method will first + * return the {@link HostDistance#LOCAL LOCAL} replicas for the query + * if possible (i.e. if the query's + * {@linkplain Statement#getRoutingKey(ProtocolVersion, CodecRegistry) routing key} + * is not {@code null} and if the + * {@linkplain Metadata#getReplicas(String, ByteBuffer) set of replicas} + * for that partition key is not empty). If no local replica can be either found + * or successfully contacted, the rest of the query plan will fallback + * to the child policy's one.
    • *
    + * The exact order in which local replicas are returned is dictated by the + * {@linkplain ReplicaOrdering strategy} provided at instantiation. *

    - * Do note that only replica for which the child policy {@code distance} - * method returns {@code HostDistance.LOCAL} will be considered having + * Do note that only replicas for which the child policy's + * {@linkplain LoadBalancingPolicy#distance(Host) distance} + * method returns {@link HostDistance#LOCAL LOCAL} will be considered having * priority. For example, if you wrap {@link DCAwareRoundRobinPolicy} with this * token aware policy, replicas from remote data centers may only be - * returned after all the host of the local data center. + * returned after all the hosts of the local data center. */ public class TokenAwarePolicy implements ChainableLoadBalancingPolicy { + /** + * Strategies for replica ordering. + */ + public enum ReplicaOrdering { + + /** + * Order replicas by token ring topology, i.e. always return the "primary" replica first, + * then the second, etc., according to the placement of replicas around the token ring. + *

    + * This strategy is the only one guaranteed to order replicas in a deterministic and + * constant way. This increases the effectiveness of server-side row caching (especially + * at consistency level ONE), but is more heavily impacted by hotspots, since the primary + * replica is always tried first. + */ + TOPOLOGICAL, + + /** + * Return replicas in a different, random order for each query plan. This is the default strategy. + *

    + * This strategy fans out writes and thus can alleviate hotspots caused by "fat" partitions, + * but its randomness makes server-side caching less efficient. + */ + RANDOM, + + /** + * Return the replicas in the exact same order in which they appear in the child + * policy's query plan. + *

    + * This is the only strategy that fully respects the child policy's replica ordering. + * Use it when it is important to keep that order intact (e.g. when using the {@link LatencyAwarePolicy}). + */ + NEUTRAL + } + private final LoadBalancingPolicy childPolicy; - private final boolean shuffleReplicas; + private final ReplicaOrdering replicaOrdering; private volatile Metadata clusterMetadata; private volatile ProtocolVersion protocolVersion; private volatile CodecRegistry codecRegistry; @@ -56,28 +95,36 @@ public class TokenAwarePolicy implements ChainableLoadBalancingPolicy { * Creates a new {@code TokenAware} policy. * * @param childPolicy the load balancing policy to wrap with token awareness. - * @param shuffleReplicas whether to shuffle the replicas returned by {@code getRoutingKey}. - * Note that setting this parameter to {@code true} might decrease the - * effectiveness of caching (especially at consistency level ONE), since - * the same row will be retrieved from any replica (instead of only the - * "primary" replica without shuffling). - * On the other hand, shuffling will better distribute writes, and can - * alleviate hotspots caused by "fat" partitions. + * @param replicaOrdering the strategy to use to order replicas. */ - public TokenAwarePolicy(LoadBalancingPolicy childPolicy, boolean shuffleReplicas) { + public TokenAwarePolicy(LoadBalancingPolicy childPolicy, ReplicaOrdering replicaOrdering) { this.childPolicy = childPolicy; - this.shuffleReplicas = shuffleReplicas; + this.replicaOrdering = replicaOrdering; } /** - * Creates a new {@code TokenAware} policy with shuffling of replicas. + * Creates a new {@code TokenAware} policy. * - * @param childPolicy the load balancing policy to wrap with token - * awareness. - * @see #TokenAwarePolicy(LoadBalancingPolicy, boolean) + * @param childPolicy the load balancing policy to wrap with token awareness. + * @param shuffleReplicas whether or not to shuffle the replicas. + * If {@code true}, then the {@link ReplicaOrdering#RANDOM RANDOM} strategy will be used, + * otherwise the {@link ReplicaOrdering#TOPOLOGICAL TOPOLOGICAL} one will be used. + * @deprecated Use {@link #TokenAwarePolicy(LoadBalancingPolicy, ReplicaOrdering)} instead. + * This constructor will be removed in the next major release. + */ + @SuppressWarnings("DeprecatedIsStillUsed") + @Deprecated + public TokenAwarePolicy(LoadBalancingPolicy childPolicy, boolean shuffleReplicas) { + this(childPolicy, shuffleReplicas ? ReplicaOrdering.RANDOM : ReplicaOrdering.TOPOLOGICAL); + } + + /** + * Creates a new {@code TokenAware} policy with {@link ReplicaOrdering#RANDOM RANDOM} replica ordering. + * + * @param childPolicy the load balancing policy to wrap with token awareness. */ public TokenAwarePolicy(LoadBalancingPolicy childPolicy) { - this(childPolicy, true); + this(childPolicy, ReplicaOrdering.RANDOM); } @Override @@ -94,10 +141,9 @@ public void init(Cluster cluster, Collection hosts) { } /** - * Return the HostDistance for the provided host. - * - * @param host the host of which to return the distance of. - * @return the HostDistance to {@code host} as returned by the wrapped policy. + * {@inheritDoc} + *

    + * This implementation always returns distances as reported by the wrapped policy. */ @Override public HostDistance distance(Host host) { @@ -105,15 +151,15 @@ public HostDistance distance(Host host) { } /** - * Returns the hosts to use for a new query. + * {@inheritDoc} *

    - * The returned plan will first return replicas (whose {@code HostDistance} - * for the child policy is {@code LOCAL}) for the query if it can determine - * them (i.e. mainly if {@code statement.getRoutingKey()} is not {@code null}). - * Following what it will return the plan of the child policy. - * - * @param statement the query for which to build the plan. - * @return the new query plan. + * The returned plan will first return local replicas for the query (i.e. + * replicas whose {@linkplain HostDistance distance} according to the child policy is {@code LOCAL}), + * if it can determine them (i.e. mainly if the statement's + * {@linkplain Statement#getRoutingKey(ProtocolVersion, CodecRegistry) routing key} + * is not {@code null}), and ordered according to the {@linkplain ReplicaOrdering ordering strategy} + * specified at instantiation; following what it will return the rest of the child policy's + * original query plan. */ @Override public Iterator newQueryPlan(final String loggedKeyspace, final Statement statement) { @@ -130,39 +176,86 @@ public Iterator newQueryPlan(final String loggedKeyspace, final Statement if (replicas.isEmpty()) return childPolicy.newQueryPlan(loggedKeyspace, statement); - final Iterator iter; - if (shuffleReplicas) { - List l = Lists.newArrayList(replicas); - Collections.shuffle(l); - iter = l.iterator(); - } else { - iter = replicas.iterator(); - } + if (replicaOrdering == ReplicaOrdering.NEUTRAL) { - return new AbstractIterator() { + final Iterator childIterator = childPolicy.newQueryPlan(keyspace, statement); - private Iterator childIterator; + return new AbstractIterator() { - @Override - protected Host computeNext() { - while (iter.hasNext()) { - Host host = iter.next(); - if (host.isUp() && childPolicy.distance(host) == HostDistance.LOCAL) - return host; - } + private List nonReplicas; + private Iterator nonReplicasIterator; + + @Override + protected Host computeNext() { + + while (childIterator.hasNext()) { + + Host host = childIterator.next(); + + if (host.isUp() && replicas.contains(host) && childPolicy.distance(host) == HostDistance.LOCAL) { + // UP replicas should be prioritized, retaining order from childPolicy + return host; + } else { + // save for later + if (nonReplicas == null) + nonReplicas = new ArrayList(); + nonReplicas.add(host); + } - if (childIterator == null) - childIterator = childPolicy.newQueryPlan(loggedKeyspace, statement); + } - while (childIterator.hasNext()) { - Host host = childIterator.next(); - // Skip it if it was already a local replica - if (!replicas.contains(host) || childPolicy.distance(host) != HostDistance.LOCAL) - return host; + // This should only engage if all local replicas are DOWN + if (nonReplicas != null) { + + if (nonReplicasIterator == null) + nonReplicasIterator = nonReplicas.iterator(); + + if (nonReplicasIterator.hasNext()) + return nonReplicasIterator.next(); + } + + return endOfData(); } - return endOfData(); + }; + + } else { + + final Iterator replicasIterator; + + if (replicaOrdering == ReplicaOrdering.RANDOM) { + List replicasList = Lists.newArrayList(replicas); + Collections.shuffle(replicasList); + replicasIterator = replicasList.iterator(); + } else { + replicasIterator = replicas.iterator(); } - }; + + return new AbstractIterator() { + + private Iterator childIterator; + + @Override + protected Host computeNext() { + while (replicasIterator.hasNext()) { + Host host = replicasIterator.next(); + if (host.isUp() && childPolicy.distance(host) == HostDistance.LOCAL) + return host; + } + + if (childIterator == null) + childIterator = childPolicy.newQueryPlan(loggedKeyspace, statement); + + while (childIterator.hasNext()) { + Host host = childIterator.next(); + // Skip it if it was already a local replica + if (!replicas.contains(host) || childPolicy.distance(host) != HostDistance.LOCAL) + return host; + } + return endOfData(); + } + }; + } + } @Override diff --git a/driver-core/src/test/java/com/datastax/driver/core/policies/TokenAwarePolicyTest.java b/driver-core/src/test/java/com/datastax/driver/core/policies/TokenAwarePolicyTest.java index 1464187ba41..d3ca3912425 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/policies/TokenAwarePolicyTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/policies/TokenAwarePolicyTest.java @@ -18,38 +18,105 @@ import com.datastax.driver.core.*; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Lists; +import java.nio.ByteBuffer; +import java.util.Iterator; +import java.util.List; +import org.assertj.core.util.Sets; import org.testng.annotations.BeforeMethod; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; -import java.nio.ByteBuffer; -import java.util.List; - import static com.datastax.driver.core.Assertions.assertThat; -import static com.datastax.driver.core.CreateCCM.TestMode.PER_METHOD; import static com.datastax.driver.core.TestUtils.CREATE_KEYSPACE_SIMPLE_FORMAT; import static com.datastax.driver.core.TestUtils.nonQuietClusterCloseOptions; - -@CreateCCM(PER_METHOD) -@CCMConfig(createCcm = false) -public class TokenAwarePolicyTest extends CCMTestsSupport { - - QueryTracker queryTracker; - - @BeforeMethod(groups = "short") - public void setUp() { - queryTracker = new QueryTracker(); +import static com.datastax.driver.core.policies.TokenAwarePolicy.ReplicaOrdering.NEUTRAL; +import static com.datastax.driver.core.policies.TokenAwarePolicy.ReplicaOrdering.RANDOM; +import static com.datastax.driver.core.policies.TokenAwarePolicy.ReplicaOrdering.TOPOLOGICAL; +import static org.mockito.Matchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class TokenAwarePolicyTest { + + private ByteBuffer routingKey = ByteBuffer.wrap(new byte[]{1, 2, 3, 4}); + + private RegularStatement statement = new SimpleStatement("irrelevant") + .setRoutingKey(routingKey); + + private Host host1 = mock(Host.class); + private Host host2 = mock(Host.class); + private Host host3 = mock(Host.class); + private Host host4 = mock(Host.class); + + private LoadBalancingPolicy childPolicy; + private Cluster cluster; + + @BeforeMethod(groups = "unit") + public void initMocks() { + CodecRegistry codecRegistry = new CodecRegistry(); + cluster = mock(Cluster.class); + Configuration configuration = mock(Configuration.class); + ProtocolOptions protocolOptions = mock(ProtocolOptions.class); + Metadata metadata = mock(Metadata.class); + childPolicy = mock(LoadBalancingPolicy.class); + when(cluster.getConfiguration()).thenReturn(configuration); + when(configuration.getCodecRegistry()).thenReturn(codecRegistry); + when(configuration.getProtocolOptions()).thenReturn(protocolOptions); + when(protocolOptions.getProtocolVersion()).thenReturn(ProtocolVersion.NEWEST_SUPPORTED); + when(cluster.getMetadata()).thenReturn(metadata); + when(metadata.getReplicas(Metadata.quote("keyspace"), routingKey)) + .thenReturn(Sets.newLinkedHashSet(host1, host2)); + when(childPolicy.newQueryPlan("keyspace", statement)).thenReturn( + Sets.newLinkedHashSet(host4, host3, host2, host1).iterator()); + when(childPolicy.distance(any(Host.class))).thenReturn(HostDistance.LOCAL); + when(host1.isUp()).thenReturn(true); + when(host2.isUp()).thenReturn(true); + when(host3.isUp()).thenReturn(true); + when(host4.isUp()).thenReturn(true); } @DataProvider(name = "shuffleProvider") public Object[][] shuffleProvider() { return new Object[][]{ - {true}, - {false}, - {null} + {TokenAwarePolicy.ReplicaOrdering.TOPOLOGICAL}, + {TokenAwarePolicy.ReplicaOrdering.RANDOM}, + {TokenAwarePolicy.ReplicaOrdering.NEUTRAL} }; } + @Test(groups = "unit") + public void should_respect_topological_order() { + // given + TokenAwarePolicy policy = new TokenAwarePolicy(childPolicy, TOPOLOGICAL); + policy.init(cluster, null); + // when + Iterator queryPlan = policy.newQueryPlan("keyspace", statement); + // then + assertThat(queryPlan).containsExactly(host1, host2, host4, host3); + } + + @Test(groups = "unit") + public void should_respect_child_policy_order() { + // given + TokenAwarePolicy policy = new TokenAwarePolicy(childPolicy, NEUTRAL); + policy.init(cluster, null); + // when + Iterator queryPlan = policy.newQueryPlan("keyspace", statement); + // then + assertThat(queryPlan).containsExactly(host2, host1, host4, host3); + } + + @Test(groups = "unit") + public void should_create_random_order() { + // given + TokenAwarePolicy policy = new TokenAwarePolicy(childPolicy, RANDOM); + policy.init(cluster, null); + // when + Iterator queryPlan = policy.newQueryPlan("keyspace", statement); + // then + assertThat(queryPlan).containsOnlyOnce(host1, host2, host3, host4).endsWith(host4, host3); + } + /** * Ensures that {@link TokenAwarePolicy} will shuffle discovered replicas depending on the value of shuffleReplicas * used when constructing with {@link TokenAwarePolicy#TokenAwarePolicy(LoadBalancingPolicy, boolean)} and that if not @@ -58,20 +125,14 @@ public Object[][] shuffleProvider() { * @test_category load_balancing:token_aware */ @Test(groups = "short", dataProvider = "shuffleProvider") - public void should_shuffle_replicas_based_on_configuration(Boolean shuffleReplicas) { + public void should_order_replicas_based_on_configuration(TokenAwarePolicy.ReplicaOrdering ordering) { // given: an 8 node cluster using TokenAwarePolicy and some shuffle replica configuration with a keyspace with replication factor of 3. ScassandraCluster sCluster = ScassandraCluster.builder() .withNodes(8) .withSimpleKeyspace("keyspace", 3) .build(); - LoadBalancingPolicy loadBalancingPolicy; - if (shuffleReplicas == null) { - loadBalancingPolicy = new TokenAwarePolicy(new RoundRobinPolicy()); - shuffleReplicas = true; - } else { - loadBalancingPolicy = new TokenAwarePolicy(new RoundRobinPolicy(), shuffleReplicas); - } + LoadBalancingPolicy loadBalancingPolicy = new TokenAwarePolicy(new SortingLoadBalancingPolicy(), ordering); Cluster cluster = Cluster.builder() .addContactPoints(sCluster.address(1).getAddress()) @@ -83,11 +144,9 @@ public void should_shuffle_replicas_based_on_configuration(Boolean shuffleReplic try { sCluster.init(); - Session session = cluster.connect(); - // given: A routing key that falls in the token range of node 6. - // Encodes into murmur hash '4874351301193663061' which should belong be owned by node 6 with replicas 7 and 8. + // Encodes into murmur hash '4874351301193663061' which should be owned by node 6 with replicas 7 and 8. ByteBuffer routingKey = TypeCodec.varchar().serialize("This is some sample text", ProtocolVersion.NEWEST_SUPPORTED); // then: The replicas resolved from the cluster metadata must match node 6 and its replicas. @@ -103,26 +162,17 @@ public void should_shuffle_replicas_based_on_configuration(Boolean shuffleReplic statement.setRoutingKey(routingKey); statement.setKeyspace("keyspace"); - boolean shuffledAtLeastOnce = false; - for (int i = 0; i < 1024; i++) { - List queryPlan = Lists.newArrayList(loadBalancingPolicy.newQueryPlan(null, statement)); - assertThat(queryPlan).containsOnlyElementsOf(cluster.getMetadata().getAllHosts()); - - List firstThree = queryPlan.subList(0, 3); - // then: if shuffle replicas was used or using default, the first three hosts returned should be 6,7,8 in any order. - // if shuffle replicas was not used, the first three hosts returned should be 6,7,8 in that order. - if (shuffleReplicas) { - assertThat(firstThree).containsOnlyElementsOf(replicas); - if (!firstThree.equals(replicas)) { - shuffledAtLeastOnce = true; - } - } else { - assertThat(firstThree).containsExactlyElementsOf(replicas); - } - } + List queryPlan = Lists.newArrayList(loadBalancingPolicy.newQueryPlan(null, statement)); + assertThat(queryPlan).containsOnlyElementsOf(cluster.getMetadata().getAllHosts()); - // then: given 1024 query plans, the replicas should be shuffled at least once. - assertThat(shuffledAtLeastOnce).isEqualTo(shuffleReplicas); + List firstThree = queryPlan.subList(0, 3); + // then: if ordering is RANDOM, the first three hosts returned should be 6,7,8 in any order. + // if ordering is TOPOLOGICAL or NEUTRAL, the first three hosts returned should be 6,7,8 in that order. + if (ordering == RANDOM) { + assertThat(firstThree).containsOnlyElementsOf(replicas); + } else { + assertThat(firstThree).containsExactlyElementsOf(replicas); + } } finally { cluster.close(); sCluster.stop(); @@ -156,12 +206,13 @@ public void should_choose_proper_host_based_on_routing_key() { Session session = cluster.connect(); - // Encodes into murmur hash '4557949199137838892' which should belong be owned by node 3. + // Encodes into murmur hash '4557949199137838892' which should be owned by node 3. ByteBuffer routingKey = TypeCodec.varchar().serialize("should_choose_proper_host_based_on_routing_key", ProtocolVersion.NEWEST_SUPPORTED); SimpleStatement statement = new SimpleStatement("select * from table where k=5") .setRoutingKey(routingKey) .setKeyspace("keyspace"); + QueryTracker queryTracker = new QueryTracker(); queryTracker.query(session, 10, statement); // then: The host having that token should be queried. @@ -210,6 +261,7 @@ public void should_choose_host_in_local_dc_when_using_network_topology_strategy_ .setRoutingKey(routingKey) .setKeyspace("keyspace"); + QueryTracker queryTracker = new QueryTracker(); queryTracker.query(session, 10, statement); // then: The local replica (2:1) should be queried and never the remote one. @@ -240,7 +292,7 @@ public void should_use_other_nodes_when_replicas_having_token_are_down() { .withPort(sCluster.getBinaryPort()) .withNettyOptions(nonQuietClusterCloseOptions) // Don't shuffle replicas just to keep test deterministic. - .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)) + .withLoadBalancingPolicy(new TokenAwarePolicy(new SortingLoadBalancingPolicy(), NEUTRAL)) .build(); try { @@ -255,58 +307,60 @@ public void should_use_other_nodes_when_replicas_having_token_are_down() { .setRoutingKey(routingKey) .setKeyspace("keyspace"); + QueryTracker queryTracker = new QueryTracker(); queryTracker.query(session, 10, statement); - // then: The node that is the primary for that key's hash is chosen. - queryTracker.assertQueried(sCluster, 1, 1, 0); + // then: primary replica is 4, secondary is 1; since the child policy returns [1,2,3,4], the + // TAP reorders the plan to [1,4,2,3]. Only 1 should be queried + queryTracker.assertQueried(sCluster, 1, 1, 10); queryTracker.assertQueried(sCluster, 1, 2, 0); queryTracker.assertQueried(sCluster, 1, 3, 0); - queryTracker.assertQueried(sCluster, 1, 4, 10); + queryTracker.assertQueried(sCluster, 1, 4, 0); - // when: The primary node owning that key goes down and a query is made. + // when: The secondary node owning that key (1) goes down and a query is made. queryTracker.reset(); - sCluster.stop(cluster, 4); + sCluster.stop(cluster, 1); queryTracker.query(session, 10, statement); - // then: The next replica having that data should be chosen (node 1). - queryTracker.assertQueried(sCluster, 1, 1, 10); + // then: The next replica having that data should be chosen (node 4 - primary replica). + queryTracker.assertQueried(sCluster, 1, 1, 0); queryTracker.assertQueried(sCluster, 1, 2, 0); queryTracker.assertQueried(sCluster, 1, 3, 0); - queryTracker.assertQueried(sCluster, 1, 4, 0); + queryTracker.assertQueried(sCluster, 1, 4, 10); // when: All nodes having that token are down and a query is made. queryTracker.reset(); - sCluster.stop(cluster, 1); + sCluster.stop(cluster, 4); queryTracker.query(session, 10, statement); // then: The remaining nodes which are non-replicas of that token should be used - // delegating to the child policy (RoundRobin). + // delegating to the child policy. queryTracker.assertQueried(sCluster, 1, 1, 0); - queryTracker.assertQueried(sCluster, 1, 2, 5); - queryTracker.assertQueried(sCluster, 1, 3, 5); + queryTracker.assertQueried(sCluster, 1, 2, 10); + queryTracker.assertQueried(sCluster, 1, 3, 0); queryTracker.assertQueried(sCluster, 1, 4, 0); - // when: A replica having that key becomes up and a query is made. + // when: A replica having that key (4) becomes up and a query is made. queryTracker.reset(); - sCluster.start(cluster, 1); + sCluster.start(cluster, 4); queryTracker.query(session, 10, statement); // then: The newly up replica should be queried. - queryTracker.assertQueried(sCluster, 1, 1, 10); + queryTracker.assertQueried(sCluster, 1, 1, 0); queryTracker.assertQueried(sCluster, 1, 2, 0); queryTracker.assertQueried(sCluster, 1, 3, 0); - queryTracker.assertQueried(sCluster, 1, 4, 0); + queryTracker.assertQueried(sCluster, 1, 4, 10); - // when: The primary replicas becomes up and a query is made. + // when: The other replica becomes up and a query is made. queryTracker.reset(); - sCluster.start(cluster, 4); + sCluster.start(cluster, 1); queryTracker.query(session, 10, statement); - // then: The primary replica which is now up should be queried. - queryTracker.assertQueried(sCluster, 1, 1, 0); + // then: The secondary replica (1) which is now up should be queried. + queryTracker.assertQueried(sCluster, 1, 1, 10); queryTracker.assertQueried(sCluster, 1, 2, 0); queryTracker.assertQueried(sCluster, 1, 3, 0); - queryTracker.assertQueried(sCluster, 1, 4, 10); + queryTracker.assertQueried(sCluster, 1, 4, 0); } finally { cluster.close(); sCluster.stop(); @@ -333,7 +387,7 @@ public void should_use_provided_routing_key_boundstatement() { .withPort(sCluster.getBinaryPort()) .withNettyOptions(nonQuietClusterCloseOptions) // Don't shuffle replicas just to keep test deterministic. - .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy(), false)) + .withLoadBalancingPolicy(new TokenAwarePolicy(new SortingLoadBalancingPolicy(), NEUTRAL)) .build(); try { @@ -351,6 +405,7 @@ public void should_use_provided_routing_key_boundstatement() { ByteBuffer routingKey = TypeCodec.bigint().serialize(33L, ProtocolVersion.NEWEST_SUPPORTED); bs.setRoutingKey(routingKey); + QueryTracker queryTracker = new QueryTracker(); queryTracker.query(session, 10, bs); // Expect only node 3 to have been queried, give it has ownership of that partition @@ -391,43 +446,57 @@ public void should_use_provided_routing_key_boundstatement() { * @test_category load_balancing:token_aware * @jira_ticket JAVA-123 (to ensure routing key buffers are not destroyed). */ - @CCMConfig(createCcm = true, numberOfNodes = 3, createCluster = false) @Test(groups = "long") public void should_properly_generate_and_use_routing_key_for_composite_partition_key() { // given: a 3 node cluster with a keyspace with RF 1. - Cluster cluster = register(Cluster.builder() + CCMBridge ccm = CCMBridge.builder() + .withNodes(3) + .build(); + + ccm.start(); + + Cluster cluster = Cluster.builder() + .addContactPoints(ccm.addressOfNode(1).getAddress()) + .withPort(ccm.getBinaryPort()) + .withNettyOptions(nonQuietClusterCloseOptions) .withLoadBalancingPolicy(new TokenAwarePolicy(new RoundRobinPolicy())) - .addContactPoints(getContactPoints().get(0)) - .withPort(ccm().getBinaryPort()) - .build()); - Session session = cluster.connect(); - - String table = "composite"; - String ks = TestUtils.generateIdentifier("ks_"); - session.execute(String.format(CREATE_KEYSPACE_SIMPLE_FORMAT, ks, 1)); - session.execute("USE " + ks); - session.execute(String.format("CREATE TABLE %s (k1 int, k2 int, i int, PRIMARY KEY ((k1, k2)))", table)); - - // (1,2) resolves to token '4881097376275569167' which belongs to node 1 so all queries should go to that node. - PreparedStatement insertPs = session.prepare("INSERT INTO " + table + "(k1, k2, i) VALUES (?, ?, ?)"); - BoundStatement insertBs = insertPs.bind(1, 2, 3); - - PreparedStatement selectPs = session.prepare("SELECT * FROM " + table + " WHERE k1=? and k2=?"); - BoundStatement selectBs = selectPs.bind(1, 2); - - // when: executing a prepared statement with a composite partition key. - // then: should query the correct node (1) in for both insert and select queries. - for (int i = 0; i < 10; i++) { - ResultSet rs = session.execute(insertBs); - assertThat(rs.getExecutionInfo().getQueriedHost()).isEqualTo(TestUtils.findHost(cluster, 1)); - - rs = session.execute(selectBs); - assertThat(rs.getExecutionInfo().getQueriedHost()).isEqualTo(TestUtils.findHost(cluster, 1)); - assertThat(rs.isExhausted()).isFalse(); - Row r = rs.one(); - assertThat(rs.isExhausted()).isTrue(); - - assertThat(r.getInt("i")).isEqualTo(3); + .build(); + + try { + + Session session = cluster.connect(); + + String ks = TestUtils.generateIdentifier("ks_"); + session.execute(String.format(CREATE_KEYSPACE_SIMPLE_FORMAT, ks, 1)); + session.execute("USE " + ks); + session.execute("CREATE TABLE composite (k1 int, k2 int, i int, PRIMARY KEY ((k1, k2)))"); + + // (1,2) resolves to token '4881097376275569167' which belongs to node 1 so all queries should go to that node. + PreparedStatement insertPs = session.prepare("INSERT INTO composite(k1, k2, i) VALUES (?, ?, ?)"); + BoundStatement insertBs = insertPs.bind(1, 2, 3); + + PreparedStatement selectPs = session.prepare("SELECT * FROM composite WHERE k1=? and k2=?"); + BoundStatement selectBs = selectPs.bind(1, 2); + + // when: executing a prepared statement with a composite partition key. + // then: should query the correct node (1) in for both insert and select queries. + Host host1 = TestUtils.findHost(cluster, 1); + for (int i = 0; i < 10; i++) { + ResultSet rs = session.execute(insertBs); + assertThat(rs.getExecutionInfo().getQueriedHost()).isEqualTo(host1); + + rs = session.execute(selectBs); + assertThat(rs.getExecutionInfo().getQueriedHost()).isEqualTo(host1); + assertThat(rs.isExhausted()).isFalse(); + Row r = rs.one(); + assertThat(rs.isExhausted()).isTrue(); + + assertThat(r.getInt("i")).isEqualTo(3); + } + } finally { + cluster.close(); + ccm.remove(); } } + } diff --git a/upgrade_guide/README.md b/upgrade_guide/README.md index b278a1491d5..83c2d02a5ef 100644 --- a/upgrade_guide/README.md +++ b/upgrade_guide/README.md @@ -3,6 +3,20 @@ The purpose of this guide is to detail changes made by successive versions of the Java driver. +### 3.5.0 + +The `TokenAwarePolicy` now has a new constructor that takes a `ReplicaOrdering` +argument. One of the advantages of this feature is the new `NEUTRAL` ordering +strategy, which honors its child policy's ordering, i.e., replicas +are returned in the same relative order as in the child policy's query plan. +As an example, if the child policy returns the plan [A, B, C, D], and the replicas +for the query being routed are [D, A, B], then the token aware policy would return +the plan [A, B, D, C]. + +As a consequence, the constructor taking a boolean parameter `shuffleReplicas` +is now deprecated and will be removed in the next major release. + + ### 3.4.0 `QueryBuilder` methods `in`, `lt`, `lte`, `eq`, `gt`, and `gte` now accept From 640f3a12e6a3c50fc529f269e9039c733268dffa Mon Sep 17 00:00:00 2001 From: Alex Ott Date: Wed, 28 Feb 2018 15:03:31 +0100 Subject: [PATCH 198/512] Fix eclipse problems (#954) * fix missing groupId that prevent from correct import into Eclipse * ignore plugins for that there is no m2e connectors --- pom.xml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/pom.xml b/pom.xml index 3f4c5c92a98..07a031e7d10 100644 --- a/pom.xml +++ b/pom.xml @@ -843,6 +843,7 @@ limitations under the License. + org.apache.maven.plugins maven-jar-plugin [2.2,) @@ -853,6 +854,32 @@ limitations under the License. + + + org.codehaus.mojo + clirr-maven-plugin + [2.7,) + + check + + + + + + + + + org.codehaus.gmaven + gmaven-plugin + [1.5,) + + testCompile + + + + + + From 56e800938e5ed3d9ca556899f2353b734d10661e Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Wed, 28 Feb 2018 08:06:21 -0600 Subject: [PATCH 199/512] JAVA-1751: Include defaultTimestamp length in encodedSize for >= V3 (#950) * JAVA-1751: Include defaultTimestamp length in encodedSize for >= V3 QueryProtocolOptions.encodedSize previously incorrectly only accounted for defaultTimestamp length if protocol version was equal to V3. It should be included for all protocol versions >= V3. * JAVA-1770: Fix message size when using Custom Payload --- changelog/README.md | 4 +++- .../main/java/com/datastax/driver/core/CBUtil.java | 11 +++-------- .../java/com/datastax/driver/core/Message.java | 6 ++++++ .../java/com/datastax/driver/core/Requests.java | 14 +++++++------- .../datastax/driver/core/CustomPayloadTest.java | 4 ++-- 5 files changed, 21 insertions(+), 18 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 76e180e70f7..4e9604cdf08 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -1,8 +1,10 @@ ## Changelog -### 3.5.0 (in progress) +### 3.5.0 (In progress) - [improvement] JAVA-1448: TokenAwarePolicy should respect child policy ordering. +- [bug] JAVA-1751: Include defaultTimestamp length in encodedSize for protocol version >= 3. +- [bug] JAVA-1770: Fix message size when using Custom Payload. ### 3.4.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java b/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java index c252f8d23c2..7996baa892c 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java +++ b/driver-core/src/main/java/com/datastax/driver/core/CBUtil.java @@ -113,22 +113,17 @@ public static byte[] readBytes(ByteBuf cb) { } } - public static void writeBytes(byte[] bytes, ByteBuf cb) { + public static void writeShortBytes(byte[] bytes, ByteBuf cb) { cb.writeShort(bytes.length); cb.writeBytes(bytes); } - public static void writeBytes(ByteBuffer bytes, ByteBuf cb) { - cb.writeShort(bytes.remaining()); - cb.writeBytes(bytes.duplicate()); - } - - public static int sizeOfBytes(byte[] bytes) { + public static int sizeOfShortBytes(byte[] bytes) { return 2 + bytes.length; } public static int sizeOfBytes(ByteBuffer bytes) { - return 2 + bytes.remaining(); + return 4 + bytes.remaining(); } public static Map readBytesMap(ByteBuf cb) { diff --git a/driver-core/src/main/java/com/datastax/driver/core/Message.java b/driver-core/src/main/java/com/datastax/driver/core/Message.java index b70772aaec3..a78a9d61d83 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Message.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Message.java @@ -342,6 +342,12 @@ protected void encode(ChannelHandlerContext ctx, Request request, List o } coder.encode(request, body, protocolVersion); + if (body.capacity() != messageSize) { + logger.warn("Detected buffer resizing while encoding {} message ({} => {}), " + + "this is a driver bug " + + "(ultimately it does not affect the query, but leads to a small inefficiency)", + request.type, messageSize, body.capacity()); + } out.add(Frame.create(protocolVersion, request.type.opcode, request.getStreamId(), flags, body)); } } diff --git a/driver-core/src/main/java/com/datastax/driver/core/Requests.java b/driver-core/src/main/java/com/datastax/driver/core/Requests.java index 7eeb1e46aba..c42f02b8c16 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/Requests.java +++ b/driver-core/src/main/java/com/datastax/driver/core/Requests.java @@ -187,17 +187,17 @@ static class Execute extends Message.Request { static final Message.Coder coder = new Message.Coder() { @Override public void encode(Execute msg, ByteBuf dest, ProtocolVersion version) { - CBUtil.writeBytes(msg.statementId.bytes, dest); + CBUtil.writeShortBytes(msg.statementId.bytes, dest); if (ProtocolFeature.PREPARED_METADATA_CHANGES.isSupportedBy(version)) - CBUtil.writeBytes(msg.resultMetadataId.bytes, dest); + CBUtil.writeShortBytes(msg.resultMetadataId.bytes, dest); msg.options.encode(dest, version); } @Override public int encodedSize(Execute msg, ProtocolVersion version) { - int size = CBUtil.sizeOfBytes(msg.statementId.bytes); + int size = CBUtil.sizeOfShortBytes(msg.statementId.bytes); if (ProtocolFeature.PREPARED_METADATA_CHANGES.isSupportedBy(version)) - size += CBUtil.sizeOfBytes(msg.resultMetadataId.bytes); + size += CBUtil.sizeOfShortBytes(msg.resultMetadataId.bytes); size += msg.options.encodedSize(version); return size; } @@ -402,7 +402,7 @@ int encodedSize(ProtocolVersion version) { size += CBUtil.sizeOfValue(pagingState); if (flags.contains(QueryFlag.SERIAL_CONSISTENCY)) size += CBUtil.sizeOfConsistencyLevel(serialConsistency); - if (version == ProtocolVersion.V3 && flags.contains(QueryFlag.DEFAULT_TIMESTAMP)) + if (version.compareTo(ProtocolVersion.V3) >= 0 && flags.contains(QueryFlag.DEFAULT_TIMESTAMP)) size += 8; return size; default: @@ -434,7 +434,7 @@ public void encode(Batch msg, ByteBuf dest, ProtocolVersion version) { if (q instanceof String) CBUtil.writeLongString((String) q, dest); else - CBUtil.writeBytes(((MD5Digest) q).bytes, dest); + CBUtil.writeShortBytes(((MD5Digest) q).bytes, dest); CBUtil.writeValueList(msg.values.get(i), dest); } @@ -449,7 +449,7 @@ public int encodedSize(Batch msg, ProtocolVersion version) { Object q = msg.queryOrIdList.get(i); size += 1 + (q instanceof String ? CBUtil.sizeOfLongString((String) q) - : CBUtil.sizeOfBytes(((MD5Digest) q).bytes)); + : CBUtil.sizeOfShortBytes(((MD5Digest) q).bytes)); size += CBUtil.sizeOfValueList(msg.values.get(i)); } diff --git a/driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java b/driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java index 926578a6d5c..b840aa695c7 100644 --- a/driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java +++ b/driver-core/src/test/java/com/datastax/driver/core/CustomPayloadTest.java @@ -258,8 +258,8 @@ public void should_print_log_message_when_level_trace() throws Exception { session().execute(statement); String logs = appender.waitAndGet(10000); assertThat(logs) - .contains("Sending payload: {k1:0x010203, k2:0x040506} (20 bytes total)") - .contains("Received payload: {k1:0x010203, k2:0x040506} (20 bytes total)"); + .contains("Sending payload: {k1:0x010203, k2:0x040506} (24 bytes total)") + .contains("Received payload: {k1:0x010203, k2:0x040506} (24 bytes total)"); } finally { logger.setLevel(null); logger.removeAppender(appender); From 2e20c9da61a6953c4dcc0dc9fcd4219f399874c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Chantepie?= Date: Wed, 28 Feb 2018 15:06:41 +0100 Subject: [PATCH 200/512] Add equals/hashCode to QueryOptions (#843) --- .../datastax/driver/core/QueryOptions.java | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java b/driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java index 8c4a9b4f56b..b22e109a7b3 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java +++ b/driver-core/src/main/java/com/datastax/driver/core/QueryOptions.java @@ -17,6 +17,7 @@ import com.datastax.driver.core.exceptions.UnsupportedFeatureException; import com.datastax.driver.core.utils.MoreFutures; +import com.datastax.driver.core.utils.MoreObjects; import com.google.common.util.concurrent.Futures; /** @@ -484,4 +485,38 @@ public int getMaxPendingRefreshNodeRequests() { return maxPendingRefreshNodeRequests; } + public boolean equals(Object that) { + if (that == null || !(that instanceof QueryOptions)) { + return false; + } + + QueryOptions other = (QueryOptions) that; + + return (this.consistency.equals(other.consistency) && + this.serialConsistency.equals(other.serialConsistency) && + this.fetchSize == other.fetchSize && + this.defaultIdempotence == other.defaultIdempotence && + this.metadataEnabled == other.metadataEnabled && + this.maxPendingRefreshNodeListRequests == other.maxPendingRefreshNodeListRequests && + this.maxPendingRefreshNodeRequests == other.maxPendingRefreshNodeRequests && + this.maxPendingRefreshSchemaRequests == other.maxPendingRefreshSchemaRequests && + this.refreshNodeListIntervalMillis == other.refreshNodeListIntervalMillis && + this.refreshNodeIntervalMillis == other.refreshNodeIntervalMillis && + this.refreshSchemaIntervalMillis == other.refreshSchemaIntervalMillis && + this.reprepareOnUp == other.reprepareOnUp && + this.prepareOnAllHosts == prepareOnAllHosts + ); + } + + public int hashCode() { + return MoreObjects. + hashCode(consistency, serialConsistency, fetchSize, + defaultIdempotence, metadataEnabled, + maxPendingRefreshNodeListRequests, + maxPendingRefreshNodeRequests, + maxPendingRefreshSchemaRequests, + refreshNodeListIntervalMillis, refreshNodeIntervalMillis, + refreshSchemaIntervalMillis, reprepareOnUp, + prepareOnAllHosts); + } } From e27acfcf8db59eeaf0d13623c877349d2e03630d Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Wed, 28 Feb 2018 08:07:22 -0600 Subject: [PATCH 201/512] JAVA-1760: Add metrics documentation (#958) --- changelog/README.md | 1 + manual/metrics/README.md | 157 +++++++++++++++++++++++++++++++++++++-- 2 files changed, 150 insertions(+), 8 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 4e9604cdf08..0a6ea0dccbf 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -5,6 +5,7 @@ - [improvement] JAVA-1448: TokenAwarePolicy should respect child policy ordering. - [bug] JAVA-1751: Include defaultTimestamp length in encodedSize for protocol version >= 3. - [bug] JAVA-1770: Fix message size when using Custom Payload. +- [documentation] JAVA-1760: Add metrics documentation. ### 3.4.0 diff --git a/manual/metrics/README.md b/manual/metrics/README.md index 78cad50c1e4..78c42af86cf 100644 --- a/manual/metrics/README.md +++ b/manual/metrics/README.md @@ -1,12 +1,153 @@ ## Metrics -*Coming soon... In the meantime, see the javadoc for [Metrics].* +The driver exposes measurements of its internal behavior through the popular [Dropwizard Metrics] +library. Developers can access these metrics and choose to export them to a monitoring tool. - +The driver depends on Metrics 3.2.x, but is compatible with newer versions of Dropwizard Metrics. +For using Metrics 4.x with the driver, see [Metrics 4 Compatibility](#metrics-4-compatibility). -[Metrics]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Metrics.html \ No newline at end of file +### Structure + +Metric names are path-like, dot-separated strings. Metrics are measured at the `Cluster`-level, +thus the driver prefixes them with the name of the `Cluster` they are associated with (see [withClusterName] +for how to configure this), suffixed by `-metrics`. For example: + +``` +cluster1-metrics.connected-to +cluster1-metrics.connection-errors +... +``` + +### Configuration + +By default, metrics are enabled and exposed via JMX as [MXBeans]. + +Some users may find that they don't want the driver to record and expose metrics. To disable +metrics collection, use the [withoutMetrics] builder method, i.e.: + +```java +Cluster cluster = Cluster.builder() + .withoutMetrics() + .build(); +``` + +Note that if you decide to disable metrics, you may also consider excluding metrics as a dependency. +To do this in a maven project: + +```xml + + com.datastax.cassandra + cassandra-driver-core + 3.4.0 + + + io.dropwizard.metrics + metrics-core + + + +``` + +Alternatively, one may not want to expose metrics using JMX. Disabling JMX reporting is simple +as using the [withoutJMXReporting] builder method, i.e.: + +```java +Cluster cluster = Cluster.builder() + .withoutJMXReporting() + .build(); +``` + +### Accessing Cluster Metrics + +`Cluster` metrics may be accessed via the [getMetrics] method. The [Metrics] class offers +direct access to all metrics recorded for the `Cluster` via getter methods. Refer to +the [Metrics javadoc][Metrics] for more details about the metrics offered. + +It is very common for applications to record their own metrics. You can add all metrics +recorded for a `Cluster` to your applications' [MetricRegistry] in the following manner: + +```java +MetricRegistry myRegistery = new MetricRegistry(); +myRegistry.registerAll(cluster.getMetrics().getRegistry()); +``` + +### Registering a Custom Reporter + +Dropwizard Metrics offers a variety of [Reporters] for exporting metrics. To enable reporting, +access the `Cluster`'s metrics via the [getMetrics] method. For example, to enable CSV reporting +every 30 seconds: + +```java +import com.codahale.metrics.*; + +import java.io.File; +import java.util.concurrent.TimeUnit; + +Metrics metrics = cluster.getMetrics(); + +CsvReporter csvReporter = CsvReporter.forRegistry(metrics.getRegistry()) + .convertDurationsTo(TimeUnit.MILLISECONDS) + .convertRatesTo(TimeUnit.SECONDS) + .build(new File(".")); + +csvReporter.start(30, TimeUnit.SECONDS); +``` + +### Metrics 4 Compatibility + +While the driver depends on Metrics 3.2.x, it also works with Metrics 4, with some caveats. + +In Metrics 4, JMX reporting was moved to a separate module, `metrics-jmx`. Because of this you are +likely to encounter the following exception at runtime when initializing a `Cluster`: + +``` +Exception in thread "main" java.lang.NoClassDefFoundError: com/codahale/metrics/JmxReporter + at com.datastax.driver.core.Metrics.(Metrics.java:103) + at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1402) + at com.datastax.driver.core.Cluster.init(Cluster.java:159) + at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:330) + at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:305) + at com.datastax.durationtest.core.DurationTest.createSessions(DurationTest.java:360) + .... +Caused by: java.lang.ClassNotFoundException: com.codahale.metrics.JmxReporter + at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) + at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185) + at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496) + ... 8 more +``` + +To fix this, use [withoutJMXReporting] when constructing your `Cluster`. If you still desire JMX +reporting, add `metrics-jmx` as a dependency: + +```xml + + io.dropwizard.metrics + metrics-jmx + 4.0.2 + +``` + +Then create your `Cluster` and `JmxReporter` in the following manner: + +```java +Cluster cluster = Cluster.builder() + .withoutJMXReporting() + .build(); + +JmxReporter reporter = + JmxReporter.forRegistry(cluster.getMetrics().getRegistry()) + .inDomain(cluster.getClusterName() + "-metrics") + .build(); + +reporter.start(); +``` + +[Dropwizard Metrics]: http://metrics.dropwizard.io/3.2.2/manual/index.html +[Reporters]: http://metrics.dropwizard.io/3.2.2/manual/core.html#reporters +[MetricRegistry]: http://metrics.dropwizard.io/3.2.2/apidocs/com/codahale/metrics/MetricRegistry.html +[MXBeans]: https://docs.oracle.com/javase/tutorial/jmx/mbeans/mxbeans.html +[withClusterName]: https://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Cluster.Builder.html#withClusterName-java.lang.String- +[withoutMetrics]: https://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Cluster.Builder.html#withoutMetrics-- +[withoutJMXReporting]: https://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Cluster.Builder.html#withoutJMXReporting-- +[getMetrics]: https://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Cluster.html#getMetrics-- +[Metrics]: http://docs.datastax.com/en/drivers/java/3.4/com/datastax/driver/core/Metrics.html From 5b5f7b1b035cd22b5536f8efe41ad67bf8543cfb Mon Sep 17 00:00:00 2001 From: Andrew Tolbert Date: Wed, 28 Feb 2018 08:10:12 -0600 Subject: [PATCH 202/512] JAVA-1765: Update dependencies to latest patch versions (#959) --- changelog/README.md | 1 + driver-core/pom.xml | 4 +-- .../datastax/driver/osgi/BundleOptions.java | 2 +- manual/compression/README.md | 6 ++-- manual/speculative_execution/README.md | 2 +- manual/ssl/README.md | 2 +- pom.xml | 29 ++++++++++--------- 7 files changed, 24 insertions(+), 22 deletions(-) diff --git a/changelog/README.md b/changelog/README.md index 0a6ea0dccbf..5568d69f151 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -6,6 +6,7 @@ - [bug] JAVA-1751: Include defaultTimestamp length in encodedSize for protocol version >= 3. - [bug] JAVA-1770: Fix message size when using Custom Payload. - [documentation] JAVA-1760: Add metrics documentation. +- [improvement] JAVA-1765: Update dependencies to latest patch versions. ### 3.4.0 diff --git a/driver-core/pom.xml b/driver-core/pom.xml index b38c8338152..d17c42bbd53 100644 --- a/driver-core/pom.xml +++ b/driver-core/pom.xml @@ -74,8 +74,8 @@ - net.jpountz.lz4 - lz4 + org.lz4 + lz4-java true diff --git a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java index e47b2caebcb..c3a93c9a9ed 100644 --- a/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java +++ b/driver-tests/osgi/src/test/java/com/datastax/driver/osgi/BundleOptions.java @@ -76,7 +76,7 @@ public static CompositeOption lz4Bundle() { public Option[] getOptions() { return options( systemProperty("cassandra.compression").value(ProtocolOptions.Compression.LZ4.name()), - mavenBundle("net.jpountz.lz4", "lz4", getVersion("lz4.version")) + mavenBundle("org.lz4", "lz4-java", getVersion("lz4.version")) ); } }; diff --git a/manual/compression/README.md b/manual/compression/README.md index 1c2b73d080b..c6cd8c885df 100644 --- a/manual/compression/README.md +++ b/manual/compression/README.md @@ -25,9 +25,9 @@ Maven dependency: ```xml - net.jpountz.lz4 - lz4 - 1.3.0 + org.lz4 + lz4-java + 1.4.1 ``` diff --git a/manual/speculative_execution/README.md b/manual/speculative_execution/README.md index 38af43c2d7f..1160f8be2a2 100644 --- a/manual/speculative_execution/README.md +++ b/manual/speculative_execution/README.md @@ -117,7 +117,7 @@ explicitly depend on it: org.hdrhistogram HdrHistogram - 2.1.9 + 2.1.10 ``` diff --git a/manual/ssl/README.md b/manual/ssl/README.md index 1e8244d037e..72f70fceb90 100644 --- a/manual/ssl/README.md +++ b/manual/ssl/README.md @@ -153,7 +153,7 @@ add it to your dependencies. There are known runtime incompatibilities between newer versions of netty-tcnative and the version of netty that the driver uses. For best -results, use version 2.0.1.Final. +results, use version 2.0.7.Final. Using netty-tcnative requires JDK 1.7 or above and requires the presence of OpenSSL on the system. It will not fall back to the JDK implementation. diff --git a/pom.xml b/pom.xml index 07a031e7d10..aa08d7c463f 100644 --- a/pom.xml +++ b/pom.xml @@ -45,25 +45,26 @@ UTF-8 UTF-8 - 3.11.1 + 3.11.2 1.6 1.2.17 1.7.25 1.7.25 19.0 - 4.0.47.Final + 4.0.56.Final + 2.0.7.Final 3.2.2 1.1.2.6 - 1.3.0 - 2.1.9 - 2.8.8 + 1.4.1 + 2.1.10 + 2.8.11 - 2.7.9.2 - 2.9.1 + 2.7.9.3 + 2.9.9 1.0 1.0.4 - 2.0.7 - 3.0.27 + 2.0.9 + 3.0.44 2.4.7 2.0.1 2.23.1 @@ -165,8 +166,8 @@ - net.jpountz.lz4 - lz4 + org.lz4 + lz4-java ${lz4.version} @@ -341,7 +342,7 @@ io.netty netty-tcnative - 2.0.1.Final + ${netty-tcnative.version} ${os.detected.classifier} @@ -515,8 +516,8 @@ ${snappy.version} - net.jpountz.lz4 - lz4 + org.lz4 + lz4-java ${lz4.version} From f5d44d3fea093a5c28d59ba0f587e9044e161813 Mon Sep 17 00:00:00 2001 From: Alexandre Dutra Date: Wed, 28 Feb 2018 15:12:08 +0100 Subject: [PATCH 203/512] JAVA-1752: Deprecate DowngradingConsistencyRetryPolicy (#962) --- changelog/README.md | 1 + .../exceptions/QueryConsistencyException.java | 2 +- .../core/exceptions/ReadTimeoutException.java | 4 +- .../DowngradingConsistencyRetryPolicy.java | 18 +- ...ConsistencyRetryPolicyIntegrationTest.java | 1 + .../examples/retry/DowngradingRetry.java | 473 ++++++++++++++++++ upgrade_guide/README.md | 59 ++- 7 files changed, 539 insertions(+), 19 deletions(-) create mode 100644 driver-examples/src/main/java/com/datastax/driver/examples/retry/DowngradingRetry.java diff --git a/changelog/README.md b/changelog/README.md index 5568d69f151..24d4e4e912c 100644 --- a/changelog/README.md +++ b/changelog/README.md @@ -7,6 +7,7 @@ - [bug] JAVA-1770: Fix message size when using Custom Payload. - [documentation] JAVA-1760: Add metrics documentation. - [improvement] JAVA-1765: Update dependencies to latest patch versions. +- [improvement] JAVA-1752: Deprecate DowngradingConsistencyRetryPolicy. ### 3.4.0 diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryConsistencyException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryConsistencyException.java index 8e03844d8b7..434358c6ecd 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryConsistencyException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/QueryConsistencyException.java @@ -65,7 +65,7 @@ public ConsistencyLevel getConsistencyLevel() { } /** - * The number of replica that had acknowledged/responded to the operation + * The number of replicas that had acknowledged/responded to the operation * before it failed. * * @return the number of replica that had acknowledged/responded the diff --git a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadTimeoutException.java b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadTimeoutException.java index f3de64a9e7a..09885c16b04 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadTimeoutException.java +++ b/driver-core/src/main/java/com/datastax/driver/core/exceptions/ReadTimeoutException.java @@ -66,8 +66,8 @@ else if (!dataPresent) *

    * During reads, Cassandra doesn't request data from every replica to * minimize internal network traffic. Instead, some replicas are only asked - * for a checksum of the data. A read timeout may occurred even if enough - * replicas have responded to fulfill the consistency level if only checksum + * for a checksum of the data. A read timeout may have occurred even if enough + * replicas have responded to fulfill the consistency level, if only checksum * responses have been received. This method allows to detect that case. * * @return whether the data was amongst the received replica responses. diff --git a/driver-core/src/main/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicy.java b/driver-core/src/main/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicy.java index 597ed878864..f10610917d4 100644 --- a/driver-core/src/main/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicy.java +++ b/driver-core/src/main/java/com/datastax/driver/core/policies/DowngradingConsistencyRetryPolicy.java @@ -63,7 +63,7 @@ * on the information the Cassandra coordinator node returns, retrying the * operation with the initially requested consistency has a chance to * succeed, do it. Otherwise, if based on this information we know the - * initially requested consistency level cannot be achieve currently, then: + * initially requested consistency level cannot be achieved currently, then: *