Commit Graph

3104 Commits

Author SHA1 Message Date
Glauber Costa
233a84eb6b sstables: convert row to internal representation
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-05-05 09:28:48 -04:00
Glauber Costa
e8b3198580 sstables: bloom filter api
Currently always return true.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-05-05 09:28:48 -04:00
Glauber Costa
f6e8141e0d binary search: allow direct token passing
In some situations, we already have the token computed, and there is no need to
compute it again during binary search. As a matter of fact, even in the
simplest of the situations, we'll run a binary search over the summary, and if
the key is believed to be in a particular bucket, we will run a search over the
index. That's two token computations right away.

It would be better to have an interface that allows the token to be passed
directly if known. We provide a wrapper that allows the binary search to
operate on a key only.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-05-05 09:28:48 -04:00
Glauber Costa
ea81c44095 sstable key: composite view
Can be used to parse a composite value (like a column name)

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-05-05 09:28:48 -04:00
Glauber Costa
d977220b8e sstable key: explode a partition key
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-05-05 09:28:48 -04:00
Glauber Costa
cd001d208c sstable: calculate data size
It would be useful in some situations to know where does the data ends. If the
file is uncompressed, this is equivalent to the file length. If the data file
is compressed, this information needs to come from the compression structure.

Provide a method that encodes that.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-30 16:04:19 -04:00
Glauber Costa
fe4b33053e sstable_test: move some interesting functions to a header file
This test is too big already. The mutation tests would be better off in their own files

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-30 15:50:16 -04:00
Glauber Costa
cccc3c8597 data_input: allow other sizes to be used for reading a blob.
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-04-30 15:49:36 -04:00
Glauber Costa
08d7a7c3d5 binary search: clarify return value
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-30 15:31:51 -04:00
Glauber Costa
9993344ab8 tests: test the binary search over a full index list
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-30 15:15:36 -04:00
Glauber Costa
1bd12ec2ff binary search: fix token comparator
compare_unsigned cannot be used directly on a token. We need to use the
dht-provided token comparators.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-30 14:09:45 -04:00
Avi Kivity
9e8f6c4e50 Merge branch 'tgrabiec/cleanups' of github.com:cloudius-systems/seastar-dev into db
Cleanups for 4d1ba11668, from Tomasz.
2015-04-30 20:40:08 +03:00
Tomasz Grabiec
b28d26bc9f murmur_hash: Drop static qualifier from template definition
To avoid multiple definitions in different compilation units. Pointed
out by Avi.
2015-04-30 16:49:50 +02:00
Tomasz Grabiec
d54388e1f6 compound_compat: Remove leftover code
It's a remnant after failed experiment. I forgot to drop it.
2015-04-30 15:40:02 +02:00
Tomasz Grabiec
6c008d825c tests: Add partitioner test to test.py 2015-04-30 15:39:57 +02:00
Tomasz Grabiec
93aab46406 tests: Fix murmur_hash_test 2015-04-30 14:23:24 +02:00
Avi Kivity
4d1ba11668 Merge branch 'tgrabiec/fix-decorated-key-order' of github.com:cloudius-systems/seastar-dev into db
Fix decorated_key ordering to match Origin's, from Tomasz.
2015-04-30 14:54:35 +03:00
Tomasz Grabiec
72c327b02f tests: Add partitioner test 2015-04-30 12:02:39 +02:00
Tomasz Grabiec
aec740f895 db: Make decorated_key have ordering compatible with Origin 2015-04-30 12:02:39 +02:00
Tomasz Grabiec
359af7745c dht: murmur3_partitioner: move get_token() implementation to .cc 2015-04-30 11:16:53 +02:00
Tomasz Grabiec
51d26620ca db: Remove comment above partitions map
I think the types are explicit enough now.
2015-04-30 11:16:53 +02:00
Tomasz Grabiec
46e72cbc64 tests: Introduce perf_hash.cc, hashing benchmark
Output on my laptop:

