Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aarch64] sstableloader fails when snappy compression is used #347

Open
fruch opened this issue Oct 18, 2023 · 2 comments
Open

[aarch64] sstableloader fails when snappy compression is used #347

fruch opened this issue Oct 18, 2023 · 2 comments

Comments

@fruch
Copy link
Contributor

fruch commented Oct 18, 2023

when using sstableloader with snappy compression on top of arm (aarch64) platform it fails like the following:

WARN  18:56:50,815 Cannot initialize native Snappy library. Compression on new sstables will be disabled.
  org.apache.cassandra.exceptions.ConfigurationException: SnappyCompressor.create() threw an error: java.lang.NoClassDefFoundError Could not initialize class org.xerial.snappy.Snappy
  	at org.apache.cassandra.schema.CompressionParams.createCompressor(CompressionParams.java:273)
  	at org.apache.cassandra.schema.CompressionParams.<init>(CompressionParams.java:164)
  	at org.apache.cassandra.schema.CompressionParams.fromMap(CompressionParams.java:105)
  	at org.apache.cassandra.cql3.statements.TableAttributes.build(TableAttributes.java:107)
  	at org.apache.cassandra.cql3.statements.TableAttributes.validate(TableAttributes.java:55)
  	at org.apache.cassandra.cql3.statements.CFProperties.validate(CFProperties.java:35)
  	at org.apache.cassandra.cql3.statements.CreateTableStatement$RawStatement.prepare(CreateTableStatement.java:216)
  	at com.scylladb.tools.BulkLoader$CQLClient.getCFMetaData(BulkLoader.java:701)
  	at com.scylladb.tools.BulkLoader.process(BulkLoader.java:1571)
  	at com.scylladb.tools.BulkLoader.lambda$main$1(BulkLoader.java:1369)
  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  	at java.base/java.lang.Thread.run(Thread.java:829)
  Caused by: java.lang.reflect.InvocationTargetException
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  	at org.apache.cassandra.schema.CompressionParams.createCompressor(CompressionParams.java:245)
  	... 14 more
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy
  	at org.apache.cassandra.io.compress.SnappyCompressor.create(SnappyCompressor.java:48)
  	... 19 more
  org.apache.cassandra.exceptions.ConfigurationException: SnappyCompressor.create() threw an error: java.lang.NoClassDefFoundError Could not initialize class org.xerial.snappy.Snappy
  	at org.apache.cassandra.schema.CompressionParams.createCompressor(CompressionParams.java:273)
  	at org.apache.cassandra.schema.CompressionParams.<init>(CompressionParams.java:164)
  	at org.apache.cassandra.schema.CompressionParams.fromMap(CompressionParams.java:105)
  	at org.apache.cassandra.cql3.statements.TableAttributes.build(TableAttributes.java:107)
  	at org.apache.cassandra.cql3.statements.TableAttributes.validate(TableAttributes.java:55)
  	at org.apache.cassandra.cql3.statements.CFProperties.validate(CFProperties.java:35)
  	at org.apache.cassandra.cql3.statements.CreateTableStatement$RawStatement.prepare(CreateTableStatement.java:216)
  	at com.scylladb.tools.BulkLoader$CQLClient.getCFMetaData(BulkLoader.java:701)
  	at com.scylladb.tools.BulkLoader.process(BulkLoader.java:1571)
  	at com.scylladb.tools.BulkLoader.lambda$main$1(BulkLoader.java:1369)
  	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
  	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  	at java.base/java.lang.Thread.run(Thread.java:829)
  Caused by: java.lang.reflect.InvocationTargetException
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  	at org.apache.cassandra.schema.CompressionParams.createCompressor(CompressionParams.java:245)
  	... 14 more
  Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy
  	at org.apache.cassandra.io.compress.SnappyCompressor.create(SnappyCompressor.java:48)
  	... 19 more

this is the table that was used:
CREATE COLUMNFAMILY cf (key varchar, c varchar, v varchar, PRIMARY KEY(key, c)) WITH compression = { 'sstable_compression': 'SnappyCompressor' }

Logs

https://jenkins.scylladb.com/view/staging/job/scylla-staging/job/fruch/job/arm-based-dtest-job/7/testReport/junit/sstable_generation_loading_test/TestSSTableGenerationAndLoading/Run_Dtest_Parallel_Cloud_Machines___FullDtest___full_split007___test_sstableloader_compression_None_Snappy_/

@fruch
Copy link
Contributor Author

fruch commented Oct 18, 2023

look like the version we are using of java-snappy is quite old and doesn't support arm yet very well

@mykaul
Copy link
Contributor

mykaul commented Oct 19, 2023

I wouldn't be surprised - and we need to update it as well due to some other issues. We are using:

<dependency groupId="org.xerial.snappy" artifactId="snappy-java" version="1.1.1.7"/>

which is from 2015 or so...

Latest is https://github.com/xerial/snappy-java/releases/tag/v1.1.10.5
I just hope there are no interface changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants