DataStax Help Center

Cassandra sstableloader fails with "Cannot create CompressionParameters for parameters"

Summary

When loading data to a cluster using sstableloader, the utility fails with java.io.EOFException when it attempts to stream the data.

Symptoms

The sstableloader utility reports the following error to stdout:

progress: [/#.#.#.# 0/1 (0)] [/#.#.#.# 0/1 (0)] [total: 0 - 0MB/s (avg: 0MB/s)]Streaming session to /#.#.#.# failed
ERROR 11:07:39,256 Error in ThreadPoolExecutor
java.lang.RuntimeException: java.io.EOFException
        at com.google.common.base.Throwables.propagate(Throwables.java:160)
        at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:682)
Caused by: java.io.EOFException
        at java.io.DataInputStream.readInt(DataInputStream.java:375)
        at org.apache.cassandra.streaming.FileStreamTask.receiveReply(FileStreamTask.java:193)
        at org.apache.cassandra.streaming.compress.CompressedFileStreamTask.stream(CompressedFileStreamTask.java:120)
        at org.apache.cassandra.streaming.FileStreamTask.runMayThrow(FileStreamTask.java:91)
        at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
        ... 3 more
Exception in thread "Streaming to /#.#.#.#:1" java.lang.RuntimeException: java.io.EOFException
        at com.google.common.base.Throwables.propagate(Throwables.java:160)
        at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:32)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
        at java.lang.Thread.run(Thread.java:682)
Caused by: java.io.EOFException
        at java.io.DataInputStream.readInt(DataInputStream.java:375)
        at org.apache.cassandra.streaming.FileStreamTask.receiveReply(FileStreamTask.java:193)
        at org.apache.cassandra.streaming.compress.CompressedFileStreamTask.stream(CompressedFileStreamTask.java:120)
        at org.apache.cassandra.streaming.FileStreamTask.runMayThrow(FileStreamTask.java:91)
        at org.apache.cassandra.utils.WrappedRunnable.run(WrappedRunnable.java:28)
        ... 3 more

In the Cassandra system.log, the following error is reported:

ERROR [Thread-15] 2015-02-10 11:07:39,287 CassandraDaemon.java (line 191) Exception in thread Thread[Thread-15,5,main]
java.lang.RuntimeException: Cannot create CompressionParameters for parameters
        at org.apache.cassandra.io.compress.CompressionParameters$Serializer.deserialize(CompressionParameters.java:333)
        at org.apache.cassandra.io.compress.CompressionParameters$Serializer.deserialize(CompressionParameters.java:300)
        at org.apache.cassandra.streaming.compress.CompressionInfo$CompressionInfoSerializer.deserialize(CompressionInfo.java:76)
        at org.apache.cassandra.streaming.compress.CompressionInfo$CompressionInfoSerializer.deserialize(CompressionInfo.java:46)
        at org.apache.cassandra.streaming.PendingFile$PendingFileSerializer.deserialize(PendingFile.java:163)
        at org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.deserialize(StreamHeader.java:74)
        at org.apache.cassandra.streaming.StreamHeader$StreamHeaderSerializer.deserialize(StreamHeader.java:58)
        at org.apache.cassandra.net.IncomingTcpConnection.handleStream(IncomingTcpConnection.java:183)
        at org.apache.cassandra.net.IncomingTcpConnection.run(IncomingTcpConnection.java:79)
Caused by: 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.io.compress.CompressionParameters.createCompressor(CompressionParameters.java:179)
        at org.apache.cassandra.io.compress.CompressionParameters.<init>(CompressionParameters.java:71)
        at org.apache.cassandra.io.compress.CompressionParameters$Serializer.deserialize(CompressionParameters.java:329)
        ... 8 more
Caused by: java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.cassandra.io.compress.CompressionParameters.createCompressor(CompressionParameters.java:156)
        ... 10 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.xerial.snappy.Snappy
        at org.apache.cassandra.io.compress.SnappyCompressor.create(SnappyCompressor.java:45)
        ... 15 more

Cause

The dataload is failing because the table schema definition do not match.

In this instance, the schema for the source table is configured with:

compression={'sstable_compression': 'SnappyCompressor'}

but the destination table does not have compression enabled:

compression={ }

Solution

Update the destination table schema with ALTER TABLE so that it matches the definition of the source table. This should allow the data to be loaded to the destination cluster.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk