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
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
Jonathan Ellis
ada8209a3a
fix hostname parsing in cli. patch by Eric Evans; reviewed by jbellis for #100
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768137 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 03:02:18 +00:00
Jonathan Ellis
83d24602fd
Simplify default storage-conf.xml. patch by Sandeep Tata; reviewed by jbellis for #99
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768135 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 02:58:24 +00:00
Jonathan Ellis
ba7f6907f3
avoid clearing out memtable during flush since it can still be accessed as a
...
'historial' MT. clearing during flush can lead to client seeing old data, if the
clear is done before the sstable is completely written (so the next thing to be
checked will be an old sstable).
patch by Sandeep Tata; reviewed by jbellis for #98 .
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768111 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 00:52:09 +00:00
Jonathan Ellis
2ec1b06e5f
use resolve (moved to CF from CFS) rather than duplicating code in repair to do the
...
same thing. this automatically gets us most of the way to handling tombstones in
read repair. the rest is minor tweaks to CF.diff and SC.diff. added tests.
patch by jbellis; reviewed by Jun Rao for #87 .
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768109 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 00:46:32 +00:00
Jonathan Ellis
0133ff232f
clean up Read Repair code to use non-deprecated APIs.
...
patch by jbellis; reviewed by Jun Rao for #87 .
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@768108 13f79535-47bb-0310-9956-ffa450edef68
2009-04-24 00:46:19 +00:00
Jonathan Ellis
3c6fcf8d65
fix get_slice to not ignore the "start" parameter. patch by Sandeep Tata; reviewed by jbellis for #81
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767703 13f79535-47bb-0310-9956-ffa450edef68
2009-04-22 22:54:14 +00:00
Jonathan Ellis
99451c730b
replace ArrayList w/ ArrayDeque.
...
patch by jbellis; reviewed by Jun Rao for #14
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767610 13f79535-47bb-0310-9956-ffa450edef68
2009-04-22 18:40:36 +00:00
Jonathan Ellis
9292af8860
avoid setting the initial arrival time (and hence the mean arrival time until the
...
next value) to zero.
patch by Zhu Han; reviewed by jbellis for #13
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767609 13f79535-47bb-0310-9956-ffa450edef68
2009-04-22 18:40:33 +00:00
Jonathan Ellis
589d72a7f9
fix duration calculation to avoid evicting dead endpoints instantly
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767606 13f79535-47bb-0310-9956-ffa450edef68
2009-04-22 18:38:41 +00:00
Jonathan Ellis
478f0bef14
RVH should use RC.getRow for correctness and maintainability (in particular the path for get_columns_since was missing). patch by Jun Rao; reviewed by jbellis for #93
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767315 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 22:18:08 +00:00
Jonathan Ellis
0f7e1c3012
raise exception when column is not passed to get_column. patch by Jun Rao; reviewed by jbellis for #92
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767314 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 22:14:36 +00:00
Jonathan Ellis
b0dde7139a
configurable ListenAddress setting. allows running multiple instances of Cassandra
...
on a single machine or VM. patch and review by Per Mellqvist, Eric Evans, and
jbellis for #43
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767307 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 21:34:46 +00:00
Jonathan Ellis
807b89ed7c
Revert "configurable ListenAddress setting" since it prevents server from starting.
...
This reverts commit 1304a9d9e1f9f85b991d99a1ca96e02505eb430f.
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767205 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 16:21:15 +00:00
Jonathan Ellis
fb0e28d664
configurable ListenAddress setting. allows running multiple instances of Cassandra on a single machine or VM. patch by Per Mellqvist; reviewed by Eric Evans for #43
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767168 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 14:56:22 +00:00
Jonathan Ellis
04010ca15a
fix strange line endings and indentation so we can apply patches sanely.
...
patch by Per Mellqvist; reviewed by Eric Evans for #43
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@767167 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 14:56:16 +00:00
Jonathan Ellis
20748a879b
allow SuperColumn.getSubColumn to return null. patch by Sandeep Tata; reviewed by jbellis for #91
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766961 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 03:06:01 +00:00
Jonathan Ellis
d14f814667
test and fix get_column regression. patch by Jun Rao; reviewed by jbellis for #90
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766960 13f79535-47bb-0310-9956-ffa450edef68
2009-04-21 02:58:49 +00:00
Jonathan Ellis
c0f5fb3bb3
refactor read path: first we make readColumnFamily accept a ReadCommand, and use that to clean out duplicate code in CassandraServer. Then we clean up the duplicate versions of the read methods in StorageService by making them ReadCommand-based, too. [not touching multiget code for now.]
...
patch by jbellis; reviewed by Eric Evans for #88
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766841 13f79535-47bb-0310-9956-ffa450edef68
2009-04-20 20:05:26 +00:00
Jonathan Ellis
657882579d
rename ReadResponseMessage -> ReadResponse
...
patch by jbellis; reviewed by Eric Evans for #88
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766840 13f79535-47bb-0310-9956-ffa450edef68
2009-04-20 20:05:20 +00:00
Jonathan Ellis
df95fb88dc
clean up ReadCommand; it's basically a struct so use public final fields
...
patch by jbellis; reviewed by Eric Evans for #88
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766839 13f79535-47bb-0310-9956-ffa450edef68
2009-04-20 20:05:29 +00:00
Jonathan Ellis
8e72ac4f9f
rename get_cf -> readColumnFamily; ReadMessage -> ReadCommand.
...
[Message message = ReadMessage.readMessage(readMessage) is just plain confusing]
patch by jbellis; reviewed by Eric Evans for #88
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766838 13f79535-47bb-0310-9956-ffa450edef68
2009-04-20 20:05:07 +00:00
Jonathan Ellis
234d0895ad
fix row size "returned" via bufOut (currently ignored). patch by Jun Rao; reviewed by jbellis for #33
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766744 13f79535-47bb-0310-9956-ffa450edef68
2009-04-20 16:38:32 +00:00
Jonathan Ellis
6be087a80a
fix SequenceFile to know about new int in CF serialization. patch by Jun Rao; reviewed by jbellis for #33
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766199 13f79535-47bb-0310-9956-ffa450edef68
2009-04-18 01:33:24 +00:00
Jonathan Ellis
0c0c6e5fda
refactor Filter heirarchy, making hash generation easily customizable. Use Murmur
...
hash + combinatorics to generate hashes.
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766140 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17 20:17:16 +00:00
Jonathan Ellis
674eaf5cf5
rename BloomFilter.fill -> add
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766139 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17 20:17:11 +00:00
Jonathan Ellis
04344cbb03
replace JenkinsHash w/ MurmurHash. its hash distribution is just as good, and it's faster
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766138 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17 20:17:05 +00:00
Jonathan Ellis
7f256c32cb
r/m unused code, including entire CountingBloomFilter
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766137 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17 20:17:10 +00:00
Jonathan Ellis
8eacd24443
change column_t value to binary from string. patch by johano; reviewed by jbellis for #29
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766136 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17 20:08:49 +00:00
Jonathan Ellis
200d4937fa
test and fix for CF clone bug during remove. patch by Jun Rao; reviewed by jbellis for #33
...
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@766135 13f79535-47bb-0310-9956-ffa450edef68
2009-04-17 20:08:17 +00:00