org.apache.cassandra.thrift
Interface Cassandra.Iface

All Known Implementing Classes:
Cassandra.Client, CassandraServer
Enclosing class:
Cassandra

public static interface Cassandra.Iface


Method Summary
 void batch_insert(java.lang.String keyspace, java.lang.String key, java.util.Map<java.lang.String,java.util.List<ColumnOrSuperColumn>> cfmap, ConsistencyLevel consistency_level)
          Insert Columns or SuperColumns across different Column Families for the same row key.
 void batch_mutate(java.lang.String keyspace, java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<Mutation>>> mutation_map, ConsistencyLevel consistency_level)
          Mutate many columns or super columns for many row keys.
 java.lang.String describe_cluster_name()
          get the cluster name
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> describe_keyspace(java.lang.String keyspace)
          describe specified keyspace
 java.util.Set<java.lang.String> describe_keyspaces()
          list the defined keyspaces in this cluster
 java.lang.String describe_partitioner()
          returns the partitioner used by this cluster
 java.util.List<TokenRange> describe_ring(java.lang.String keyspace)
          get the token ring: a map of ranges to host addresses, represented as a set of TokenRange instead of a map from range to list of endpoints, because you can't use Thrift structs as map keys: https://issues.apache.org/jira/browse/THRIFT-162 for the same reason, we can't return a set here, even though order is neither important nor predictable.
 java.util.List<java.lang.String> describe_splits(java.lang.String start_token, java.lang.String end_token, int keys_per_split)
          experimental API for hadoop/parallel query support.
 java.lang.String describe_version()
          get the thrift api version
 int get_count(java.lang.String keyspace, java.lang.String key, ColumnParent column_parent, ConsistencyLevel consistency_level)
          returns the number of columns for a particular key and ColumnFamily or SuperColumn.
 java.util.List<KeySlice> get_range_slice(java.lang.String keyspace, ColumnParent column_parent, SlicePredicate predicate, java.lang.String start_key, java.lang.String finish_key, int row_count, ConsistencyLevel consistency_level)
          returns a subset of columns for a range of keys.
 java.util.List<KeySlice> get_range_slices(java.lang.String keyspace, ColumnParent column_parent, SlicePredicate predicate, KeyRange range, ConsistencyLevel consistency_level)
          returns a subset of columns for a range of keys.
 java.util.List<ColumnOrSuperColumn> get_slice(java.lang.String keyspace, java.lang.String key, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
          Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name pair) specified by the given SlicePredicate.
 java.util.List<java.lang.String> get_string_list_property(java.lang.String property)
          get property whose value is list of strings.
 java.lang.String get_string_property(java.lang.String property)
          get property whose value is of type string.
 ColumnOrSuperColumn get(java.lang.String keyspace, java.lang.String key, ColumnPath column_path, ConsistencyLevel consistency_level)
          Get the Column or SuperColumn at the given column_path.
 void insert(java.lang.String keyspace, java.lang.String key, ColumnPath column_path, byte[] value, long timestamp, ConsistencyLevel consistency_level)
          Insert a Column consisting of (column_path.column, value, timestamp) at the given column_path.column_family and optional column_path.super_column.
 void login(java.lang.String keyspace, AuthenticationRequest auth_request)
           
 java.util.Map<java.lang.String,java.util.List<ColumnOrSuperColumn>> multiget_slice(java.lang.String keyspace, java.util.List<java.lang.String> keys, ColumnParent column_parent, SlicePredicate predicate, ConsistencyLevel consistency_level)
          Performs a get_slice for column_parent and predicate for the given keys in parallel.
 java.util.Map<java.lang.String,ColumnOrSuperColumn> multiget(java.lang.String keyspace, java.util.List<java.lang.String> keys, ColumnPath column_path, ConsistencyLevel consistency_level)
          Perform a get for column_path in parallel on the given list keys.
 void remove(java.lang.String keyspace, java.lang.String key, ColumnPath column_path, long timestamp, ConsistencyLevel consistency_level)
          Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp.
 

Method Detail

login

void login(java.lang.String keyspace,
           AuthenticationRequest auth_request)
           throws AuthenticationException,
                  AuthorizationException,
                  org.apache.thrift.TException
Throws:
AuthenticationException
AuthorizationException
org.apache.thrift.TException

get

