• You are here: 
  • Home
  • Errata

Errata

Posted on August 5th, 2011

General:

Command line interface changes from 0.7.X to 0.8.X

The 0.7.X CLI enforced schema differently. Several recipes do not supply column family meta data and then attempt to insert data from the CLI into that column family. This worked in 0.7.x but fails in 0.8.X.

[default@app] set people['ecapriolo']['last']='capriolo';   org.apache.cassandra.db.marshal.MarshalException: cannot parse 'last' as hex bytes

Two solutions exist:
Use CLI functions as described in the Chapter 2 recipe, Using built-in CLI functions.

[default@app] set people[ascii('ecapriolo')][
ascii('last')]=ascii('capriolo');
Value inserted.

Use meta data as described in the Chapter 2 recipe, Using column metadata and comparators for type enforcement

Create column families with metadata.
create column family cars2 with column_metadata=[{column_
name:'weight', validation_class:IntegerType},{column_name:'make',
validation_class:AsciiType}];

Preface

Chapter 5 Description:
These recipes demonstrate how to use features of Cassandra that make available even in
the case of failures or network partitions.
Should be:
These recipes demonstrate how to use features of Cassandra that make it available even in
the case of failures or network partitions.

Chapter 4 Performance Tuning

Recipe: Stopping Cassandra from using swap without disabling it system-wide
Section: Description
…which allows Java to lock itself in memory making it inevitable.
Correction:
…which allows Java to lock itself in memory making it Unevictable.
Section: How to do it..
Step 2:
Enable memory_locking_policy in cassandra.yaml:
memory_locking_policy: required
Is incorrect. This variable does not exist and is not required for memory locking.

Chapter 6 Schema Design

Recipe: Using a lower Replication Factor for disk space saving and performance enhancements
Section: How to do it
Text:
[default@unknown] create keyspace bulkload with strategy_options =
[{replication_factor:1}];

Should be:
[default@unknown] create keyspace bulkload with strategy_options =
[{replication_factor:2}];

Chapter 11: Hadoop and Cassandra

Recipe: A Map-only program that writes to Cassandra using the CassandraOutputFormat

The ColumnFamilyOutputFormat on some versions of 0.7.X used avro. This has been removed in 0.8.X

In the import section change:

import org.apache.cassandra.avro.Column;
import org.apache.cassandra.avro.ColumnOrSuperColumn;
import org.apache.cassandra.avro.Mutation;

To:

import org.apache.cassandra.thrift.Column;
import org.apache.cassandra.thrift.ColumnOrSuperColumn;
import org.apache.cassandra.thrift.Mutation;

Also these jars do not come with Cassandra distribution and do not need to be included with -libjars.

avro-1.4.0-fixes.jar
jackson-core-asl-1.4.0.jar
jackson-mapper-asl-1.4.0.jar

Leave a Reply

You must be logged in to post a comment.