You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2009/07/30 02:29:29 UTC
svn commit: r799140 [1/3] - in /incubator/cassandra/trunk: conf/ interface/
interface/gen-java/org/apache/cassandra/service/
src/java/org/apache/cassandra/cli/ src/java/org/apache/cassandra/config/
src/java/org/apache/cassandra/db/ src/java/org/apache/...
Author: jbellis
Date: Thu Jul 30 00:29:28 2009
New Revision: 799140
URL: http://svn.apache.org/viewvc?rev=799140&view=rev
Log:
table -> keyspace
patch by jbellis; reviewed by Michael Greene for CASSANDRA-271
Added:
incubator/cassandra/trunk/src/java/org/apache/cassandra/db/KeyspaceNotDefinedException.java
- copied, changed from r799065, incubator/cassandra/trunk/src/java/org/apache/cassandra/db/TableNotDefinedException.java
Removed:
incubator/cassandra/trunk/src/java/org/apache/cassandra/db/TableNotDefinedException.java
Modified:
incubator/cassandra/trunk/conf/storage-conf.xml
incubator/cassandra/trunk/interface/cassandra.thrift
incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/ConsistencyLevel.java
incubator/cassandra/trunk/src/java/org/apache/cassandra/cli/Cli.g
incubator/cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
incubator/cassandra/trunk/src/java/org/apache/cassandra/config/DatabaseDescriptor.java
incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraDaemon.java
incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java
incubator/cassandra/trunk/src/java/org/apache/cassandra/service/ThriftValidation.java
incubator/cassandra/trunk/src/java/org/apache/cassandra/tools/NodeProbe.java
incubator/cassandra/trunk/test/conf/storage-conf.xml
incubator/cassandra/trunk/test/system/test_server.py
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/ColumnFamilyStoreTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/ColumnFamilyTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/CommitLogTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/CompactionsTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/MultitableTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/NameSortTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/OneCompactionTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/ReadMessageTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RecoveryManager2Test.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RecoveryManagerTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveColumnFamilyTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveColumnFamilyWithFlush1Test.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveColumnFamilyWithFlush2Test.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveColumnTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSubColumnTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RemoveSuperColumnTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/RowTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TableTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/db/TimeSortTest.java
incubator/cassandra/trunk/test/unit/org/apache/cassandra/service/CassandraServerTest.java
Modified: incubator/cassandra/trunk/conf/storage-conf.xml
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/conf/storage-conf.xml?rev=799140&r1=799139&r2=799140&view=diff
==============================================================================
--- incubator/cassandra/trunk/conf/storage-conf.xml (original)
+++ incubator/cassandra/trunk/conf/storage-conf.xml Thu Jul 30 00:29:28 2009
@@ -25,19 +25,20 @@
one logical cluster from joining any other cluster. -->
<ClusterName>Test Cluster</ClusterName>
- <!-- Tables and ColumnFamilies
- Think of a table as a namespace, not a relational table.
- (ColumnFamilies are closer in meaning to those.)
+ <!-- Keyspaces and ColumnFamilies
+ A ColumnFamily is the Cassandra concept closest to a relational table.
+ Keyspaces are separate groups of ColumnFamilies. Except in very
+ unusual circumstances you will have one Keyspace per application.
- There is an implicit table named 'system' for Cassandra internals.
+ There is an implicit keyspace named 'system' for Cassandra internals.
The default ColumnSort is Time for standard column families.
For super column families, specifying ColumnSort is not supported;
the supercolumns themselves are always name-sorted and their subcolumns
are always time-sorted.
-->
- <Tables>
- <Table Name="Table1">
+ <Keyspaces>
+ <Keyspace Name="Keyspace1">
<!-- The fraction of keys per sstable whose locations we
keep in memory in "mostly LRU" order. (JUST the key
locations, NOT any column values.)
@@ -72,8 +73,8 @@
<ColumnFamily CompareWith="UTF8Type" Name="Standard2"/>
<ColumnFamily CompareWith="UUIDType" Name="StandardByUUID1"/>
<ColumnFamily ColumnType="Super" CompareWith="UTF8Type" CompareSubcolumnsWith="UTF8Type" Name="Super1"/>
- </Table>
- </Tables>
+ </Keyspace>
+ </Keyspaces>
<!-- Partitioner: any IPartitioner may be used, including your own
as long as it is on the classpath. Out of the box,
Modified: incubator/cassandra/trunk/interface/cassandra.thrift
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/cassandra.thrift?rev=799140&r1=799139&r2=799140&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/cassandra.thrift (original)
+++ incubator/cassandra/trunk/interface/cassandra.thrift Thu Jul 30 00:29:28 2009
@@ -72,7 +72,7 @@
exception NotFoundException {
}
-# invalid request (table / CF does not exist, etc.)
+# invalid request (keyspace / CF does not exist, etc.)
exception InvalidRequestException {
1: string why
}
@@ -119,41 +119,41 @@
service Cassandra {
- list<Column> get_slice_by_names(1:string table, 2:string key, 3:ColumnParent column_parent, 4:list<binary> column_names, 5:ConsistencyLevel consistency_level=1)
+ list<Column> get_slice_by_names(1:string keyspace, 2:string key, 3:ColumnParent column_parent, 4:list<binary> column_names, 5:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
- list<Column> get_slice(1:string table, 2:string key, 3:ColumnParent column_parent, 4:binary start, 5:binary finish, 6:bool is_ascending, 7:i32 count=100, 8:ConsistencyLevel consistency_level=1)
+ list<Column> get_slice(1:string keyspace, 2:string key, 3:ColumnParent column_parent, 4:binary start, 5:binary finish, 6:bool is_ascending, 7:i32 count=100, 8:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
- Column get_column(1:string table, 2:string key, 3:ColumnPath column_path, 4:ConsistencyLevel consistency_level=1)
+ Column get_column(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
- i32 get_column_count(1:string table, 2:string key, 3:ColumnParent column_parent, 5:ConsistencyLevel consistency_level=1)
+ i32 get_column_count(1:string keyspace, 2:string key, 3:ColumnParent column_parent, 5:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire),
- void insert(1:string table, 2:string key, 3:ColumnPath column_path, 4:binary value, 5:i64 timestamp, 6:ConsistencyLevel consistency_level=0)
+ void insert(1:string keyspace, 2:string key, 3:ColumnPath column_path, 4:binary value, 5:i64 timestamp, 6:ConsistencyLevel consistency_level=0)
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
- void batch_insert(1:string table, 2:BatchMutation batch_mutation, 3:ConsistencyLevel consistency_level=0)
+ void batch_insert(1:string keyspace, 2:BatchMutation batch_mutation, 3:ConsistencyLevel consistency_level=0)
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
- void remove(1:string table, 2:string key, 3:ColumnPathOrParent column_path_or_parent, 4:i64 timestamp, 5:ConsistencyLevel consistency_level=0)
+ void remove(1:string keyspace, 2:string key, 3:ColumnPathOrParent column_path_or_parent, 4:i64 timestamp, 5:ConsistencyLevel consistency_level=0)
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
- list<SuperColumn> get_slice_super(1:string table, 2:string key, 3:string column_family, 4:binary start, 5:binary finish, 6:bool is_ascending, 7:i32 count=100, 8:ConsistencyLevel consistency_level=1)
+ list<SuperColumn> get_slice_super(1:string keyspace, 2:string key, 3:string column_family, 4:binary start, 5:binary finish, 6:bool is_ascending, 7:i32 count=100, 8:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire),
- list<SuperColumn> get_slice_super_by_names(1:string table, 2:string key, 3:string column_family, 4:list<binary> super_column_names, 5:ConsistencyLevel consistency_level=1)
+ list<SuperColumn> get_slice_super_by_names(1:string keyspace, 2:string key, 3:string column_family, 4:list<binary> super_column_names, 5:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire),
- SuperColumn get_super_column(1:string table, 2:string key, 3:SuperColumnPath super_column_path, 4:ConsistencyLevel consistency_level=1)
+ SuperColumn get_super_column(1:string keyspace, 2:string key, 3:SuperColumnPath super_column_path, 4:ConsistencyLevel consistency_level=1)
throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
- void batch_insert_super_column(1:string table, 2:BatchMutationSuper batch_mutation_super, 3:ConsistencyLevel consistency_level=0)
+ void batch_insert_super_column(1:string keyspace, 2:BatchMutationSuper batch_mutation_super, 3:ConsistencyLevel consistency_level=0)
throws (1: InvalidRequestException ire, 2: UnavailableException ue),
# range query: returns matching keys
- list<string> get_key_range(1:string table, 2:string column_family, 3:string start="", 4:string finish="", 5:i32 count=100)
+ list<string> get_key_range(1:string keyspace, 2:string column_family, 3:string start="", 4:string finish="", 5:i32 count=100)
throws (1: InvalidRequestException ire),
/////////////////////////////////////////////////////////////////////////////////////
@@ -167,8 +167,8 @@
// get property whose value is list of "strings"
list<string> get_string_list_property(1:string property),
- // describe specified table
- map<string, map<string, string>> describe_table(1:string table)
+ // describe specified keyspace
+ map<string, map<string, string>> describe_keyspace(1:string keyspace)
throws (1: NotFoundException nfe),
// execute a CQL query