ColumnOrSuperColumn get(java.lang.String keyspace,
                        java.lang.String key,
                        ColumnPath column_path,
                        ConsistencyLevel consistency_level)
                        throws InvalidRequestException,
                               NotFoundException,
                               UnavailableException,
                               TimedOutException,
                               org.apache.thrift.TException
Get the Column or SuperColumn at the given column_path. If no value is present, NotFoundException is thrown. (This is the only method that can throw an exception under non-failure conditions.)

Parameters:
keyspace -
key -
column_path -
consistency_level -
Throws:
InvalidRequestException
NotFoundException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_slice

java.util.List<ColumnOrSuperColumn> get_slice(java.lang.String keyspace,
                                              java.lang.String key,
                                              ColumnParent column_parent,
                                              SlicePredicate predicate,
                                              ConsistencyLevel consistency_level)
                                              throws InvalidRequestException,
                                                     UnavailableException,
                                                     TimedOutException,
                                                     org.apache.thrift.TException
Get the group of columns contained by column_parent (either a ColumnFamily name or a ColumnFamily/SuperColumn name pair) specified by the given SlicePredicate. If no matching values are found, an empty list is returned.

Parameters:
keyspace -
key -
column_parent -
predicate -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

multiget

java.util.Map<java.lang.String,ColumnOrSuperColumn> multiget(java.lang.String keyspace,
                                                             java.util.List<java.lang.String> keys,
                                                             ColumnPath column_path,
                                                             ConsistencyLevel consistency_level)
                                                             throws InvalidRequestException,
                                                                    UnavailableException,
                                                                    TimedOutException,
                                                                    org.apache.thrift.TException
Perform a get for column_path in parallel on the given list keys. The return value maps keys to the ColumnOrSuperColumn found. If no value corresponding to a key is present, the key will still be in the map, but both the column and super_column references of the ColumnOrSuperColumn object it maps to will be null.

Parameters:
keyspace -
keys -
column_path -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

multiget_slice

java.util.Map<java.lang.String,java.util.List<ColumnOrSuperColumn>> multiget_slice(java.lang.String keyspace,
                                                                                   java.util.List<java.lang.String> keys,
                                                                                   ColumnParent column_parent,
                                                                                   SlicePredicate predicate,
                                                                                   ConsistencyLevel consistency_level)
                                                                                   throws InvalidRequestException,
                                                                                          UnavailableException,
                                                                                          TimedOutException,
                                                                                          org.apache.thrift.TException
Performs a get_slice for column_parent and predicate for the given keys in parallel.

Parameters:
keyspace -
keys -
column_parent -
predicate -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_count

int get_count(java.lang.String keyspace,
              java.lang.String key,
              ColumnParent column_parent,
              ConsistencyLevel consistency_level)
              throws InvalidRequestException,
                     UnavailableException,
                     TimedOutException,
                     org.apache.thrift.TException
returns the number of columns for a particular key and ColumnFamily or SuperColumn.

Parameters:
keyspace -
key -
column_parent -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_range_slice

java.util.List<KeySlice> get_range_slice(java.lang.String keyspace,
                                         ColumnParent column_parent,
                                         SlicePredicate predicate,
                                         java.lang.String start_key,
                                         java.lang.String finish_key,
                                         int row_count,
                                         ConsistencyLevel consistency_level)
                                         throws InvalidRequestException,
                                                UnavailableException,
                                                TimedOutException,
                                                org.apache.thrift.TException
returns a subset of columns for a range of keys.

Parameters:
keyspace -
column_parent -
predicate -
start_key -
finish_key -
row_count -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_range_slices

java.util.List<KeySlice> get_range_slices(java.lang.String keyspace,
                                          ColumnParent column_parent,
                                          SlicePredicate predicate,
                                          KeyRange range,
                                          ConsistencyLevel consistency_level)
                                          throws InvalidRequestException,
                                                 UnavailableException,
                                                 TimedOutException,
                                                 org.apache.thrift.TException
returns a subset of columns for a range of keys.

Parameters:
keyspace -
column_parent -
predicate -
range -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

insert

void insert(java.lang.String keyspace,
            java.lang.String key,
            ColumnPath column_path,
            byte[] value,
            long timestamp,
            ConsistencyLevel consistency_level)
            throws InvalidRequestException,
                   UnavailableException,
                   TimedOutException,
                   org.apache.thrift.TException
Insert a Column consisting of (column_path.column, value, timestamp) at the given column_path.column_family and optional column_path.super_column. Note that column_path.column is here required, since a SuperColumn cannot directly contain binary values -- it can only contain sub-Columns.