$ build/release/tests/perf/perf_hash
Timing fixed hash...
28671657.15 tps
28720930.45 tps
28622017.20 tps
28677088.01 tps
29223543.70 tps
Timing iterator hash...
22023042.57 tps
21953352.04 tps
21393787.05 tps
21613837.10 tps
21563284.57 tps
2015-04-30 11:16:53 +02:00
Tomasz Grabiec
ce78aef19a tests: Introduce murmur_hash_test.cc 2015-04-30 11:16:53 +02:00
Tomasz Grabiec
5fc149d454 utils: murmur_hash: Add input iterator based hash3_x64_128() version 2015-04-30 11:16:53 +02:00
Tomasz Grabiec
9197914697 utils: Fix indentation in murmur_hash.hh
We don't indent namespaces.
2015-04-30 11:16:53 +02:00
Tomasz Grabiec
ad05bb92d1 compound: Add compound::is_prefixable 2015-04-30 11:16:53 +02:00
Tomasz Grabiec
71e580c9c6 tests: keys: Add compatibility layer tests 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
82882779b6 keys: Expose compatibility layer with Origin in partition_key 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
e7c282fdf2 tests: Add tests for compound adaptors 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
89dca2eee4 compound: Introduce legacy format adaptors 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
c78b2b1e0d compound: Introduce components() method 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
7d45a472aa compound: Implement iterator::operator->() 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
6f536382b8 compound: Mark and document component iterator as InputIterator 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
6a9c49ee47 compound: Implement postfix incrementation in the component iterator 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
8d2233fb33 compound: Add method for checking if type is compound or not
Will be used by legacy comparator.
2015-04-30 11:16:52 +02:00
Tomasz Grabiec
08a17496a3 keys: Move get_component() to compound_wrapper
It's an operation which is valid for any compound, not only
partition_key.
2015-04-30 11:16:52 +02:00
Tomasz Grabiec
0559062893 types: Introduce lexicographical_tri_compare() 2015-04-30 11:16:52 +02:00
Tomasz Grabiec
b28ded72eb Merge branch 'dev/penberg/query-local-fixes' from seastar-dev.git
Cleanups from Pekka.
2015-04-30 10:12:27 +02:00
Pekka Enberg
26dd7c7cac service: Avoid schema ID lookup in storage_proxy::query_local()
It's unneeded because we already looked up the schema. Spotted by Tomek.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-30 10:15:45 +03:00
Pekka Enberg
73928c27a5 service: Fix storage_proxy::query_local() to return static columns
Spotted by Tomek.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-30 10:14:51 +03:00
Pekka Enberg
3e605f1c8c service: Fix storage_proxy::query_local() to return clustering keys
Spotted by Tomek.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-04-30 10:14:47 +03:00
Avi Kivity
2dda4673a3 Merge branch 'calle/cassandra-config' of github.com:cloudius-systems/seastar-dev into db
Configuration support, from Calle:

* Config object reading cassandra.yaml + command line opts.
* Tracks config source (none, cmd line, yaml)
* Added to main + database
* Used with commit log
2015-04-29 19:25:37 +03:00
Calle Wilund
2f4e7a00f6 Use db/config object in main, database etc
* Uses config object to augument/impl options parsing
* Database now holds config obj
* Commitlog can now be inited with global config obj.
2015-04-29 18:01:17 +02:00
Calle Wilund
5054892657 Cassandra compatible "config" object
* Based on the property set of cassandra 2.1
* Structure mapping all "known" cassandra.yaml config properties
* YAML and command line parsing of opts.
* Tracks is-set? and set-from-where?
* Uses giant macros to make Avi happy.
2015-04-29 17:00:15 +02:00
Calle Wilund
63ea446849 Collectd: Use initializer lists + declare < and == operators for clang
Makes scollectd compile on clang++ 3.5.0
2015-04-29 17:00:14 +02:00
Avi Kivity
509d8a188e Merge branch 'cleanup-sst' of github.com:glommer/urchin into db
Sstable cleanup, from Glauber (privatize some functions).
2015-04-29 16:49:59 +03:00
Glauber Costa
34d099dfbf sstables: make read_summary_entry private
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-29 09:47:19 -04:00
Glauber Costa
198f55dc5c sstables: don't expose summary binary search
There is no need to expose binary search. It can be an internal function
that is accessible for test only.

Also, in the end, the implementation of the summary version was such a simple
one, that there is no need to have a specific method for that. We can just pass
the summary entries as a parameter.

Some header file massage is needed to keep it compiling

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-29 09:47:19 -04:00
Glauber Costa
8ec9f162bb sstables: make read_index a private function
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-04-29 09:47:19 -04:00
Avi Kivity
4593d52444 cql3: remove gunk from lists.hh 2015-04-29 16:31:36 +03:00