Cassandra is an eventually consistent key value store similar to HBase and Google`s Bigtable. It implements a distributed hash map with column families originally it supported a Thrift based API very close to HBase`s. Lately Cassandra has moved towards a SQL like query language with much more flexibility around data types, joints and filters. Thankfully the Thrift interface is still there so it`s easy to convert the OpenTSDB HBase schema and calls to Cassandra at a low level through the AsyncHBase HBaseClient
API. AsyncCassandra is a shim between OpenTSDB and Cassandra for trying out TSDB with an alternate backend.
ByteOrderedPartitioner
. This is critical as we require the row keys to be sorted. Because this setting affects the entire node, you may need to setup a cluster dedicated to OpenTSDB.create keyspace tsdb; use tsdb; create column family t with comparator = BytesType; create keyspace tsdbuid; use tsdbuid; create column family id with comparator = BytesType; create column family name with comparator = BytesType;
If you intend to use meta data or tree features, repeat the keyspace creation with the proper table name.
The following is a table with required and optional parameters to run OpenTSDB with Cassandra. These are in addition to the standard TSD configuration parameters from Configuration
Property | Type | Required | Description | Default |
---|---|---|---|---|
asynccassandra.seeds | String | Required | The list of nodes in your Cassandra cluster. These can be formatted <hostname>:<port> | |
asynccassandra.port | Integer | Optional | An optional port to use for all nodes if not configured in the seeds setting. | 9160 |
© 2010–2016 The OpenTSDB Authors
Licensed under the GNU LGPLv2.1+ and GPLv3+ licenses.
http://opentsdb.net/docs/build/html/user_guide/backends/cassandra.html