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/05/05 16:54:06 UTC

svn commit: r771761 [1/3] - in /incubator/cassandra/trunk: interface/ interface/gen-java/org/apache/cassandra/service/ src/java/org/apache/cassandra/cli/ src/java/org/apache/cassandra/service/ src/java/org/apache/cassandra/test/ test/system/

Author: jbellis
Date: Tue May  5 14:54:05 2009
New Revision: 771761

URL: http://svn.apache.org/viewvc?rev=771761&view=rev
Log:
use `block` flag instead of separate _blocking methods.  throw exception on error instead of returning bool for success.  patch by jbellis; reviewed by Eric Evans for CASSANDRA-131

Added:
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/UnavailableException.java
Modified:
    incubator/cassandra/trunk/interface/cassandra.thrift
    incubator/cassandra/trunk/interface/gen-java/org/apache/cassandra/service/Cassandra.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/cli/CliClient.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/CassandraServer.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/service/StorageProxy.java
    incubator/cassandra/trunk/src/java/org/apache/cassandra/test/StressTest.java
    incubator/cassandra/trunk/test/system/test_server.py

Modified: incubator/cassandra/trunk/interface/cassandra.thrift
URL: http://svn.apache.org/viewvc/incubator/cassandra/trunk/interface/cassandra.thrift?rev=771761&r1=771760&r2=771761&view=diff
==============================================================================
--- incubator/cassandra/trunk/interface/cassandra.thrift (original)
+++ incubator/cassandra/trunk/interface/cassandra.thrift Tue May  5 14:54:05 2009
@@ -65,6 +65,12 @@
     1: string why
 }
 
+# not all the replicas required could be created / read
+exception UnavailableException {
+}
+
+# (note that internal server errors will raise a TApplicationException, courtesy of Thrift)
+
 
 #
 # service api
@@ -83,18 +89,14 @@
   i32            get_column_count(1:string tablename, 2:string key, 3:string columnFamily_column)
   throws (1: InvalidRequestException ire),
 
-  async void     insert(1:string tablename, 2:string key, 3:string columnFamily_column, 4:binary cellData, 5:i64 timestamp),
-
-  async void     batch_insert(batch_mutation_t batchMutation),
-
-  bool           insert_blocking(1:string tablename, 2:string key, 3:string columnFamily_column, 4:binary cellData, 5:i64 timestamp)
-  throws (1: InvalidRequestException ire),
+  void     insert(1:string tablename, 2:string key, 3:string columnFamily_column, 4:binary cellData, 5:i64 timestamp, 6:bool block=0)
+  throws (1: InvalidRequestException ire, 2: UnavailableException ue),
 
-  bool           batch_insert_blocking(batch_mutation_t batchMutation)
-  throws (1: InvalidRequestException ire),
+  void     batch_insert(1: batch_mutation_t batchMutation, 2:bool block=0)
+  throws (1: InvalidRequestException ire, 2: UnavailableException ue),
 
-  bool           remove(1:string tablename, 2:string key, 3:string columnFamily_column, 4:i64 timestamp, 5:bool block)
-  throws (1: InvalidRequestException ire),
+  void           remove(1:string tablename, 2:string key, 3:string columnFamily_column, 4:i64 timestamp, 5:bool block=0)
+  throws (1: InvalidRequestException ire, 2: UnavailableException ue),
 
   list<column_t> get_columns_since(1:string tablename, 2:string key, 3:string columnFamily_column, 4:i64 timeStamp)
   throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
@@ -108,12 +110,10 @@
   superColumn_t  get_superColumn(1:string tablename, 2:string key, 3:string columnFamily)
   throws (1: InvalidRequestException ire, 2: NotFoundException nfe),
 
-  async void     batch_insert_superColumn(batch_mutation_super_t batchMutationSuper),
-
-  bool           batch_insert_superColumn_blocking(batch_mutation_super_t batchMutationSuper)
-  throws (1: InvalidRequestException ire),
+  void     batch_insert_superColumn(1:batch_mutation_super_t batchMutationSuper, 2:bool block=0)
+  throws (1: InvalidRequestException ire, 2: UnavailableException ue),
 
-  async void     touch(1:string key, 2:bool fData),
+  oneway void     touch(1:string key, 2:bool fData),
 
   # range query: returns matching keys
   list<string>   get_key_range(1:string tablename, 2:string startWith="", 3:string stopAt="", 4:i32 maxResults=1000) throws (1: InvalidRequestException ire),