Commit Graph

53 Commits

Author SHA1 Message Date
Jonathan Ellis b260d68fc8 refactor findSuitableEndpoint to throw UnavailableException (instead of letting callers error out with NPE) when no replica is alive. also check for endpoint live-ness in getNextEndpoint. patch by jbellis; reviewed by Simon Smith for CASSANDRA-440
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/branches/cassandra-0.4@814972 13f79535-47bb-0310-9956-ffa450edef68
2009-09-15 02:51:08 +00:00
Jonathan Ellis 58db081e87 regenerate with thrift compiler from THRIFT-575 to reject method calls with null parameters. patch by jbellis; reviewed by Sammy Yu for CASSANDRA-308
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/branches/cassandra-0.4@810993 13f79535-47bb-0310-9956-ffa450edef68
2009-09-03 15:29:56 +00:00
Jonathan Ellis 64c38a2657 inline BatchMutation into batch_insert params
patch by jbellis; reviewed by Evan Weaver for CASSANDRA-403

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@809793 13f79535-47bb-0310-9956-ffa450edef68
2009-09-01 01:52:03 +00:00
Jonathan Ellis bbd170187b organize api methods by type (retrieval or modification). patch by jbellis
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@809718 13f79535-47bb-0310-9956-ffa450edef68
2009-08-31 19:48:24 +00:00
Jonathan Ellis 526af55263 edit comment describing get_string methods. patch by jbellis
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@809704 13f79535-47bb-0310-9956-ffa450edef68
2009-08-31 19:25:26 +00:00
Jonathan Ellis fa1d99ac96 add forwards-compatible ConsistencyLevel parameter to get_key_range. Currently it is a no-op. patch by Chris Goffinet; reviewed by jbellis for CASSANDRA-322
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@809639 13f79535-47bb-0310-9956-ffa450edef68
2009-08-31 15:50:58 +00:00
Jonathan Ellis ac921c44d3 add "required" to non-optional fields. Thrift sucks.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-308

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@808989 13f79535-47bb-0310-9956-ffa450edef68
2009-08-28 19:02:46 +00:00
Jonathan Ellis 59ec4109e4 bump thrift version to 808609 to fix regression from THRIFT-562. patch by jbellis for CASSANDRA-387
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@808620 13f79535-47bb-0310-9956-ffa450edef68
2009-08-27 20:47:21 +00:00
Jonathan Ellis 40641c73a6 remove multiget_count until/unless there is a demonstrated need for it. patch by jbellis for CASSANDRA-70
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@808597 13f79535-47bb-0310-9956-ffa450edef68
2009-08-27 20:11:49 +00:00
Jonathan Ellis 6690c51359 Update AsyncResult to know when it started waiting so you can get() multiple Results in serial but have them wait in parallel. Use this to implement multiget methods. Remove unused MultiAsyncResult code and StorageProxy methods using it.
Patch by Chris Goffinet; reviewed by jbellis for CASSANDRA-70

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@808589 13f79535-47bb-0310-9956-ffa450edef68
2009-08-27 20:07:12 +00:00
Jonathan Ellis 0f56a25553 update to thrift trunk and rename jar after the svn revision (806014). inline our map typedef to work around regression introduced in THRIFT-144. add slf4j dependencies (required since THRIFT-558). regenerate thrift structs with new version.
patch by jbellis for CASSANDRA-308, CASSANDRA-387

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@808559 13f79535-47bb-0310-9956-ffa450edef68
2009-08-27 18:11:58 +00:00
Jonathan Ellis 0fc2d87e2b combine batch_insert and batch_insert_super the way we did get_slice and get_slice_super
patch by jbellis.  reviewed by Chris Goffinet and Evan Weaver for CASSANDRA-388

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@808045 13f79535-47bb-0310-9956-ffa450edef68
2009-08-26 15:11:27 +00:00
Jonathan Ellis 1aeca2b625 add license headers to new-since-0.3 files.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-365

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@804294 13f79535-47bb-0310-9956-ffa450edef68
2009-08-14 16:52:55 +00:00
Eric Evans cd66ac8326 CASSANDRA-361 cleanup left-over references to Cql
Patch by Michael Greene (+ regeneration of thrift code); reviewed
by eevans for CASSANDRA-361

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@803355 13f79535-47bb-0310-9956-ffa450edef68
2009-08-12 02:59:55 +00:00
Jonathan Ellis 6b7a1c300f switch "!isAscending" for "reversed."
patch by jbellis, Carl Bystrom, and Bill de hOra. reviewed by Eric Evans for CASSANDRA-311

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@802953 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 23:17:08 +00:00
Eric Evans 8455ebfe87 CASSANDRA-296 remove CQL
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@802911 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 19:35:01 +00:00
Jonathan Ellis 15354b4906 Combine thrift slice methods. Now we have one get() method, one get_slice(), and one get_count().
patch by jbellis; reviewed by Evan Weaver for CASSANDRA-329

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@802640 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 02:51:35 +00:00
Jonathan Ellis 5ed5464e31 add Ruby namespace. patch by Evan Weaver; reviewed by Michael Koziarski and Scott Chacon for CASSANDRA-327
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@802639 13f79535-47bb-0310-9956-ffa450edef68
2009-08-10 02:49:33 +00:00
Jonathan Ellis 572b5f852d table -> keyspace
patch by jbellis; reviewed by Michael Greene for CASSANDRA-271

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@799140 13f79535-47bb-0310-9956-ffa450edef68
2009-07-30 00:29:28 +00:00
Jonathan Ellis acd50bd901 add ConsistencyLevel parameter to read ops. patch by Sammy Yu; reviewed by jbellis for CASSANDRA-232
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@798390 13f79535-47bb-0310-9956-ffa450edef68
2009-07-28 04:06:56 +00:00
Jonathan Ellis d76bbca3e2 add ConsistencyLevel Thrift enum to avoid client having to compute quorum size. patch by Sammy Yu; reviewed by jbellis for CASSANDRA-300
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@798298 13f79535-47bb-0310-9956-ffa450edef68
2009-07-27 21:44:47 +00:00
Jonathan Ellis 227b270134 standardize more method and parameter names on underscores instead of camelcase. patch by Michael Greene; reviewed by jbellis for CASSANDRA-312
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@797674 13f79535-47bb-0310-9956-ffa450edef68
2009-07-24 22:32:21 +00:00
Eric Evans efc9b60686 add perl namespace to thrift interface
Patch by Anthony Molinaro; reviewed by eevans for CASSANDRA-310

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@796403 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 17:40:35 +00:00
Jonathan Ellis 986cee6806 change String column names to byte[] to allow user-defined ordering.
patch by jbellis; reviewed by Sandeep Tata for CASSANDRA-185

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@796108 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 01:36:52 +00:00
Jonathan Ellis 8ff63a92ba r/m time-sorted columns.
patch by jbellis; reviewed by Sandeep Tata for CASSANDRA-185

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@796107 13f79535-47bb-0310-9956-ffa450edef68
2009-07-21 01:36:10 +00:00
Jonathan Ellis ff764ff22b r/m offset from slice api; we could live with being inefficient but not with breaking read repair.
patch by jbellis; reviewed by Evan Weaver for CASSANDRA-286

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@794474 13f79535-47bb-0310-9956-ffa450edef68
2009-07-16 00:38:53 +00:00
Jonathan Ellis 0b1aeda97c missed one: rename column.column_name -> column.name
patch by jbellis; reviewed by Evan Weaver and Sandeep Tata for CASSANDRA-139

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@794431 13f79535-47bb-0310-9956-ffa450edef68
2009-07-15 22:04:57 +00:00
Jonathan Ellis f2da00fb0f thrift changes to remove : api.
use ColumnPath, ColumnParent, etc. structs to encapsulate optional SuperColumns (and occasionally, optional Columns).
patch by jbellis; reviewed by Evan Weaver and Sandeep Tata for CASSANDRA-139

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@794429 13f79535-47bb-0310-9956-ffa450edef68
2009-07-15 22:04:43 +00:00
Jonathan Ellis 1f09fbae03 merge from 0.3 branch
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@792200 13f79535-47bb-0310-9956-ffa450edef68
2009-07-08 15:59:30 +00:00
Jonathan Ellis 2b18bade55 make get_key_range act on a single CF.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-280

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@791961 13f79535-47bb-0310-9956-ffa450edef68
2009-07-07 19:57:37 +00:00
Jonathan Ellis 23fa1bc0bd combine range version of get_slice into get_slice itself.
patch by jbellis; reviewed by Michael Greene for CASSANDRA-277

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@791872 13f79535-47bb-0310-9956-ffa450edef68
2009-07-07 15:40:46 +00:00
Jonathan Ellis cdd8b17062 add offset support to get_slice. patch by Jun Rao; reviewed by jbellis for CASSANDRA-261
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@791553 13f79535-47bb-0310-9956-ffa450edef68
2009-07-06 17:50:16 +00:00
Jonathan Ellis ef203cf000 default all count args to 100. patch by jbellis for CASSANDRA-262
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@791058 13f79535-47bb-0310-9956-ffa450edef68
2009-07-04 05:45:49 +00:00
Jonathan Ellis af82ca7ae1 Enhance describeTable to return Map of Column Family so that it can be programatically parsed. patch by Sammy Yu; reviewed by jbellis for CASSANDRA-258
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@788895 13f79535-47bb-0310-9956-ffa450edef68
2009-06-26 22:37:42 +00:00
Jonathan Ellis 6342512a34 CASSANDRA-217 rename get_slice_from to get_slice. implement get_slice_super in terms of SliceFrom too.
(time-based columns can continue to be sliced with get_columns_since)

