This is an automated email from the ASF dual-hosted git repository. frankgh pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/cassandra-analytics.git
The following commit(s) were added to refs/heads/trunk by this push: new d28442a CASSANDRA-19500 Fix XXHash32Digest calculated digest value (#46) d28442a is described below commit d28442ae712c1597052493aa3d2353a2de2495c2 Author: Francisco Guerrero <fran...@apache.org> AuthorDate: Wed Mar 27 13:32:39 2024 -0700 CASSANDRA-19500 Fix XXHash32Digest calculated digest value (#46) This PR bumps the Sidecar version to the current latest HEAD of Sidecar. Bumping the version surfaced an issue with the way we are producing digest strings for the XXHash32 implementation. The hash value is not masked and this causes the negative sign to be forwarded producing the incorrect hash result. Patch by Francisco Guerrero; Reviewed by Yifan Cai for CASSANDRA-19500 --- CHANGES.txt | 1 + .../java/org/apache/cassandra/clients/Sidecar.java | 2 +- .../spark/bulkwriter/CassandraClusterInfo.java | 26 +++++++++++----------- .../cassandra/spark/bulkwriter/ClusterInfo.java | 2 +- .../cassandra/spark/bulkwriter/RecordWriter.java | 3 +-- .../cassandra/spark/bulkwriter/RingInstance.java | 4 ++-- .../spark/bulkwriter/SidecarDataTransferApi.java | 2 +- .../spark/bulkwriter/token/TokenRangeMapping.java | 2 +- .../org/apache/cassandra/spark/common/Digest.java | 2 +- .../apache/cassandra/spark/common/MD5Digest.java | 4 ++-- .../cassandra/spark/common/XXHash32Digest.java | 4 ++-- .../cassandra/spark/data/CassandraDataLayer.java | 8 +++---- .../spark/data/SidecarProvisionedSSTable.java | 4 ++-- .../spark/utils/XXHash32DigestAlgorithm.java | 2 +- .../spark/validation/CassandraValidation.java | 2 +- .../spark/validation/SidecarValidation.java | 2 +- .../spark/bulkwriter/MockBulkWriterContext.java | 2 +- .../bulkwriter/RingInstanceSerializationTest.java | 5 +++-- .../spark/bulkwriter/RingInstanceTest.java | 2 +- .../spark/bulkwriter/TokenRangeMappingUtils.java | 6 ++--- .../spark/utils/XXHash32DigestAlgorithmTest.java | 4 ++-- .../build.gradle | 13 +++++++++++ .../testing/CassandraSidecarTestContext.java | 1 + .../testing/SharedClusterIntegrationTestBase.java | 1 + gradle.properties | 4 +++- scripts/build-sidecar.sh | 2 +- 26 files changed, 64 insertions(+), 46 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 2c6d0ae..718e1d4 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 1.0.0 + * Fix XXHash32Digest calculated digest value (CASSANDRA-19500) * Report additional bulk analytics job stats for instrumentation (CASSANDRA-19418) * Add certificate expiry check to start up validations done in Cassandra Analytics library (CASSANDRA-19424) * Use constant reference time during bulk read process (CASSANDRA-19452) diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/clients/Sidecar.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/clients/Sidecar.java index 1baf6ec..34835aa 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/clients/Sidecar.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/clients/Sidecar.java @@ -34,6 +34,7 @@ import org.slf4j.LoggerFactory; import o.a.c.sidecar.client.shaded.io.vertx.core.Vertx; import o.a.c.sidecar.client.shaded.io.vertx.core.VertxOptions; +import o.a.c.sidecar.client.shaded.common.NodeSettings; import org.apache.cassandra.secrets.SecretsProvider; import org.apache.cassandra.sidecar.client.HttpClientConfig; import org.apache.cassandra.sidecar.client.SidecarClient; @@ -45,7 +46,6 @@ import org.apache.cassandra.sidecar.client.VertxHttpClient; import org.apache.cassandra.sidecar.client.VertxRequestExecutor; import org.apache.cassandra.sidecar.client.retry.ExponentialBackoffRetryPolicy; import org.apache.cassandra.sidecar.client.retry.RetryPolicy; -import org.apache.cassandra.sidecar.common.NodeSettings; import org.apache.cassandra.spark.bulkwriter.BulkSparkConf; import org.apache.cassandra.spark.data.FileType; import org.apache.cassandra.spark.utils.BuildInfo; diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/CassandraClusterInfo.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/CassandraClusterInfo.java index fb92082..7d32f7a 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/CassandraClusterInfo.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/CassandraClusterInfo.java @@ -43,20 +43,20 @@ import com.google.common.collect.Range; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import o.a.c.sidecar.client.shaded.common.NodeSettings; +import o.a.c.sidecar.client.shaded.common.data.GossipInfoResponse; +import o.a.c.sidecar.client.shaded.common.data.RingEntry; +import o.a.c.sidecar.client.shaded.common.data.SchemaResponse; +import o.a.c.sidecar.client.shaded.common.data.TimeSkewResponse; +import o.a.c.sidecar.client.shaded.common.data.TokenRangeReplicasResponse; +import o.a.c.sidecar.client.shaded.common.data.TokenRangeReplicasResponse.ReplicaInfo; +import o.a.c.sidecar.client.shaded.common.data.TokenRangeReplicasResponse.ReplicaMetadata; import org.apache.cassandra.bridge.CassandraBridge; import org.apache.cassandra.bridge.CassandraBridgeFactory; import org.apache.cassandra.bridge.CassandraVersionFeatures; import org.apache.cassandra.clients.Sidecar; import org.apache.cassandra.sidecar.client.SidecarInstance; import org.apache.cassandra.sidecar.client.SidecarInstanceImpl; -import org.apache.cassandra.sidecar.common.NodeSettings; -import org.apache.cassandra.sidecar.common.data.GossipInfoResponse; -import org.apache.cassandra.sidecar.common.data.RingEntry; -import org.apache.cassandra.sidecar.common.data.SchemaResponse; -import org.apache.cassandra.sidecar.common.data.TimeSkewResponse; -import org.apache.cassandra.sidecar.common.data.TokenRangeReplicasResponse; -import org.apache.cassandra.sidecar.common.data.TokenRangeReplicasResponse.ReplicaInfo; -import org.apache.cassandra.sidecar.common.data.TokenRangeReplicasResponse.ReplicaMetadata; import org.apache.cassandra.spark.bulkwriter.token.TokenRangeMapping; import org.apache.cassandra.spark.common.client.InstanceState; import org.apache.cassandra.spark.common.client.InstanceStatus; @@ -467,11 +467,11 @@ public class CassandraClusterInfo implements ClusterInfo, Closeable { Set<String> pendingReplicas = response.replicaMetadata() - .values() - .stream() - .filter(m -> InstanceState.isTransitioning(m.state())) - .map(ReplicaMetadata::address) - .collect(Collectors.toSet()); + .values() + .stream() + .filter(m -> InstanceState.isTransitioning(m.state())) + .map(ReplicaMetadata::address) + .collect(Collectors.toSet()); if (pendingReplicas.isEmpty()) { diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/ClusterInfo.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/ClusterInfo.java index 9485200..38d87fc 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/ClusterInfo.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/ClusterInfo.java @@ -23,7 +23,7 @@ import java.io.Serializable; import java.util.List; import java.util.Map; -import org.apache.cassandra.sidecar.common.data.TimeSkewResponse; +import o.a.c.sidecar.client.shaded.common.data.TimeSkewResponse; import org.apache.cassandra.spark.bulkwriter.token.TokenRangeMapping; import org.apache.cassandra.spark.common.client.InstanceState; import org.apache.cassandra.spark.data.partitioner.Partitioner; diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java index 32e2017..232c461 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RecordWriter.java @@ -48,7 +48,7 @@ import com.google.common.collect.Range; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.apache.cassandra.sidecar.common.data.TimeSkewResponse; +import o.a.c.sidecar.client.shaded.common.data.TimeSkewResponse; import org.apache.cassandra.spark.bulkwriter.token.ReplicaAwareFailureHandler; import org.apache.cassandra.spark.bulkwriter.token.TokenRangeMapping; import org.apache.cassandra.spark.utils.DigestAlgorithm; @@ -75,7 +75,6 @@ public class RecordWriter implements Serializable private SSTableWriter sstableWriter = null; private int outputSequence = 0; // sub-folder for possible subrange splits - public RecordWriter(BulkWriterContext writerContext, String[] columnNames) { this(writerContext, columnNames, TaskContext::get, SSTableWriter::new); diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RingInstance.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RingInstance.java index b83c286..40cf314 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RingInstance.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/RingInstance.java @@ -25,8 +25,8 @@ import java.io.ObjectOutputStream; import java.io.Serializable; import java.util.Objects; -import org.apache.cassandra.sidecar.common.data.RingEntry; -import org.apache.cassandra.sidecar.common.data.TokenRangeReplicasResponse.ReplicaMetadata; +import o.a.c.sidecar.client.shaded.common.data.RingEntry; +import o.a.c.sidecar.client.shaded.common.data.TokenRangeReplicasResponse.ReplicaMetadata; import org.apache.cassandra.spark.common.model.CassandraInstance; import org.jetbrains.annotations.Nullable; diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/SidecarDataTransferApi.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/SidecarDataTransferApi.java index 46f8f11..8710f88 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/SidecarDataTransferApi.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/SidecarDataTransferApi.java @@ -27,11 +27,11 @@ import java.util.concurrent.ExecutionException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import o.a.c.sidecar.client.shaded.common.data.SSTableImportResponse; import org.apache.cassandra.bridge.CassandraBridge; import org.apache.cassandra.sidecar.client.SidecarClient; import org.apache.cassandra.sidecar.client.SidecarInstanceImpl; import org.apache.cassandra.sidecar.client.request.ImportSSTableRequest; -import org.apache.cassandra.sidecar.common.data.SSTableImportResponse; import org.apache.cassandra.spark.common.Digest; import org.apache.cassandra.spark.common.client.ClientException; import org.apache.cassandra.spark.common.model.CassandraInstance; diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/token/TokenRangeMapping.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/token/TokenRangeMapping.java index 2ffd56d..f91bf24 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/token/TokenRangeMapping.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/token/TokenRangeMapping.java @@ -35,7 +35,7 @@ import com.google.common.collect.Range; import com.google.common.collect.RangeMap; import com.google.common.collect.TreeRangeMap; -import org.apache.cassandra.sidecar.common.data.TokenRangeReplicasResponse.ReplicaMetadata; +import o.a.c.sidecar.client.shaded.common.data.TokenRangeReplicasResponse.ReplicaMetadata; import org.apache.cassandra.spark.bulkwriter.RingInstance; import org.apache.cassandra.spark.common.model.CassandraInstance; import org.apache.cassandra.spark.data.ReplicationFactor; diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/Digest.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/Digest.java index 07d7c22..5dcbcce 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/Digest.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/Digest.java @@ -32,5 +32,5 @@ public interface Digest /** * @return the digest translated to Sidecar digest */ - org.apache.cassandra.sidecar.common.data.Digest toSidecarDigest(); + o.a.c.sidecar.client.shaded.common.data.Digest toSidecarDigest(); } diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/MD5Digest.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/MD5Digest.java index 3c62244..e0f019d 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/MD5Digest.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/MD5Digest.java @@ -54,9 +54,9 @@ public class MD5Digest implements Digest * {@inheritDoc} */ @Override - public org.apache.cassandra.sidecar.common.data.Digest toSidecarDigest() + public o.a.c.sidecar.client.shaded.common.data.Digest toSidecarDigest() { - return new org.apache.cassandra.sidecar.common.data.MD5Digest(value); + return new o.a.c.sidecar.client.shaded.common.data.MD5Digest(value); } @Override diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/XXHash32Digest.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/XXHash32Digest.java index 1ad8547..746a350 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/XXHash32Digest.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/common/XXHash32Digest.java @@ -63,9 +63,9 @@ public class XXHash32Digest implements Digest } @Override - public org.apache.cassandra.sidecar.common.data.Digest toSidecarDigest() + public o.a.c.sidecar.client.shaded.common.data.Digest toSidecarDigest() { - return new org.apache.cassandra.sidecar.common.data.XXHash32Digest(value, seedHex); + return new o.a.c.sidecar.client.shaded.common.data.XXHash32Digest(value, seedHex); } @Override diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/CassandraDataLayer.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/CassandraDataLayer.java index 8ab1dd6..ccbb05e 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/CassandraDataLayer.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/CassandraDataLayer.java @@ -58,6 +58,10 @@ import org.slf4j.LoggerFactory; import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.io.Input; import com.esotericsoftware.kryo.io.Output; +import o.a.c.sidecar.client.shaded.common.NodeSettings; +import o.a.c.sidecar.client.shaded.common.data.ListSnapshotFilesResponse; +import o.a.c.sidecar.client.shaded.common.data.RingResponse; +import o.a.c.sidecar.client.shaded.common.data.SchemaResponse; import org.apache.cassandra.bridge.BigNumberConfig; import org.apache.cassandra.bridge.BigNumberConfigImpl; import org.apache.cassandra.bridge.CassandraBridge; @@ -72,10 +76,6 @@ import org.apache.cassandra.sidecar.client.SidecarClient; import org.apache.cassandra.sidecar.client.SidecarInstance; import org.apache.cassandra.sidecar.client.SimpleSidecarInstancesProvider; import org.apache.cassandra.sidecar.client.exception.RetriesExhaustedException; -import org.apache.cassandra.sidecar.common.NodeSettings; -import org.apache.cassandra.sidecar.common.data.ListSnapshotFilesResponse; -import org.apache.cassandra.sidecar.common.data.RingResponse; -import org.apache.cassandra.sidecar.common.data.SchemaResponse; import org.apache.cassandra.spark.config.SchemaFeature; import org.apache.cassandra.spark.config.SchemaFeatureSet; import org.apache.cassandra.spark.data.partitioner.CassandraInstance; diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/SidecarProvisionedSSTable.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/SidecarProvisionedSSTable.java index 43be542..648c74f 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/SidecarProvisionedSSTable.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/data/SidecarProvisionedSSTable.java @@ -31,12 +31,12 @@ import com.google.common.cache.Cache; import com.google.common.cache.CacheBuilder; import org.apache.commons.io.IOUtils; +import o.a.c.sidecar.client.shaded.common.data.ListSnapshotFilesResponse; +import o.a.c.sidecar.client.shaded.common.utils.HttpRange; import org.apache.cassandra.clients.Sidecar; import org.apache.cassandra.clients.SidecarStreamConsumerAdapter; import org.apache.cassandra.sidecar.client.SidecarClient; import org.apache.cassandra.sidecar.client.SidecarInstance; -import org.apache.cassandra.sidecar.common.data.ListSnapshotFilesResponse; -import org.apache.cassandra.sidecar.common.utils.HttpRange; import org.apache.cassandra.spark.stats.Stats; import org.apache.cassandra.spark.utils.ThrowableUtils; import org.apache.cassandra.spark.utils.streaming.SSTableInputStream; diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithm.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithm.java index 724125b..e6918b2 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithm.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithm.java @@ -61,7 +61,7 @@ public class XXHash32DigestAlgorithm implements DigestAlgorithm { hasher.update(buffer, 0, len); } - return new XXHash32Digest(Long.toHexString(hasher.getValue()), SEED); + return new XXHash32Digest(Integer.toHexString(hasher.getValue()), SEED); } } } diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/CassandraValidation.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/CassandraValidation.java index dedf5c3..5eb9f04 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/CassandraValidation.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/CassandraValidation.java @@ -21,8 +21,8 @@ package org.apache.cassandra.spark.validation; import java.util.concurrent.TimeUnit; +import o.a.c.sidecar.client.shaded.common.data.HealthResponse; import org.apache.cassandra.sidecar.client.SidecarClient; -import org.apache.cassandra.sidecar.common.data.HealthResponse; /** * A startup validation that checks the connectivity and health of Cassandra diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/SidecarValidation.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/SidecarValidation.java index 29b7e07..6c46d28 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/SidecarValidation.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/validation/SidecarValidation.java @@ -21,8 +21,8 @@ package org.apache.cassandra.spark.validation; import java.util.concurrent.TimeUnit; +import o.a.c.sidecar.client.shaded.common.data.HealthResponse; import org.apache.cassandra.sidecar.client.SidecarClient; -import org.apache.cassandra.sidecar.common.data.HealthResponse; /** * A startup validation that checks the connectivity and health of Sidecar diff --git a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/MockBulkWriterContext.java b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/MockBulkWriterContext.java index 826a19a..91e7174 100644 --- a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/MockBulkWriterContext.java +++ b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/MockBulkWriterContext.java @@ -39,8 +39,8 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; import org.apache.commons.lang3.tuple.Pair; +import o.a.c.sidecar.client.shaded.common.data.TimeSkewResponse; import org.apache.cassandra.bridge.CassandraBridgeFactory; -import org.apache.cassandra.sidecar.common.data.TimeSkewResponse; import org.apache.cassandra.spark.bulkwriter.token.ConsistencyLevel; import org.apache.cassandra.spark.bulkwriter.token.TokenRangeMapping; import org.apache.cassandra.spark.common.Digest; diff --git a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/RingInstanceSerializationTest.java b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/RingInstanceSerializationTest.java index 64a01ac..dc10910 100644 --- a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/RingInstanceSerializationTest.java +++ b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/RingInstanceSerializationTest.java @@ -21,8 +21,9 @@ package org.apache.cassandra.spark.bulkwriter; import org.junit.jupiter.api.Test; -import org.apache.cassandra.sidecar.common.data.RingEntry; -import org.apache.cassandra.sidecar.common.data.TokenRangeReplicasResponse.ReplicaMetadata; +import o.a.c.sidecar.client.shaded.common.data.RingEntry; +import o.a.c.sidecar.client.shaded.common.data.TokenRangeReplicasResponse.ReplicaMetadata; + import static org.apache.cassandra.spark.utils.SerializationUtils.deserialize; import static org.apache.cassandra.spark.utils.SerializationUtils.serialize; import static org.junit.jupiter.api.Assertions.assertEquals; diff --git a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/RingInstanceTest.java b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/RingInstanceTest.java index ada44d3..62ba339 100644 --- a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/RingInstanceTest.java +++ b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/RingInstanceTest.java @@ -39,7 +39,7 @@ import com.google.common.collect.Multimap; import com.google.common.collect.Range; import org.junit.jupiter.api.Test; -import org.apache.cassandra.sidecar.common.data.RingEntry; +import o.a.c.sidecar.client.shaded.common.data.RingEntry; import org.apache.cassandra.spark.bulkwriter.token.ConsistencyLevel; import org.apache.cassandra.spark.bulkwriter.token.ReplicaAwareFailureHandler; import org.apache.cassandra.spark.bulkwriter.token.TokenRangeMapping; diff --git a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/TokenRangeMappingUtils.java b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/TokenRangeMappingUtils.java index fbcdea7..43fa5b1 100644 --- a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/TokenRangeMappingUtils.java +++ b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/bulkwriter/TokenRangeMappingUtils.java @@ -33,13 +33,13 @@ import com.google.common.collect.ImmutableMap; import com.google.common.collect.Multimap; import com.google.common.collect.Range; -import org.apache.cassandra.sidecar.common.data.RingEntry; -import org.apache.cassandra.sidecar.common.data.TokenRangeReplicasResponse.ReplicaMetadata; -import org.apache.cassandra.spark.utils.RangeUtils; +import o.a.c.sidecar.client.shaded.common.data.RingEntry; +import o.a.c.sidecar.client.shaded.common.data.TokenRangeReplicasResponse.ReplicaMetadata; import org.apache.cassandra.spark.bulkwriter.token.TokenRangeMapping; import org.apache.cassandra.spark.common.client.InstanceStatus; import org.apache.cassandra.spark.data.ReplicationFactor; import org.apache.cassandra.spark.data.partitioner.Partitioner; +import org.apache.cassandra.spark.utils.RangeUtils; public final class TokenRangeMappingUtils diff --git a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithmTest.java b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithmTest.java index 92b32e9..8903cc3 100644 --- a/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithmTest.java +++ b/cassandra-analytics-core/src/test/java/org/apache/cassandra/spark/utils/XXHash32DigestAlgorithmTest.java @@ -51,8 +51,8 @@ class XXHash32DigestAlgorithmTest @ParameterizedTest(name = "{index} fileName={0} expectedMd5={1}") @CsvSource({ - "file1.txt,ffffffffd76a44a5", - "file2.txt,ffffffffef976cbe", + "file1.txt,d76a44a5", + "file2.txt,ef976cbe", "file3.txt,8321e1e", }) void testXXHash32Provider(String fileName, String expectedXXHash32) throws IOException diff --git a/cassandra-analytics-integration-framework/build.gradle b/cassandra-analytics-integration-framework/build.gradle index 24159b1..7cc0fef 100644 --- a/cassandra-analytics-integration-framework/build.gradle +++ b/cassandra-analytics-integration-framework/build.gradle @@ -28,6 +28,19 @@ project(':cassandra-analytics-integration-framework') { useJUnitPlatform() } + configurations { + configureEach { + resolutionStrategy { + // Force set the vertx versions that do not depend on a newer jackson version + force("io.vertx:vertx-web:${vertxVersion}") + force("io.vertx:vertx-core:${vertxVersion}") + force("io.vertx:vertx-auth-common:${vertxVersion}") + force("io.vertx:vertx-dropwizard-metrics:${vertxVersion}") + force("io.vertx:vertx-web-client:${vertxVersion}") + } + } + } + dependencies { // These dependencies (sidecar + dtest jars) must be built by running `scripts/build-dependencies.sh` diff --git a/cassandra-analytics-integration-framework/src/main/java/org/apache/cassandra/sidecar/testing/CassandraSidecarTestContext.java b/cassandra-analytics-integration-framework/src/main/java/org/apache/cassandra/sidecar/testing/CassandraSidecarTestContext.java index 02e4ea7..4669007 100644 --- a/cassandra-analytics-integration-framework/src/main/java/org/apache/cassandra/sidecar/testing/CassandraSidecarTestContext.java +++ b/cassandra-analytics-integration-framework/src/main/java/org/apache/cassandra/sidecar/testing/CassandraSidecarTestContext.java @@ -271,6 +271,7 @@ public class CassandraSidecarTestContext implements AutoCloseable .dataDirs(Arrays.asList(dataDirectories)) .stagingDir(stagingDir) .delegate(delegate) + .globalMetricRegistryName("test") .build()); } return new InstancesConfigImpl(metadata, dnsResolver); diff --git a/cassandra-analytics-integration-framework/src/main/java/org/apache/cassandra/sidecar/testing/SharedClusterIntegrationTestBase.java b/cassandra-analytics-integration-framework/src/main/java/org/apache/cassandra/sidecar/testing/SharedClusterIntegrationTestBase.java index e9b9542..028b436 100644 --- a/cassandra-analytics-integration-framework/src/main/java/org/apache/cassandra/sidecar/testing/SharedClusterIntegrationTestBase.java +++ b/cassandra-analytics-integration-framework/src/main/java/org/apache/cassandra/sidecar/testing/SharedClusterIntegrationTestBase.java @@ -455,6 +455,7 @@ public abstract class SharedClusterIntegrationTestBase .dataDirs(Arrays.asList(dataDirectories)) .stagingDir(stagingDir) .delegate(delegate) + .globalMetricRegistryName("test") .build(); } diff --git a/gradle.properties b/gradle.properties index fbb8d1f..2ce39ca 100644 --- a/gradle.properties +++ b/gradle.properties @@ -28,6 +28,8 @@ mockitoVersion=3.12.4 jnaVersion=5.9.0 scala=2.12 spark=3 -vertxVersion=4.4.6 +# force version 4.5.1 of vertx to prevent issues initializing io.vertx.core.json.jackson.JacksonCodec, +# which requires a newer version of jackson, which is not available in spark 2 +vertxVersion=4.5.1 org.gradle.jvmargs=-Xmx4096m diff --git a/scripts/build-sidecar.sh b/scripts/build-sidecar.sh index cc3f13f..821e7e0 100755 --- a/scripts/build-sidecar.sh +++ b/scripts/build-sidecar.sh @@ -24,7 +24,7 @@ else SCRIPT_DIR=$( dirname -- "$( readlink -f -- "$0"; )"; ) SIDECAR_REPO="${SIDECAR_REPO:-https://github.com/apache/cassandra-sidecar.git}" SIDECAR_BRANCH="${SIDECAR_BRANCH:-trunk}" - SIDECAR_COMMIT="${SIDECAR_COMMIT:-2914d57f0428643b3a92b6af8f4da1b209d80c2a}" + SIDECAR_COMMIT="${SIDECAR_COMMIT:-056faad8278365a77a36dd336e002136c269165a}" SIDECAR_JAR_DIR="$(dirname "${SCRIPT_DIR}/")/dependencies" SIDECAR_JAR_DIR=${CASSANDRA_DEP_DIR:-$SIDECAR_JAR_DIR} SIDECAR_BUILD_DIR="${SIDECAR_JAR_DIR}/sidecar-build" --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org