From be8f25ce724ee029e4ae4734d170be537ff5a3c6 Mon Sep 17 00:00:00 2001 From: Saranya Krishnakumar Date: Tue, 4 Aug 2026 10:04:54 -0700 Subject: [PATCH 1/2] Expand list of architecture for unaligned support --- CHANGES.txt | 1 + .../spark/bulkwriter/util/FastByteOperations.java | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGES.txt b/CHANGES.txt index a16f955e1..3dcb73855 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,5 +1,6 @@ 0.5.0 ----- + * Expand list of architecture that supports unaligned access in FastByteOperations (CASSANALYTICS-188) * Fix FastByteOperations Silently Falling Back to Pure-Java Comparator (CASSANALYTICS-187) * AbstractSchemaBuilder.build() drops the cdc flag, silently disabling CDC on all tables (CASSANALYTICS-186) * Fix total timeout calculation for getAllNodeSettings (CASSANALYTICS-179) diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/util/FastByteOperations.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/util/FastByteOperations.java index 3bae5dd61..d15e2b103 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/util/FastByteOperations.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/util/FastByteOperations.java @@ -81,7 +81,13 @@ private static class BestHolder static ByteOperations getBest() { String arch = System.getProperty("os.arch"); - boolean unaligned = arch.equals("i386") || arch.equals("x86") || arch.equals("x86_64") || arch.equals("amd64"); + boolean unaligned = arch.equals("i386") + || arch.equals("x86") + || arch.equals("x86_64") + || arch.equals("amd64") + || arch.equals("s390x") + || arch.equals("aarch64") + || arch.equals("ppc64le"); if (!unaligned) { return new PureJavaOperations(); From 362c437020a5d76476cdba92419df2f5367d80e5 Mon Sep 17 00:00:00 2001 From: Saranya Krishnakumar Date: Tue, 4 Aug 2026 11:03:53 -0700 Subject: [PATCH 2/2] Add comment --- .../cassandra/spark/bulkwriter/util/FastByteOperations.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/util/FastByteOperations.java b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/util/FastByteOperations.java index d15e2b103..ed899692a 100644 --- a/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/util/FastByteOperations.java +++ b/cassandra-analytics-core/src/main/java/org/apache/cassandra/spark/bulkwriter/util/FastByteOperations.java @@ -81,6 +81,8 @@ private static class BestHolder static ByteOperations getBest() { String arch = System.getProperty("os.arch"); + // Note that s390x, aarch64, & ppc64le architectures are not officially supported and adding them here is only done out + // of convenience for those that want to run C* on these architectures at their own risk (see #11214, #13326, & #13615) boolean unaligned = arch.equals("i386") || arch.equals("x86") || arch.equals("x86_64")