SnappyCompressor.create() threw an error: org.xerial.snappy.SnappyError [FAILED_TO_LOAD_NATIVE_LIBRARY] null
As you are aware compression on Column Families was introduced in Cassandra 1 for space saving and increased disk IO (http://www.datastax.com/dev/blog/whats-new-in-cassandra-1-0-compression). By default the compression is Snappy using the Google Snappy Library (http://code.google.com/p/snappy-java/ ) which is a wrapper for Google Snappy (http://code.google.com/p/snappy/) written in C++. There is no port for Google Snappy on the Pi and my initial attempts to build one have not been successful (autogen.sh is failing with undefined macro AC_DEFINE)
You should be able to create a column family with DeflateCompressor from cqlsh as follows:
create TABLE users (KEY varchar Primary key, password varchar, gender varchar) WITH compression_parameters:sstable_compressor = 'DeflateCompressor';
However that’s failing with the same Snappy Compressor error. Describing the Keyspace with Cassandra-cli gives the following:
Keyspace: test:
Replication Strategy: org.apache.cassandra.locator.SimpleStrategy
Durable Writes: true
Options: [replication_factor:1]
Column Families:
ColumnFamily: users
Key Validation Class: org.apache.cassandra.db.marshal.UTF8Type
Default column value validator: org.apache.cassandra.db.marshal.UTF8Type
Columns sorted by: org.apache.cassandra.db.marshal.UTF8Type
GC grace seconds: 864000
Compaction min/max thresholds: 4/32
Read repair chance: 0.1
DC Local Read repair chance: 0.0
Replicate on write: true
Caching: KEYS_ONLY
Bloom Filter FP chance: default
Built indexes: []
Column Metadata:
Column Name: password
Validation Class: org.apache.cassandra.db.marshal.UTF8Type
Column Name: gender
Validation Class: org.apache.cassandra.db.marshal.UTF8Type
Compaction Strategy: org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy
Compression Options:
sstable_compressor: DeflateCompressor
sstable_compression: org.apache.cassandra.io.compress.SnappyCompressor
Note the two compressors in action. I’m not sure quite what’s going on, or if this is the correct result at the moment but I’m continuing to investigate (any answers gratefully received. So for now it’s back to Apache Cassandra 0.8.10 which doesn’t have compression and seems to work on the Pi (once the env file has been changed).
Update
Thanks to Jonathan Ellis for pointing out the command should be:
Create TABLE users2 (KEY varchar Primary key, password varchar, gender varchar) WITH compression_parameters:sstable_compression = 'DeflateCompressor';
It's showing you the correct option name there, still defaulting to Snappy. The bug is that it allowed you to specify the (ignored) _compressor option as well...
ReplyDeleteSo, WITH compression_parameters:sstable_compression = '' should disable it, or DeflateCompressor to use deflate.
I've created https://issues.apache.org/jira/browse/CASSANDRA-4266 to check for unknown parameters.
Thanks Jonathan
ReplyDeleteAccording to JIRA, CASSANDRA-4266 was fixed in Cassandra 1.1.1.
ReplyDeleteYour blogs and its stuff are so notable and worthwhile it can make me return. great american business products
ReplyDeleteGreat blog you people have made here on this blog site, I will absolutely appreciate your work.
ReplyDeletegood infographics
Really amazing blog, I’d love to discover some extra information.
ReplyDeletesocial media infographics
Congratulations guys, quality information you have given!!!
ReplyDeleteinfographic design
You have an effect on is totally appreciative and full of interest.social media infographics
ReplyDeleteThis is an informative blog by which I have got that info which I really wanted to get.
ReplyDeletegood infographics
I love this blog because it is user friendly with appreciative information. good infographics
ReplyDeletecongratulations guys, quality information you have given!!! ACLS Renewal
ReplyDeleteEach time I used to always check blog posts within the first hours in the break of day, because I like to get information increasingly more. comment pirater un compte facebook
ReplyDeleteI know this is quality based blogs along with other stuff.
ReplyDeleteThe vital information in this blogs has allured me. pirater un compte facebook
ReplyDeleteAwesome blog! Now In anticipation of a follow-up …. ny criminal attorney
ReplyDeleteI was searching for many blogs site and now finally I have got this cool place with lots of information.
ReplyDeletefree open source ftp client
I have visited lots of the blogs but this blog is truthfully wonderful.vietnam holiday
ReplyDeleteI am truly appreciative to the owner of this website who has shared this nice article at this wonderful place.
ReplyDeleteweight loss supplements for women
Thumbs up guys you are really carrying out a great job.vietnam travel
ReplyDeleteI suppose this info is completely unique.vietnam travel
ReplyDeleteIt’s a classic great for me to go to this blog site, it offers helpful suggestions hair loss
ReplyDeleteYour composing is purely awe-inspiring that I desired to read such high quality material...
ReplyDeletedata cabling brisbane