Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions batcher/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
<artifactId>dsbulk-sampler</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>io.netty</groupId>
Expand Down
2 changes: 1 addition & 1 deletion batcher/reactor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<artifactId>dsbulk-batcher-api</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
Expand Down
16 changes: 13 additions & 3 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@
</dependency>
<!-- DataStax Java Driver BOM -->
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
<version>${driver.version}</version>
<exclusions>
Expand All @@ -177,7 +177,7 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-test-infra</artifactId>
<version>${driver.version}</version>
<exclusions>
Expand All @@ -189,7 +189,7 @@
</exclusions>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-bom</artifactId>
<version>${driver.version}</version>
<type>pom</type>
Expand Down Expand Up @@ -382,6 +382,16 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.github.stephenc.jcip</groupId>
<artifactId>jcip-annotations</artifactId>
<version>${jcip.version}</version>
</dependency>
<dependency>
<groupId>com.github.spotbugs</groupId>
<artifactId>spotbugs-annotations</artifactId>
<version>${spotbugs.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
6 changes: 3 additions & 3 deletions codecs/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>com.esri.geometry</groupId>
Expand Down
4 changes: 2 additions & 2 deletions codecs/jdk/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<artifactId>dsbulk-codecs-api</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
4 changes: 2 additions & 2 deletions codecs/text/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<artifactId>dsbulk-codecs-api</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,10 @@ void should_not_convert_from_invalid_internal() {
assertThat(dsbulkCodec).cannotConvertFromInternal("not a valid vector");
}

// To keep usage consistent with VectorCodec we confirm that we support encoding when too many
// elements are
// available but not when too few are. Note that it's actually VectorCodec that enforces this
// constraint so we
// have to go through encode() rather than the internal/external methods.
// VectorCodec throws IllegalArgumentExcpetion if we don't have exactly the expected number
// of elements in our vector
@Test
void should_encode_too_many_but_not_too_few() {
void should_fail_to_encode_too_many_or_too_few() {

ArrayList<Float> tooMany = Lists.newArrayList(values);
tooMany.add(6.6f);
Expand All @@ -100,7 +97,8 @@ void should_encode_too_many_but_not_too_few() {
CqlVector<Float> tooFewVector = CqlVector.newInstance(tooFew);
JsonNode tooFewNode = dsbulkCodec.internalToExternal(tooFewVector);

assertThat(dsbulkCodec.encode(tooManyNode, ProtocolVersion.DEFAULT)).isNotNull();
assertThatThrownBy(() -> dsbulkCodec.encode(tooManyNode, ProtocolVersion.DEFAULT))
.isInstanceOf(IllegalArgumentException.class);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change (and the equivalent change for the string-to-vector codec below) match up to a change that came in subsequent versions of the Java driver after initial vector support was added. A decision was made to provide uniform bounds checking for vectors across all drivers such that any number of elements other than those specified by the vectors dimension will throw an IllegalArgumentException. JAVA-3143 is the relevant ticket here.

assertThatThrownBy(() -> dsbulkCodec.encode(tooFewNode, ProtocolVersion.DEFAULT))
.isInstanceOf(IllegalArgumentException.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,10 @@ void should_not_convert_from_invalid_internal() {
assertThat(dsbulkCodec).cannotConvertFromInternal("not a valid vector");
}

// To keep usage consistent with VectorCodec we confirm that we support encoding when too many
// elements are
// available but not when too few are. Note that it's actually VectorCodec that enforces this
// constraint so we
// have to go through encode() rather than the internal/external methods.
// VectorCodec throws IllegalArgumentExcpetion if we don't have exactly the expected number
// of elements in our vector
@Test
void should_encode_too_many_but_not_too_few() {
void should_fail_to_encode_too_many_or_too_few() {

ArrayList<Float> tooMany = Lists.newArrayList(values);
tooMany.add(6.6f);
Expand All @@ -84,7 +81,8 @@ void should_encode_too_many_but_not_too_few() {
CqlVector<Float> tooFewVector = CqlVector.newInstance(tooFew);
String tooFewString = dsbulkCodec.internalToExternal(tooFewVector);

assertThat(dsbulkCodec.encode(tooManyString, ProtocolVersion.DEFAULT)).isNotNull();
assertThatThrownBy(() -> dsbulkCodec.encode(tooManyString, ProtocolVersion.DEFAULT))
.isInstanceOf(IllegalArgumentException.class);
assertThatThrownBy(() -> dsbulkCodec.encode(tooFewString, ProtocolVersion.DEFAULT))
.isInstanceOf(IllegalArgumentException.class);
}
Expand Down
6 changes: 3 additions & 3 deletions config/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
<artifactId>config</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand All @@ -56,7 +56,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
<scope>test</scope>
</dependency>
Expand Down
6 changes: 3 additions & 3 deletions connectors/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.reactivestreams</groupId>
Expand Down
4 changes: 2 additions & 2 deletions connectors/csv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
<artifactId>config</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>com.univocity</groupId>
Expand Down
4 changes: 2 additions & 2 deletions connectors/json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
<artifactId>config</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
Expand Down
6 changes: 3 additions & 3 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
<dependencies>
<!-- driver -->
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<!-- supported connectors -->
Expand Down Expand Up @@ -218,7 +218,7 @@
<transformer implementation="org.apache.maven.plugins.shade.resource.AppendingTransformer">
<resource>META-INF/io.netty.versions.properties</resource>
</transformer>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
</transformers>
</configuration>
</execution>
Expand Down Expand Up @@ -247,7 +247,7 @@
<doctitle>DataStax Bulk Loader ${project.version} API</doctitle>
<windowtitle>DataStax Bulk Loader ${project.version} API</windowtitle>
<links>
<link>https://www.javadoc.io/doc/com.datastax.oss/java-driver-core/${driver.version}</link>
<link>https://www.javadoc.io/doc/org.apache.cassandra/java-driver-core/${driver.version}</link>
<link>https://www.javadoc.io/doc/io.netty/netty-all/${netty.version}</link>
<link>https://www.javadoc.io/doc/com.typesafe/config/${config.version}</link>
<link>https://www.reactive-streams.org/reactive-streams-${reactive-streams.version}-javadoc/</link>
Expand Down
6 changes: 3 additions & 3 deletions executor/api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,16 +43,16 @@
<artifactId>dsbulk-sampler</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
<groupId>org.reactivestreams</groupId>
<artifactId>reactive-streams</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.jctools</groupId>
Expand Down
2 changes: 1 addition & 1 deletion executor/reactor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<artifactId>dsbulk-executor-api</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
Expand Down
6 changes: 3 additions & 3 deletions format/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
Expand Down
4 changes: 2 additions & 2 deletions io/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
Expand Down
2 changes: 1 addition & 1 deletion manual/settings.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# DataStax Bulk Loader v1.11.0-SNAPSHOT Options
# DataStax Bulk Loader v1.11.1-SNAPSHOT Options

*NOTE:* The long options described here can be persisted in `conf/application.conf` and thus permanently override defaults and avoid specifying options on the command line.

Expand Down
4 changes: 2 additions & 2 deletions mapping/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
<artifactId>antlr4-runtime</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>com.github.ben-manes.caffeine</groupId>
Expand Down
8 changes: 4 additions & 4 deletions partitioner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-core</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<artifactId>java-driver-shaded-guava</artifactId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-guava-shaded</artifactId>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
Expand All @@ -67,7 +67,7 @@
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.datastax.oss</groupId>
<groupId>org.apache.cassandra</groupId>
<artifactId>java-driver-test-infra</artifactId>
<scope>test</scope>
</dependency>
Expand Down
Loading