Commit Graph

4504 Commits

Author SHA1 Message Date
Calle Wilund
94fcce501e Cql3.g: handle token in grammar 2015-07-08 10:02:31 +02:00
Calle Wilund
bb6677b47a TokenRelation: Java -> c++ 2015-07-08 10:02:31 +02:00
Calle Wilund
d7c10ff3b6 cql3::relation - fix constness 2015-07-08 10:02:31 +02:00
Calle Wilund
73421cb413 TokenRestriction: Java->c++ 2015-07-08 10:02:31 +02:00
Calle Wilund
4a5a5359b0 cql3::restrictions - refactor and clean up
Needed to reasonably cleanly implement token restrictions. 

* Fixed constness for various virtuals. 
* primary_key_restrictions now inherit abstract_restriction,
  similuar to Origin (for better or for worse), to avoid 
  duplicating attributes etc. 
* primary_key_restrictions bounds & values renamed (so not to
  collide with restriction), and some logic pushed downwards 
  (building bounds), to avoid abstraction breakage in 
  statement_restrictions
* primary_key_restrictions merging is now potentially replacing
  to make dispatching token/multicolumn restrictions simpler
2015-07-08 10:02:31 +02:00
Calle Wilund
a18889380e cql3::functions::functions: dispatch token function 2015-07-08 10:02:31 +02:00
Calle Wilund
b17c3bf6df TokenFct Java->C++ 2015-07-08 10:02:31 +02:00
Calle Wilund
9c4c9eff50 schema: add outstream << op to print column_definition pointers
- since these are typically non-smart.
2015-07-08 10:02:31 +02:00
Calle Wilund
15642f917c query_processor bug fix: execute_internal did not keep options alive
... across the whole call chain. Should fix test failure.
2015-07-08 10:02:30 +02:00
Paweł Dziepak
189dfd5954 tests/type: add test cases for validation
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-08 10:02:30 +02:00
Paweł Dziepak
414c37f06f types: implement validation for built-in types
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-08 10:02:30 +02:00
Paweł Dziepak
0d869276b5 tests/cql: add tests for blobAs*() and *AsBlob() functions
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-08 10:02:30 +02:00
Paweł Dziepak
296a77b7f3 cql3: fix *asblob() and blobas*() functions names
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-08 10:02:30 +02:00
Avi Kivity
a65aea1399 Merge branch 'master' of github.com:cloudius-systems/urchin into db 2015-07-07 15:36:46 +03:00
Avi Kivity
fb28054c2e cql3: convert sets::marker::bind to C++ 2015-07-07 14:31:35 +02:00
Pekka Enberg
86d913954a db/legacy_schema_tables: Store CF "is_dense" to system tables
Persist column family's "is_dense" value to system tables. Please note
that we throw an exception if "is_dense" is null upon read. That needs
to be fixed later by inferring the value from other information like
Origin does.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-07 12:36:50 +02:00
Avi Kivity
8429e39a9f Merge seastar upstream 2015-07-07 13:25:52 +03:00
Gleb Natapov
3dbccbc5b5 rpc: read value from a tuple before moving it
Noticed by Tomek.
2015-07-07 13:21:11 +03:00
Pekka Enberg
3437a49d26 cql3: Enable CF "bloom_filter_fp_chance"
Enable column family "bloom_filter_fp_chance" from the CQL front-end and
make sure its persisted to system tables.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-07 13:09:58 +03:00
Nadav Har'El
9b63b02328 doc: fix small mixup in reference (pipe.hh)
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-07-07 12:57:09 +03:00
Avi Kivity
0c848e9a4e rpc: add missing move()s in get_reply()
If the reply is a movable-but-not-copyable type, then we must move it into
the returned future.  Also faster even if the type is copyable.
2015-07-07 12:56:33 +03:00
Tomasz Grabiec
c86a591aee Merge branch 'dev/pdziepak/types-from-string/v2' 2015-07-07 11:33:23 +03:00
Paweł Dziepak
9b61d4d433 tests/types: add tests for timeuuid, uuid, timestamp and inet
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:46:09 +02:00
Avi Kivity
af30fe11df doc: more info in fiber module reference table 2015-07-07 00:38:53 +03:00
Paweł Dziepak
00da6e24fc tests/cql: test insert and select for all types
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:38:27 +02:00
Paweł Dziepak
1552788098 transport: catch cassandra_exception and pass it to client
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:37:04 +02:00
Paweł Dziepak
8945fc1cb2 exceptions: make invalid_request a subclass of request_validation
invalid_request_exceptions is one of the exceptions that should be
propagated to the client in form of a error code. That's why it should
belong to a hierarchy with cassandra_exception at root, so that all
exceptions like that can be easily caught and passed to the client.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:36:58 +02:00
Paweł Dziepak
024a706692 exceptions: remove duplicate marshal_exception
There are both marshal_exception (defined in types.hh) and
exceptions::marshal_exception (defined ini exceptions/exceptions.hh).
The latter is never thrown by anything but caught in few places which
obviously is incorrect.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:36:48 +02:00
Paweł Dziepak
22568a1995 types: implement timestamp_type_impl::from_string()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:36:18 +02:00
Paweł Dziepak
9c025946f0 uuid: handle invalid strings more gracefully
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:33:58 +02:00
Paweł Dziepak
d993ec69f6 types: implement inet_addr_type_impl::{from, to}_sstring()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:33:03 +02:00
Paweł Dziepak
bb30e05149 types: implement uuid_type_impl::{from, to}_sstring()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:31:22 +02:00
Paweł Dziepak
b33a401f01 types: implement timeuuid_type_impl::{from, to}_sstring()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:30:44 +02:00
Avi Kivity
1501b273f6 doc: add reference section to fiber module 2015-07-07 00:29:23 +03:00
Paweł Dziepak
9b89bad329 utils: allow creating uuid from sstring_view
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:26:47 +02:00
Paweł Dziepak
cce2996cde cql3: enable inet type in cql grammar definition
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:26:40 +02:00
Paweł Dziepak
f8598a668a types: implement floating_type_impl::{from, to}_string()
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-07-06 23:26:17 +02:00
Avi Kivity
89931d53fa semaphore: document 2015-07-07 00:10:51 +03:00
Pekka Enberg
c24b7d42ce db/legacy_schema_tables: Store CF key validator in system tables
Store the column family key validator in system tables. Please note that
we derive the validator from CQL partition keys and never actually read
it from the database. This is different from Origin which uses
CompositeType that is both stored and read from the system tables.

