cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Cassandra Wiki] Update of "API" by jeremyhanna
Date Wed, 02 Mar 2011 22:30:04 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Cassandra Wiki" for change notification.

The "API" page has been changed by jeremyhanna.
The comment on this change is: Adding schema api stuff..
http://wiki.apache.org/cassandra/API?action=diff&rev1=11&rev2=12

--------------------------------------------------

  Gets 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.
  
  === describe_keyspace ===
-  . `map<string, map<string, string>> describe_keyspace(keyspace)`
+ 
+  . `KsDef describe_keyspace(string keyspace)`
  
  Gets information about the specified keyspace.
+ 
+ === describe_keyspaces ===
+ 
+  . `list<KsDef> describe_keyspaces()`
+ 
+ Gets a list of all the keyspaces configured for the cluster. (Equivalent to calling describe_keyspace(k)
for k in keyspaces.)
+ 
+ === truncate ===
+ 
+  . `truncate(string column_family)`
+ 
+ Removes all the rows from the given column family.
+ 
+ === system_add_column_family ===
+ 
+  . `string system_add_column_family(CFDef cf_def)`
+ 
+ Adds a column family. This method will throw an exception if a column family with the same
name is already associated with the keyspace. Returns the new schema version ID.
+ 
+ === system_drop_column_family ===
+ 
+  . `string system_drop_column_family(ColumnFamily column_family)`
+ 
+ Drops a column family. Creates a snapshot and then submits a 'graveyard' compaction during
which the abandoned files will be deleted. Returns the new schema version ID.
+ 
+ === system_rename_column_family ===
+ 
+  . `string system_rename_column_family(string old_name, string new_name)`
+ 
+ Renames a column family if the new name doesn't collide with an existing column family associated
with the same keyspace. This operation blocks while the operating system renames files on
disk. Returns the new schema version ID.
+ 
+ === system_add_keyspace ===
+ 
+  . `string system_add_keyspace(KSDef ks_def)`
+ 
+ Creates a new keyspace and any column families defined with it.  Callers '''are not required'''
to first create an empty keyspace and then create column families for it.  Returns the new
schema version ID.
+ 
+ === system_drop_keyspace ===
+ 
+  . `string system_drop_keyspace(string keyspace)`
+ 
+ Drops a keyspace. Creates a snapshot and then submits a 'graveyard' compaction during which
the abandoned files will be deleted. Returns the new schema version ID.
+ 
+ === system_rename_keyspace ===
+ 
+  . `string system_rename_keyspace(string old_name, string new_name)`
+ 
+ Renames a keyspace if the new name doesn't collide with an existing keyspace. This operation
blocks while the operating system renames files on disk. Returns the new schema version ID.
  
  == Examples ==
  [[http://wiki.apache.org/cassandra/ClientExamples|There are a few examples on this page
over here.]]

Mime
View raw message