Database Reference
In-Depth Information
UnavailableException
UnavailableException
Not all of the Cassandra replicas that are required to meet the quorum for a read or write are
available. This exception is not thrown from the Thrift interface.
Thrift Summary
If you want to use Thrift directly for your project, there are numerous prerequisites for working
on Windows (see http://wiki.apache.org/thrift/ThriftInstallationWin32 ) and many things that can
go wrong. Partly because the Thrift project is still nascent, has limitations with transport imple-
mentations, and has not received a lot of direct attention since its open source inception, Cas-
sandra is probably switching to Avro.
Avro
The Apache Avro project is a data serialization and RPC system targeted as the replacement for
Thrift in Cassandra, starting with version 0.7. Avro was created by Doug Cutting, most famous
perhaps for creating Apache Hadoop, the implementation of Google's MapReduce algorithm.
Avro provides many features similar to those of Thrift and other data serialization and RPC
mechanisms such as Google's Protocol Buffer, including:
▪ Robust data structures
▪ An efficient, small binary format for RPC calls
▪ Easy integration with dynamically typed languages such as Python, Ruby, Smalltalk, Perl,
PHP, and Objective-C
Avro has certain advantages that Thrift doesn't, in particular the fact that static code generation
is not required to use RPC for your application, though you can use it for performance optim-
ization for statically typed languages. The project is somewhat more mature (the current release
version is 1.3.2) and more active.
When you execute the Cassandra Ant file, the build target calls, among other things, the avro-
generate target, which generates the Avro interfaces. These files are in the same interfacedir-
ectory where Thrift-generated files are. To find the complete definition of the Avro interface for
Cassandra, look in the cassandra.avprile, which contains the JSON defining all the messages
and operations that Cassandra clients can use.
{
"namespace": "org.apache.cassandra.avro",
"protocol": "Cassandra",
Search WWH ::




Custom Search