Fixes #7.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Tested-by: Pekka Enberg <penberg@cloudius-systems.com>
2015-07-06 20:33:05 +03:00
Tomasz Grabiec
93bf8fa3ba Merge branch 'calle/execute_internal' from seastar-dev.git 2015-07-06 15:26:18 +03:00
Avi Kivity
a5d3f1eac1 Merge "API: Adding the commmit log metrics support" from Amnon
"This series adds support to the commit log metrics, tht define according to the
CommitLogMetrics"
2015-07-06 13:27:17 +03:00
Amnon Heiman
fd7e0e512a Adding the commit log metric stub implementation
This adds a stub implementation to the commit log metrics.
The calls return the currect value type with a stub value.

After this patch the following url will be available:
/commitlog/metrics/completed_tasks
/commitlog/metrics/pending_tasks
/commitlog/metrics/total_commit_log_size

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-06 12:38:22 +03:00
Amnon Heiman
240c7b0572 API: Adding the commit log metrics definitions
This adds the commit log swagger definition to to the commit log
definition file.

The API is based on the CommitLogMetrics.
The following commands were added:
get_completed_tasks
get_pending_tasks
get_total_commit_log_size

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-06 12:37:45 +03:00
Gleb Natapov
cfcca4315c do not copy query::result while sending it back to a coordinator
RPC can send directly from a smart pointer now.
2015-07-06 10:17:39 +02:00
Avi Kivity
5338a6a8db Merge branch 'master' of github.com:cloudius-systems/seastar 2015-07-06 11:12:36 +03:00
Vlad Zolotarov
f8d2679728 locator: add a virtual get_name() method to snitch classes
Add a pure virtual i_endpoint_snitch::get_name() method that
should return the corresponding Java-name of a snitch
class instance.

Patch is also available on dev:/snitch-get-name-v1

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-06 10:11:30 +02:00
Amnon Heiman
2c08647a6e scollectd: change get_collectd_value() to use const ref
After the implementation of the code that uses the scollectd API was
modified, the get_collectd_value gets the collectd ID as a const
reference, to remove unnessary creation of shared_ptr.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-06 11:09:32 +03:00
Gleb Natapov
b175d276ab implement get_natural_endpoints for local_strategy
abstract_replication_strategy::get_natural_endpoints()
does some token calculations before calling strategy specific
calculate_natural_endpoints(), but system table may be read before
token metadata (needed for token calculations) is ready. Fix that by
specializing local_strategy's get_natural_endpoints() to skip token
calculation.
2015-07-06 09:57:14 +02:00
Tomasz Grabiec
510f236e7c Merge branch 'penberg/cql-truncate-stmt' from seastar-dev.git
"truncate" statement grammar from Pekka.
2015-07-06 09:54:12 +02:00
Tomasz Grabiec
4952a6bb9e Merge branch 'penberg/cql-create-index-stmt' from seatar-dev.git
"create index" CQL grammar from Pekka.
2015-07-06 09:41:29 +02:00