Commit Graph

53948 Commits

Author SHA1 Message Date
Tomasz Grabiec
bfe59d314a db: Introduce query API 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
6b30b4a2cd types: Introduce types::is_reversed() 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
5f6d02df62 types: Make underlying_type() return shared_ptr<abstract_type> 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
baba7c12be schema: Introduce column_definition::component_index() 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
0f1b6b079a schema: Store partition_key_prefix_type
single_column_primary_key_restrictions may generate partition key
prefixes.
2015-03-11 14:56:10 +01:00
Tomasz Grabiec
0612066490 schema: Introduce column_definition::is_regular() 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
5518cd6b96 schema: Add helper for turning column_definition range into a vector 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
74b1a71dcc schema: Introduce schema::position(column_definition&)
Matches org.apache.cassandra.config.ColumnDefinition#position()
2015-03-11 14:56:10 +01:00
Tomasz Grabiec
0a63919d21 cql3: Fix names in declaration of restriction::uses_function() 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
89aa2f75e5 thrift: Fix name clash between unimplemented() and namespace "unimplemented" 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
c76e0ee4cd db_clock: Add conversion function from db_clock to gc_clock 2015-03-11 14:56:10 +01:00
Tomasz Grabiec
b3f601c27d to_string: Fix size type mismatch 2015-03-11 14:56:09 +01:00
Tomasz Grabiec
58cf8758f7 to_string: Take vectors by const& 2015-03-11 14:56:09 +01:00
Tomasz Grabiec
49d97a7f93 to_string: Introduce join() 2015-03-11 14:56:09 +01:00
Tomasz Grabiec
4c7480ce3b cql3: Introduce to_identifier(column_definition&) 2015-03-11 14:56:09 +01:00
Tomasz Grabiec
70059ac1d4 cql3: Add to_identifiers()
Converts org.apache.cassandra.config.ColumnDefinition#toIdentifiers(List<ColumnDefinition>);
2015-03-11 14:56:09 +01:00
Tomasz Grabiec
53eb4ab35d enum_set: Add mask getter 2015-03-11 14:56:09 +01:00
Tomasz Grabiec
13850d912e enum_set: Add more operations 2015-03-11 14:56:09 +01:00
Tomasz Grabiec
1ba0015a99 Merge remote-tracking branch 'seastar/master'
Conflicts:
	configure.py
2015-03-11 14:45:35 +01:00
Raphael S. Carvalho
a4aae5b6ab fstream: fix comment
Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-03-11 14:45:43 +02:00
Avi Kivity
06bd67c221 db: move map_type:impl::mutation and associated helpers to collection_type_impl
Turns out the sets and lists also use the same data type, with sets using
a fake value type, and lists using a fake key type.
2015-03-11 14:42:42 +02:00
Avi Kivity
5f309f4d33 db: add empty_type
Used in sets for the value type.
2015-03-11 14:42:42 +02:00
Avi Kivity
da902a4c17 db: add helper for interning types; use in map_type
Avoid code repetition for other collections.
2015-03-11 14:42:42 +02:00
Avi Kivity
b5125cc03e uuid: remove debug print 2015-03-11 14:42:42 +02:00
Avi Kivity
835c8b693c uuid: fix uuidgen thread safety
The instance must be thread local since it is mutable (last_nanos).
2015-03-11 14:42:42 +02:00
Tomasz Grabiec
293a6e7547 tests: Test distributed::map_reduce() version which takes a functor 2015-03-11 13:33:53 +01:00
Tomasz Grabiec
976c9da314 core: Add distributed::map_reduce() version which takes a functor 2015-03-11 13:33:01 +01:00
Tomasz Grabiec
200f4698b5 tests: Add test for map_reduce() 2015-03-11 13:24:31 +01:00
Tomasz Grabiec
56f6d12bae core: Fix map_reduce() which incorrectly moves away arguments 2015-03-11 13:21:23 +01:00
Gleb Natapov
8f168d3abc helpers to get function's return parameters and argument list 2015-03-11 12:39:49 +02:00
Avi Kivity
713d9561e9 Merge branch 'master' of github.com:cloudius-systems/seastar into db
Conflicts:
	configure.py
2015-03-11 10:12:38 +02:00
Shlomi Livne
820ea940ba tests: generate a boost report file that can be parsed by jenkins
Boost XML report files can be parsed by Jenkins and provide a mean for
jenkins to track specific test cases status.

