Module cloudi_service_db_cassandra

CloudI Cassandra Data Module

This ia a _very_ thin shim on top of erlang_cassandra from https://github.com/dieswaytoofast/erlang_cassandraNote that your results are "double ok"d.

Copyright © 2013 Mahesh Paolini-Subramanya

Version: 1.3.0 Sep 30 2014 14:05:48 ------------------------------------------------------------------------

Behaviours: cloudi_service.

Authors: Mahesh Paolini-Subramanya (mahesh@dieswaytoofast.com).

Description

CloudI Cassandra Data Module

This ia a _very_ thin shim on top of erlang_cassandra from https://github.com/dieswaytoofast/erlang_cassandraNote that your results are "double ok"d. i.e., whatever erlang_cassandra sends back is sent back from send_sync. As a result, all successful responses will be of the form {ok, {ok, Response}} All failures from erlang_cassandra will be of the form {ok, {error, Reason}} send_sync errors will be standard 'cloudi' errors

Data Types

client_name()

client_name() = binary()

column()

column() = #column{name = undefined | string() | binary(), value = undefined | string() | binary(), timestamp = undefined | integer(), ttl = undefined | integer()}

column_family()

column_family() = binary()

column_family_definition()

column_family_definition() = #cfDef{keyspace = undefined | string() | binary(), name = undefined | string() | binary(), column_type = string() | binary(), comparator_type = string() | binary(), subcomparator_type = undefined | string() | binary(), comment = undefined | string() | binary(), read_repair_chance = undefined | float(), column_metadata = undefined | list(), gc_grace_seconds = undefined | integer(), default_validation_class = undefined | string() | binary(), id = undefined | integer(), min_compaction_threshold = undefined | integer(), max_compaction_threshold = undefined | integer(), replicate_on_write = undefined | boolean(), key_validation_class = undefined | string() | binary(), key_alias = undefined | string() | binary(), compaction_strategy = undefined | string() | binary(), compaction_strategy_options = undefined | dict(), compression_options = undefined | dict(), bloom_filter_fp_chance = undefined | float(), caching = string() | binary(), dclocal_read_repair_chance = float(), populate_io_cache_on_flush = undefined | boolean(), row_cache_size = undefined | float(), key_cache_size = undefined | float(), row_cache_save_period_in_seconds = undefined | integer(), key_cache_save_period_in_seconds = undefined | integer(), memtable_flush_after_mins = undefined | integer(), memtable_throughput_in_mb = undefined | integer(), memtable_operations_in_millions = undefined | float(), merge_shards_chance = undefined | float(), row_cache_provider = undefined | string() | binary(), row_cache_keys_to_save = undefined | integer()}

column_parent()

column_parent() = #columnParent{column_family = undefined | string() | binary(), super_column = undefined | string() | binary()}

column_path()

column_path() = #columnPath{column_family = undefined | string() | binary(), super_column = undefined | string() | binary(), column = undefined | string() | binary()}

column_timestamp()

column_timestamp() = non_neg_integer()

compression()

compression() = binary()

consistency_level()

consistency_level() = non_neg_integer()

counter_column()

counter_column() = #counterColumn{name = undefined | string() | binary(), value = undefined | integer()}

cql_query()

cql_query() = binary()

cql_query_id()

cql_query_id() = integer()

destination()

destination() = server_ref() | fq_server_ref()

dispatcher()

dispatcher() = cloudi_service:dispatcher() | cloudi:context()

error()

error() = {error, Reason::term()}

fq_server_ref()

fq_server_ref() = {thrift_host(), thrift_port(), server_ref()}

key_range()

key_range() = #keyRange{start_key = undefined | string() | binary(), end_key = undefined | string() | binary(), start_token = undefined | string() | binary(), end_token = undefined | string() | binary(), row_filter = undefined | list(), count = integer()}

keyspace_definition()

keyspace_definition() = #ksDef{name = undefined | string() | binary(), strategy_class = undefined | string() | binary(), strategy_options = undefined | dict(), replication_factor = undefined | integer(), cf_defs = list(), durable_writes = boolean()}

name()

name() = cloudi_service:service_name()

response()

response() = [tuple()] | error()

row_key()

row_key() = binary()

server_ref()

server_ref() = atom() | pid() | client_name()

