Commit Graph

12800 Commits

Author SHA1 Message Date
Jonathan Ellis 3bc3e4c335 add constructor to DTPE for most commonly used values (single thread, no timeout, LinkedBlockingQueue)
patch by jbellis; reviewed by nk11 for CASSANDRA-120

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@771399 13f79535-47bb-0310-9956-ffa450edef68
2009-05-04 19:01:56 +00:00
Jonathan Ellis 05281ee045 demonstrate problem with _blocking methods by checking insert return values.
patch by jbellis; reviewed by nk11 for CASSANDRA-120

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@771398 13f79535-47bb-0310-9956-ffa450edef68
2009-05-04 19:01:46 +00:00
Jonathan Ellis 3a4a0595da use getTempFileName / closeRename to avoid problems w/ half-written sstables.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-78

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@771340 13f79535-47bb-0310-9956-ffa450edef68
2009-05-04 15:59:16 +00:00
Jonathan Ellis f70a5a0c8c clean up anticompaction code a little.
patch by jbellis; reveiewed by Eric Evans for CASSANDRA-78

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@771339 13f79535-47bb-0310-9956-ffa450edef68
2009-05-04 15:59:12 +00:00
Jonathan Ellis bbe89e795b do not leave variables uninitialized in ConsistencyManager constructor. fixes regression from #95. patch by jbellis for CASSANDRA-124
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@771325 13f79535-47bb-0310-9956-ffa450edef68
2009-05-04 14:59:51 +00:00
Jonathan Ellis 93abe8d3e5 make sendMessage only return true after ack by recipient.
patch by Jun Rao; reviewed by jbellis for CASSANDRA-34

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@771019 13f79535-47bb-0310-9956-ffa450edef68
2009-05-03 03:26:07 +00:00
Jonathan Ellis e4e5629b13 make out-of-the-box config 1GB-friendly. patch by jbellis; reviewed by Eric Evans for CASSANDRA-118
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770811 13f79535-47bb-0310-9956-ffa450edef68
2009-05-01 20:14:35 +00:00
Jonathan Ellis 0776714f71 add NOTICE.txt. patch by johano; reviewed by jbellis for CASSANDRA-127
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770778 13f79535-47bb-0310-9956-ffa450edef68
2009-05-01 18:04:32 +00:00
Jonathan Ellis f45bf41259 add cli wrapper and Getting Started section to readme. patch by johano and Eric Evans; reviewed by jbellis for CASSANDRA-117
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770737 13f79535-47bb-0310-9956-ffa450edef68
2009-05-01 16:05:13 +00:00
Jonathan Ellis 22525a8e12 make CassandraServer constructor public
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770688 13f79535-47bb-0310-9956-ffa450edef68
2009-05-01 14:13:11 +00:00
Jonathan Ellis 4a5620dea2 avoid raising an exception in SequenceFile.next when a key does not exist (e.g. when bloom filter gives a false positive). patch by Jun Rao; reviewed by jbellis for CASSANDRA-126
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770517 13f79535-47bb-0310-9956-ffa450edef68
2009-05-01 02:24:10 +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 ebcbeb5af9 close FileStructs after range query. patch by jbellis; reviewed by Jun Rao for CASSANDRA-71
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770424 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 20:01:31 +00:00
Jonathan Ellis 48d21d8e29 fix antlr check. patch by johano; reviewed by jbellis for CASSANDRA-125
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770324 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 17:04:56 +00:00
Jonathan Ellis ec291721dd add string de/serialize code to TokenFactory for ApplicationState's benefit.
patch by jbellis; tested by nk11 and MarkR42 for CASSANDRA-114

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770307 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 16:09:38 +00:00
Jonathan Ellis 5ba5c12060 change antlr -o to -fo. this allows it to build on windows.
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@770301 13f79535-47bb-0310-9956-ffa450edef68
2009-04-30 15:53:57 +00:00
Jonathan Ellis 887918ba8e commit test/cassandra.in.sh for nosetests
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769935 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 21:10:37 +00:00
Jonathan Ellis 49d0fa7ce2 add src/gen-java to svnignore
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769891 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 19:26:47 +00:00
Jonathan Ellis c40988f502 move antlr output to src/gen-java. patch by johano; reviewed by jbellis for CASSANDRA-105
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769888 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 19:23:47 +00:00
Jonathan Ellis 71739ef76a move src/ to src/java/. patch by johano; reviewed by jbellis for CASSANDRA-112
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769886 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 19:18:48 +00:00
Jonathan Ellis 1c1b97c25d add tests for batch_insert_superColumn and the _blocking version. patch by jbellis.
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769883 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 19:13:43 +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 898eebaa59 start SelectorManager after all the selector registration is done, to workaround a bug in some linux environments. (Debian etch under vmware player or under EC2 seem to exhibit this problem consistently.) the bug symptom is, the selector register hangs indefinitely even though the select() call is only for 100ms (after which it should stop blocking and let the register through).
patch by jbellis; reviewed by Eric Evans for #97

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769631 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 02:04:18 +00:00
Jonathan Ellis ef2f631ebe fix regression introduced by ReadCommand refactor (get_slice can return column_t from a standard cf, or from a supercolumn in a super cf). patch by jbellis.
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769629 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 02:01:56 +00:00
Jonathan Ellis e181fdc4e0 fix propagating SuperColumn tombstones from Memtable to caller.
patch by jbellis; reviewed by Eric Evans for #101

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769628 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 02:01:49 +00:00
Jonathan Ellis f836610fe0 add system tests. each method in test/system/test_server.py exercises part of the thrift API, and manages cleaning out data files and starting a fresh server for each test.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-102

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769608 13f79535-47bb-0310-9956-ffa450edef68
2009-04-29 01:12:38 +00:00
Jonathan Ellis fe6b6466f7 renaming and final cleanup. patch by jbellis; reviewed by Eric Evans for #97
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769542 13f79535-47bb-0310-9956-ffa450edef68
2009-04-28 21:15:44 +00:00
Jonathan Ellis d32b1a7a96 r/m unnecessary & race-prone cancelled/read/write key sets (a main reason to use
select is that select does this for you!).
patch by jbellis; reviewed by Eric Evans for #97

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769541 13f79535-47bb-0310-9956-ffa450edef68
2009-04-28 21:15:38 +00:00
Jonathan Ellis 0d348cab21 r/m unused code & do minor cleanup. patch by jbellis; reviewed by Eric Evans for #97
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769540 13f79535-47bb-0310-9956-ffa450edef68
2009-04-28 21:15:26 +00:00
Jonathan Ellis 4280ab57b3 remove unused variables. patch by johano; reviewed by jbellis for CASSANDRA-113
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769517 13f79535-47bb-0310-9956-ffa450edef68
2009-04-28 19:55:33 +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 7bb094f086 r/m copied JDK code
patch by jbellis; reviewed by Eric Evans for CASSANDRA-37

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769088 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 18:24:25 +00:00
Jonathan Ellis d2a61c67b0 add SSTable tests. in particular we want to be sure to test bloomfilter
[de]serialize since that's going to change a lot.
patch by jbellis; reviewed by Eric Evans for CASSANDRA-37

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769087 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 18:24:18 +00:00
Jonathan Ellis 3fc381c408 add build to svnignore. see CASSANDRA-110
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769075 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 18:04:14 +00:00
Jonathan Ellis bfb2e95220 rename getDefaultToken -> getInitialToken
patch by jbellis; reviewed by Jun Rao for CASSANDRA-65

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769019 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 15:01:51 +00:00
Jonathan Ellis 296e15b63c add test for ReplicaPlacementStrategy covering both Random and OrderPreserving partitioners
patch by jbellis; reviewed by Jun Rao for CASSANDRA-65

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769018 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 15:01:42 +00:00
Jonathan Ellis ec7f04b4df r/m StorageService.token in favor of explicitly passing a Partitioner object. this allows testing of components independent of the static SS.
patch by jbellis; reviewed by Jun Rao for CASSANDRA-65

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769017 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 15:01:36 +00:00
Jonathan Ellis 907d92e21b replace BigInteger tokens with BigIntegerToken and StringToken in RandomPartitioner and OrderPreservingPartitioner, respectively. (OrderPreservingHashPartitioner is no more.)
Doing order preserving partitioning based on the raw string has a number of compelling advantages:
 - there is no key length that all tokens must be padded to (which can be expensive if there is a range of key lengths) and which cannot be increased after deployment
 - it allows user-defined collations [sorting] rather than being limited to sorting by code point value (which is useless in the unicode world, and not always what you want even for ascii keys)
 - it will work with all UTF-16 characters, not just the UCS-2 subset (this is a limitation of using as a base 2**16, i.e., assuming for your order preserving hash that all characters are two bytes).

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

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769016 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 15:01:29 +00:00
Jonathan Ellis 2e9466c305 clean up partition strategies; in particular, implement getStorageEndPoints(String[] keys) in terms of getStorageEndPoints(BigInteger token), instead of copy/pasting code
patch by jbellis; reviewed by Jun Rao for CASSANDRA-65

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769015 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 15:01:17 +00:00
Jonathan Ellis 63a748ccf9 r/m unused code
patch by jbellis; reviewed by Jun Rao for CASSANDRA-65

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769014 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 15:01:13 +00:00
Jonathan Ellis 91afe8b6e9 move *Partitioner from cassandra.service to cassandra.dht.
patch by jbellis; reviewed by Jun Rao for CASSANDRA-65

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@769013 13f79535-47bb-0310-9956-ffa450edef68
2009-04-27 15:01:08 +00:00
Jonathan Ellis 7982bb4a2b add release target. patch by johano; reviewed by jbellis for CASSANDRA-107
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768590 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 19:38:47 +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 1453a906ef DO_REPAIR header is not always present now that DatabaseDescriptor.getConsistencyCheck is optional.
patch by Per Mellqvist; reviewed by jbellis for #109

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768586 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 19:13:36 +00:00
Jonathan Ellis afd3c2765b move testng code to test/unit. patch by johano; reviewed by jbellis for #104
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768584 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 19:07:00 +00:00
Jonathan Ellis 90869601eb add license, readme files. patch by johano; reviewed by jbellis for #108
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768580 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 18:52:40 +00:00
Jonathan Ellis 6d075b51b9 junit xml output for hudson's benefit. patch by johano; reviewed by jbellis for #32
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768579 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 18:46:48 +00:00
Jonathan Ellis e2a4ea7f7e split ReadCommand into separate classes for each type of command. patch by Jun Rao; reviewed by jbellis
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768553 13f79535-47bb-0310-9956-ffa450edef68
2009-04-25 15:46:19 +00:00
Jonathan Ellis 0bf69f8cce rename getHostName -> getHostAddress since it should always be an IP now.
patch by jbellis; reviewed by Eric Evans for #94

git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768442 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 23:28:24 +00:00
Jonathan Ellis f06a9da69a switch to IP everywhere. patch by jbellis; reviewed by Eric Evans for #94
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768441 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 23:28:09 +00:00