Signed-off-by: Shlomi Livne <shlomi@cloudius-systems.com>
2015-03-11 10:03:21 +02:00
Avi Kivity
c89df6748c Merge branch 'master' of https://github.com/raphaelsc/seastar
File output streams, from Raphael.
2015-03-11 09:54:01 +02:00
Raphael S. Carvalho
10a71dadac tests: add fstream testcase 2015-03-10 18:44:40 -03:00
Raphael S. Carvalho
971a3bb0b9 fstream: add file output stream support 2015-03-10 18:44:22 -03:00
Avi Kivity
a3695dbcc4 future: add a test case for runtime sized when_all() 2015-03-10 22:01:55 +02:00
Avi Kivity
239475e10b future: add runtime-sized variant of when_all()
Add a when_all() variant that waits for a runtime variable number of
futures, all of the same type.  The function returns a future containing
a vector of all input futures, each in ready state, containing either
a result or an exception.
2015-03-10 22:00:02 +02:00
Avi Kivity
baf62adbab future: make when_all(Future... future) mode selective
Currently we have one version of when_all(), that accepts a compile
type variable number of independently typed futures.  We wish to add more
overloads, but for that, we must ensure that this variant doesn't match them.

Accomplish this by requiring that the first argument be a future, and don't
accept any other type.
2015-03-10 21:55:54 +02:00
Raphael S. Carvalho
de5a70282d core: add truncate entry to open_flags
It will be used when opening a file intended to be used with a
'file_output_stream'.
2015-03-10 16:09:48 -03:00
Raphael S. Carvalho
fe896fa4e4 core: add truncate function to file class 2015-03-10 15:43:39 -03:00
Raphael S. Carvalho
1a1368342b output_stream: add allocate_buffer method to data_sink and use it
allocate_buffer was added to data_sink as a virtual method, so that
a class extending it can override its implementation.
output_stream will also start using allocate_buffer whenever it
needs a temporary buffer.
2015-03-10 15:39:56 -03:00
Avi Kivity
c4febdeb63 Merge branch 'glommer/index-reader-v4' of github.com:cloudius-systems/seastar-dev into urchin
Sstable index reader, from Glauber.
2015-03-10 20:24:02 +02:00
Glauber Costa
7c96752a46 sstable_tests: add tests for index reads
Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-03-10 15:13:14 -03:00
Glauber Costa
c0ad2a8e0e sstables: parse the index file
We usually don't read the whole file into memory, so the probing interface will
also allow for the specification of boundaries that we should be use for
reading.

The sstable needs to be informed - usually by the schema - of how many columns
the partition key is composed of - 1 for simple keys, more than one, for
composites.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-03-10 15:13:14 -03:00
Glauber Costa
a3febe2ae0 sstable: open data and index files.
Because we're expected to go to those files many times, it doesn't make sense
to keep opening them. Upon sstable load, we will open those files and then move
the reference to the sstable main structure. From this point on, we can just seek
to the position we want.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-03-10 15:13:14 -03:00
Glauber Costa
cea4825642 sstables: change exception message
So it represents all kinds of mismatches. Not only buf < expected.
It will be useful in the index parsing code.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-03-10 15:13:14 -03:00
Glauber Costa
d19abb59fb file_input_stream: accept a shared pointer in the constructor
Right now we will always move the file to create a shared pointer from it.
However, there are situations in which we don't really want to move it, because
it will be still used elsewhere.

One example is the index and data readers, where we will store a file object to
avoid opening the file all the time. In such situation, we can pass a shared
pointer that is already constructed to the file_input_stream.

The alternative to that would have been to store the file_input_stream itself.
That would, however, require us to export that in some header. It's best to
keep it private. Since we will already deal with a shared pointer anyway, it is
best to provide this option.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-03-10 15:03:51 -03:00
Glauber Costa
87e6b7ab56 sstables: signal eof in file_input_stream
We signal that condition in the underlying input_stream. Export that
to the file stream.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-03-10 15:03:51 -03:00
Nadav Har'El
8b4117cc66 fstream: use temporary_buffer<char>::aligned
In fstream.cc, use the convenient new temporary_buffer<char>::aligned()
function for creating an aligned temporary buffer - instead of repeating
its implementation.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-03-10 17:25:42 +02:00
Avi Kivity
0139a210e2 Merge branch 'master' of github.com:cloudius-systems/seastar into db 2015-03-10 17:04:16 +02:00