Hector Replaces Cassandra's Thrift API With New v2 API
Hector's API Switch
Hector is a Java client for the Apache Cassandra column oriented database.
Its original aim was to provide developers with J2EE experience, with a set of features for connecting to a datastore. Features included pooled connections with configurable settings, JMX integration for general monitoring and optional performance counters, and an object oriented interface to Cassandra.
Knowledge of Cassandra's Thrift API was assumed when providing these features, but the Hector team attempted to cater to Thrift newbies by restricting the number of new concepts. The Java API that shipped with Cassandra, was code auto-generated from a Thrift API definition file, which meant it lacked features often found in other data store client APIs. Hector was designed to add these missing features, in ways that would be easier for Java developers to learn. This also made Cassandra's Thrift API documentation useful as a point of reference. According to a blog post, the Hector team have decided to change tract. “People do not want to "learn Thrift" - they want to interact with a datastore in a way that is familiar to them,” Nate McCall summarises, citing the issues raised on the mailing lists and community feedback.
Hector are now launching a new higher level API, called v2, which the post describes as “an easier, more intuitive API.” The original API remains largely unchanged – although there has been some refactoring to enforce the separation of operations against a Keyspace versus a cluster - and users still have the option of accessing Thrift, should they desire.
The 'Hector a Java Client for Apache Cassandra' (PDF) is currently online. This PDF attempts to document Hector's settings and configuration, and provides some sample code. This document will be updated as the Hector team gather feedback from the community on the new API.
The current release of Hector is version 0.6.0-15.