patch by jbellis; reviewed by Eric Evans for CASSANDRA-217

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@788516 13f79535-47bb-0310-9956-ffa450edef68
2009-06-25 21:26:33 +00:00
Jonathan Ellis 38f6446d08 rename "end" parameter to "finish" to avoid conflict w/ ruby keyword. patch by Stu Hood; reviewed by jbellis for CASSANDRA-247
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@787258 13f79535-47bb-0310-9956-ffa450edef68
2009-06-22 14:46:27 +00:00
Jonathan Ellis f6d0154e23 merge from 0.3 branch
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@782740 13f79535-47bb-0310-9956-ffa450edef68
2009-06-08 19:37:57 +00:00
Jonathan Ellis a087b97c96 merge from 0.3 branch
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@782117 13f79535-47bb-0310-9956-ffa450edef68
2009-06-05 19:52:29 +00:00
Jonathan Ellis d800250cbc merge from 0.3 branch
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@780687 13f79535-47bb-0310-9956-ffa450edef68
2009-06-01 15:36:59 +00:00
Jonathan Ellis bb0d6dfa20 allow specifying a subset of columnfamilies to check for get_key_range.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-152

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@779261 13f79535-47bb-0310-9956-ffa450edef68
2009-05-27 18:04:56 +00:00
Jonathan Ellis 4ac9118f7c Add get_slice_from functionality using column indexes for efficiency.
Patch by Jun Rao and jbellis for CASSANDRA-172

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@777578 13f79535-47bb-0310-9956-ffa450edef68
2009-05-22 15:33:42 +00:00
Jonathan Ellis 0ae07f299e add block_for parameter to insert calls. patch by Sandeep Tata; reviewed by jbellis for CASSANDRA-154
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@776365 13f79535-47bb-0310-9956-ffa450edef68
2009-05-19 15:51:10 +00:00
Jonathan Ellis 20f7d032c7 add get_slice_by_name_range command. patch by Sandeep Tata; reviewed by jbellis for CASSANDRA-53
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@775308 13f79535-47bb-0310-9956-ffa450edef68
2009-05-15 20:18:55 +00:00
Jonathan Ellis b2e2b1c116 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
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@771761 13f79535-47bb-0310-9956-ffa450edef68
2009-05-05 14:54:05 +00:00
Jonathan Ellis 090013252d move py and php to `cassandra` namespace. add csharp as Apache.Cassandra. patch by jbellis for CASSANDRA-121
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770434 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 20:26:51 +00:00
Jonathan Ellis 9db8da81b7 Add range query support, which requires using an OrderPreservingPartitioner. (Keys are returned in the order defined by the partitioner collation.) The fundamental approach (in table.getKeyRange) is simple: create a CollatedIterator that will return unique keys from different sources, each of which is already sorted. Then we just need Iterators for different key sources. For SSTables, this means adding seekTo and an Iterator interface to FileStruct. For Memtable, this means adding a DestructivePQIterator since unlike SSTable keys those are not inherently ordered already. This means that we only do M log N work sorting the memtable keys where M is the number of keys we actually read, and N is the total number of keys, where a naive sort-everything-first iterator would be N log N.
This does not yet implement range queries spanning multiple nodes.

patch by jbellis; reviewed by Jun Rao for CASSANDRA-71

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769874 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 18:57:35 +00:00
Jonathan Ellis 6b5e9404c5 upgrade to latest THRIFT-378 patch
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769166 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 21:14:04 +00:00
Jonathan Ellis 551a1a0840 move thrift-generated code to interface/gen-java. patch by johano; reviewed by jbellis for CASSANDRA-103
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768589 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 19:30:13 +00:00
Jonathan Ellis ef293c1a6a return empty lists instead of raising an error where applicable; otherwise, use
NotFoundError instead of CassandraException.  rely on THRIFT-378 to report internal errors.
also, add field numbers to work around thrift bug generating python code.
patch by jbellis; reviewed by Jun Rao for #66

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768382 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 17:52:25 +00:00
Jonathan Ellis 7b250fa261 move CF checking into CassandraServer. begin to expose InvalidRequestException. r/m unused "del" cfmaps from batch methods.
patch by jbellis; reviewed by Jun Rao for #66

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768381 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 17:52:07 +00:00