slice_predicate()

slice_predicate() = #slicePredicate{column_names = undefined | list(), slice_range = undefined | #sliceRange{start = undefined | string() | binary(), finish = undefined | string() | binary(), reversed = boolean(), count = integer()}}

thrift_host()

thrift_host() = undefined | string()

thrift_port()

thrift_port() = undefined | integer()

Function Index

add/7Increment a counter column.
cloudi_service_handle_info/3
cloudi_service_handle_request/11
cloudi_service_init/3
cloudi_service_terminate/2
describe_cluster_name/2Get the cluster_name.
describe_keyspace/3Describe the keyspace used by the connection.
describe_keyspaces/2Get the list of all the keyspaces.
describe_partitioner/2Get the partitioner used for the cluster.
describe_ring/3Gets the token ring; a map of ranges to host addresses.
describe_schema_versions/2Get the schema_versions used for the cluster.
describe_snitch/2Get the snitch used for the cluster.
describe_version/2Get the Thrift API version.
execute_cql_query/4Execute a CQL query.
execute_prepared_cql_query/4Execute a prepared a CQL query.
get/6Get a column.
get_count/7Count columns based on a slice WARNING: NOT O(1).
get_indexed_slices/7Get a list of slices using IndexRange.
get_range_slices/7Get a list of slices for the keys within the specified KeyRange.
get_slice/7Get a group of columns based on a slice.
insert/7Insert a column.
multiget_count/7Count columns based on a slice and a list of rows WARNING: NOT O(1).
multiget_slice/7Get a group of columns based on a slice and a list of rows.
prepare_cql_query/4Prepare a CQL query.
remove/7Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp.
remove_counter/6Remove a counter.
set_keyspace/3Set the keyspace to be used by the connection.
system_add_column_family/3Add a column family.
system_add_keyspace/3Add a keyspace.
system_describe_column_family/4Get the column family definition.
system_drop_column_family/4Drop a column family.
system_drop_keyspace/3Remove a keyspace.
system_update_column_family/3Update a column family.
system_update_keyspace/3Update a keyspace.
truncate/4Remove all rows from a column family.

Function Details

add/7

add(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKey::row_key(), ColumnParent::column_parent(), CounterColumn::counter_column(), ConsistencyLevel::consistency_level()) -> response()

Increment a counter column

cloudi_service_handle_info/3

cloudi_service_handle_info(Request, State, X3) -> any()

cloudi_service_handle_request/11

cloudi_service_handle_request(Type, Name, Pattern, RequestInfo, Request, Timeout, Priority, TransId, Pid, State, Dispatcher) -> any()

cloudi_service_init/3

cloudi_service_init(Args, Prefix, Dispatcher) -> any()

cloudi_service_terminate/2

cloudi_service_terminate(X1, State) -> any()

describe_cluster_name/2

describe_cluster_name(Dispatcher::dispatcher(), Name::name()) -> response()

Get the cluster_name

describe_keyspace/3

describe_keyspace(Dispatcher::dispatcher(), Name::name(), Destination::destination()) -> response()

Describe the keyspace used by the connection

describe_keyspaces/2

describe_keyspaces(Dispatcher::dispatcher(), Name::name()) -> response()

Get the list of all the keyspaces

describe_partitioner/2

describe_partitioner(Dispatcher::dispatcher(), Name::name()) -> response()

Get the partitioner used for the cluster

describe_ring/3

describe_ring(Dispatcher::dispatcher(), Name::name(), Destination::destination()) -> response()

Gets the token ring; a map of ranges to host addresses

describe_schema_versions/2

describe_schema_versions(Dispatcher::dispatcher(), Name::name()) -> response()

Get the schema_versions used for the cluster

describe_snitch/2

describe_snitch(Dispatcher::dispatcher(), Name::name()) -> response()

Get the snitch used for the cluster

describe_version/2

describe_version(Dispatcher::dispatcher(), Name::name()) -> response()

Get the Thrift API version

execute_cql_query/4

execute_cql_query(Dispatcher::dispatcher(), Name::name(), CqlQuery::cql_query(), Compression::compression()) -> response()

Execute a CQL query

execute_prepared_cql_query/4