Parameters:
keyspace -
key -
column_path -
value -
timestamp -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

batch_insert

void batch_insert(java.lang.String keyspace,
                  java.lang.String key,
                  java.util.Map<java.lang.String,java.util.List<ColumnOrSuperColumn>> cfmap,
                  ConsistencyLevel consistency_level)
                  throws InvalidRequestException,
                         UnavailableException,
                         TimedOutException,
                         org.apache.thrift.TException
Insert Columns or SuperColumns across different Column Families for the same row key. batch_mutation is a map> -- a map which pairs column family names with the relevant ColumnOrSuperColumn objects to insert.

Parameters:
keyspace -
key -
cfmap -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

remove

void remove(java.lang.String keyspace,
            java.lang.String key,
            ColumnPath column_path,
            long timestamp,
            ConsistencyLevel consistency_level)
            throws InvalidRequestException,
                   UnavailableException,
                   TimedOutException,
                   org.apache.thrift.TException
Remove data from the row specified by key at the granularity specified by column_path, and the given timestamp. Note that all the values in column_path besides column_path.column_family are truly optional: you can remove the entire row by just specifying the ColumnFamily, or you can remove a SuperColumn or a single Column by specifying those levels too.

Parameters:
keyspace -
key -
column_path -
timestamp -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

batch_mutate

void batch_mutate(java.lang.String keyspace,
                  java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.util.List<Mutation>>> mutation_map,
                  ConsistencyLevel consistency_level)
                  throws InvalidRequestException,
                         UnavailableException,
                         TimedOutException,
                         org.apache.thrift.TException
Mutate many columns or super columns for many row keys. See also: Mutation. mutation_map maps key to column family to a list of Mutation objects to take place at that scope. *

Parameters:
keyspace -
mutation_map -
consistency_level -
Throws:
InvalidRequestException
UnavailableException
TimedOutException
org.apache.thrift.TException

get_string_property

java.lang.String get_string_property(java.lang.String property)
                                     throws org.apache.thrift.TException
get property whose value is of type string. @Deprecated

Parameters:
property -
Throws:
org.apache.thrift.TException

get_string_list_property

java.util.List<java.lang.String> get_string_list_property(java.lang.String property)
                                                          throws org.apache.thrift.TException
get property whose value is list of strings. @Deprecated

Parameters:
property -
Throws:
org.apache.thrift.TException

describe_keyspaces

java.util.Set<java.lang.String> describe_keyspaces()
                                                   throws org.apache.thrift.TException
list the defined keyspaces in this cluster

Throws:
org.apache.thrift.TException

describe_cluster_name

java.lang.String describe_cluster_name()
                                       throws org.apache.thrift.TException
get the cluster name

Throws:
org.apache.thrift.TException

describe_version

java.lang.String describe_version()
                                  throws org.apache.thrift.TException
get the thrift api version

Throws:
org.apache.thrift.TException

describe_ring

java.util.List<TokenRange> describe_ring(java.lang.String keyspace)
                                         throws InvalidRequestException,
                                                org.apache.thrift.TException
get the token ring: a map of ranges to host addresses, represented as a set of TokenRange instead of a map from range to list of endpoints, because you can't use Thrift structs as map keys: https://issues.apache.org/jira/browse/THRIFT-162 for the same reason, we can't return a set here, even though order is neither important nor predictable.

Parameters:
keyspace -
Throws:
InvalidRequestException
org.apache.thrift.TException

describe_partitioner

java.lang.String describe_partitioner()
                                      throws org.apache.thrift.TException
returns the partitioner used by this cluster

Throws:
org.apache.thrift.TException

describe_keyspace

java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> describe_keyspace(java.lang.String keyspace)
                                                                                                   throws NotFoundException,
                                                                                                          org.apache.thrift.TException
describe specified keyspace

Parameters:
keyspace -
Throws:
NotFoundException
org.apache.thrift.TException

describe_splits

java.util.List<java.lang.String> describe_splits(java.lang.String start_token,
                                                 java.lang.String end_token,
                                                 int keys_per_split)
                                                 throws org.apache.thrift.TException
experimental API for hadoop/parallel query support. may change violently and without warning. returns list of token strings such that first subrange is (list[0], list[1]], next is (list[1], list[2]], etc.

Parameters:
start_token -
end_token -
keys_per_split -
Throws:
org.apache.thrift.TException


Copyright © 2010 The Apache Software Foundation