Database Reference
In-Depth Information
1: optional list<binary> column_names,
2: optional SliceRange slice_range,
}
struct KeyRange {
1: optional string start_key,
2: optional string end_key,
3: optional string start_token,
4: optional string end_token,
5: required i32 count=100
}
//service operations
service Cassandra {
# auth methods
void login(1: required string keyspace, 2:required AuthenticationRequest
auth_request)
throws (1:AuthenticationException authnx, 2:AuthorizationException
authzx),
i32 get_count(1:required string keyspace,
2:required string key,
3:required ColumnParent column_parent,
4:required ConsistencyLevel consistency_level=ONE)
throws (1:InvalidRequestException ire, 2:UnavailableException ue,
3:TimedOutException te),
//etc...
//meta-APIs
/** list the defined keyspaces in this cluster */
set<string> describe_keyspaces(),
//etc...
Here I have shown a representative sample of what's in the Thrift definition source file that
makes up the Cassandra API. By looking at this file you can understand how Thrift definitions
are made, what types of operations are available from the Cassandra client interface, and what
kind of data structures they use.
In the Cassandra distribution, the same interfacefolder that has this .thriftile also has a folder
called thrift. This folder contains subfolders, one for each language that has bindings generated
from Thrift based on the definitions.
When Cassandra is built, here's what happens. The Ant build executes the following targets to
create bindings for Java, Python, and Perl:
Search WWH ::




Custom Search