execute_prepared_cql_query(Dispatcher::dispatcher(), Name::name(), CqlQuery::cql_query_id(), Values::list()) -> response()

Execute a prepared a CQL query

get/6

get(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKey::row_key(), ColumnPath::column_path(), ConsistencyLevel::consistency_level()) -> response()

Get a column

get_count/7

get_count(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKey::row_key(), ColumnParent::column_parent(), SlicePredicate::slice_predicate(), ConsistencyLevel::consistency_level()) -> response()

Count columns based on a slice WARNING: NOT O(1)

get_indexed_slices/7

get_indexed_slices(Dispatcher::dispatcher(), Name::name(), Destination::destination(), ColumnParent::column_parent(), IndexClause::slice_predicate(), SlicePredicate::key_range(), ConsistencyLevel::consistency_level()) -> response()

Get a list of slices using IndexRange

get_range_slices/7

get_range_slices(Dispatcher::dispatcher(), Name::name(), Destination::destination(), ColumnParent::column_parent(), SlicePredicate::slice_predicate(), KeyRange::key_range(), ConsistencyLevel::consistency_level()) -> response()

Get a list of slices for the keys within the specified KeyRange

get_slice/7

get_slice(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKey::row_key(), ColumnParent::column_parent(), SlicePredicate::slice_predicate(), ConsistencyLevel::consistency_level()) -> response()

Get a group of columns based on a slice

insert/7

insert(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKey::row_key(), ColumnParent::column_parent(), Column::column(), ConsistencyLevel::consistency_level()) -> response()

Insert a column

multiget_count/7

multiget_count(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKeys::[row_key()], ColumnParent::column_parent(), SlicePredicate::slice_predicate(), ConsistencyLevel::consistency_level()) -> response()

Count columns based on a slice and a list of rows WARNING: NOT O(1)

multiget_slice/7

multiget_slice(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKeys::[row_key()], ColumnParent::column_parent(), SlicePredicate::slice_predicate(), ConsistencyLevel::consistency_level()) -> response()

Get a group of columns based on a slice and a list of rows

prepare_cql_query/4

prepare_cql_query(Dispatcher::dispatcher(), Name::name(), CqlQuery::cql_query(), Compression::compression()) -> response()

Prepare a CQL query

remove/7

remove(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKey::row_key(), ColumnPath::column_path(), ColumnTimestamp::column_timestamp(), ConsistencyLevel::consistency_level()) -> response()

Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp

remove_counter/6

remove_counter(Dispatcher::dispatcher(), Name::name(), Destination::destination(), RowKey::row_key(), ColumnPath::column_path(), ConsistencyLevel::consistency_level()) -> response()

Remove a counter

set_keyspace/3

set_keyspace(Dispatcher::dispatcher(), Name::name(), Destination::destination()) -> response()

Set the keyspace to be used by the connection

system_add_column_family/3

system_add_column_family(Dispatcher::dispatcher(), Name::name(), ColumnFamilyDefinition::column_family_definition()) -> response()

Add a column family

system_add_keyspace/3

system_add_keyspace(Dispatcher::dispatcher(), Name::name(), KeyspaceDefinition::keyspace_definition()) -> response()

Add a keyspace

system_describe_column_family/4

system_describe_column_family(Dispatcher::dispatcher(), Name::name(), Destination::destination(), ColumnFamily::column_family()) -> response()

Get the column family definition

system_drop_column_family/4

system_drop_column_family(Dispatcher::dispatcher(), Name::name(), Destination::destination(), ColumnFamily::column_family()) -> response()

Drop a column family

system_drop_keyspace/3

system_drop_keyspace(Dispatcher::dispatcher(), Name::name(), Destination::destination()) -> response()

Remove a keyspace

system_update_column_family/3

system_update_column_family(Dispatcher::dispatcher(), Name::name(), ColumnFamilyDefinition::column_family_definition()) -> response()

Update a column family

system_update_keyspace/3

system_update_keyspace(Dispatcher::dispatcher(), Name::name(), KeyspaceDefinition::keyspace_definition()) -> response()

Update a keyspace

truncate/4

truncate(Dispatcher::dispatcher(), Name::name(), Destination::destination(), ColumnFamily::column_family()) -> response()

Remove all rows from a column family


Generated by EDoc, Sep 30 2014, 14:05:48.