Commit Graph

53948 Commits

Author SHA1 Message Date
Amnon Heiman
3a43a61203 Adding the Swagger definition of the endpoint_snitch_info
This adds the Swagger definition for the endpoint_snitch_info that is
based on the EndpointSnitchInfoMBean.
The following commands where added:
get_datacenter
get_rack
get_snitch_name

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 17:44:05 +03:00
Avi Kivity
b0fd850463 Merge "Code missing for a NetworkTopologyStrategy integration" from Vlad
"This series add a code missing for an integration of a NetworkTopologyStrategy
with a current clustering WRITE path."
2015-07-02 17:31:49 +03:00
Avi Kivity
1eabf5983f Merge seastar upstream 2015-07-02 17:07:04 +03:00
Gleb Natapov
d0003e4f29 rpc: handler smart pointer return value from rpc handler
Currently if rpc handler returns smart pointer rpc will try to serialize
the pointer object as opposite to an object the ptr is pointing to.
This patch fixes it by serializing real object instead of a pointer.
2015-07-02 16:46:23 +03:00
Gleb Natapov
7d33cf62a5 Add is_smart_ptr metafunction to detect know smart pointers objects 2015-07-02 16:46:23 +03:00
Avi Kivity
4ef3eaef4d Merge "Add tests for query interface on mutation level" from Tomasz 2015-07-02 16:35:27 +03:00
Vlad Zolotarov
89a7e84483 service: storage_proxy: implement datacenter_sync_write_response_handler
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00
Vlad Zolotarov
4a78d173f6 service: storage_proxy::send_to_live_endpoints(): properly query a datacenter name
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00
Vlad Zolotarov
acb8b9fcda service: storage_proxy::mutate(): properly query local_dc
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 16:00:47 +03:00
Vlad Zolotarov
77c50dc013 db: consistency_level.hh: complete assure_sufficient_live_nodes()
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v2:
   - Use static_cast instead of a dynamic_cast.
2015-07-02 16:00:17 +03:00
Avi Kivity
7145ce7ee9 Merge seastar upstream 2015-07-02 15:59:57 +03:00
Vlad Zolotarov
a4a6c0d69e db: consistency_level.hh: implement is_local()
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 15:59:40 +03:00
Vlad Zolotarov
ff770a61a5 db: consistency_level.hh: complete block_for() function
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v2:
   - Use static_cast instead of a dynamic_cast.
2015-07-02 15:58:50 +03:00
Vlad Zolotarov
6b609d5b35 db: consistency_level.hh: implement local_quorum_for()
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>

New in v2:
   - Use static_cast instead of a dynamic_cast.
2015-07-02 15:56:56 +03:00
Tomasz Grabiec
f89ae4078f tests: Add test for querying a mutation 2015-07-02 14:51:28 +02:00
Tomasz Grabiec
464434d3d4 mutation: Add query() method 2015-07-02 14:51:28 +02:00
Tomasz Grabiec
f711e4e978 tests: Mark assert_that() inline instead of static 2015-07-02 14:51:28 +02:00
Tomasz Grabiec
eba6b492a6 tests: Introduce result_set assertions 2015-07-02 14:51:27 +02:00
Avi Kivity
033e46c7b0 sharded: speed up compilation
- unify three invoke_on() variants by using futurize<>
 - move type calculation out of method signature
2015-07-02 15:33:35 +03:00
Gleb Natapov
c81cf80d8a fix mutation forwarding for muti-DC setup
Forwarding lambda is reused, so we cannot move captures out of it
and we cannot pass references to them either since lambda can be
destroyed before send completes.
2015-07-02 15:30:21 +03:00
Tomasz Grabiec
c5d1f9c493 result_set: Expose get_data_value() 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
4c008e059a result_set: Store schema pointer with result_set 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
f388139a7b result_set_builder: Move to source file 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
a1f6dec067 result_set: Introduce from_raw_result() factory method 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
c9e5508e3c result_set_builder: Make build() return unwrapped object
It's better to let the user decide which kind (if any) of smart
pointer to wrap it into.
2015-07-02 13:25:46 +02:00
Tomasz Grabiec
f46b7a815e query: Fix typos in comments 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
3fc951e807 mutation_partition: Use default value for row_limit in query() 2015-07-02 13:25:46 +02:00
Tomasz Grabiec
1b4a72de14 query: Introduce query::max_rows 2015-07-02 13:25:46 +02:00
Vlad Zolotarov
fa60555ddd locator: network_topology_strategy: make get_datacenters() public
Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 13:01:00 +03:00
Avi Kivity
00da6d85c3 future: optimize for compile time
.then()'s return type is a complex template, which needs to be mangled into
the function's name.  Move the return type into a defaulted template type
parameter, so that the entire type expression is eliminated, being replaced
by the result type.

Saves about 1% compile time and 3% object size on futures_test.o.
2015-07-02 12:47:07 +03:00
Vlad Zolotarov
888a33f9d2 locator: add a replication strategy type field to abstract_replication_strategy
This is meant to exclude the exceptions throwing when we want to
branch on a specific instance type (Java's instanceof call).

Signed-off-by: Vlad Zolotarov <vladz@cloudius-systems.com>
2015-07-02 12:26:34 +03:00
Nadav Har'El
53aa239865 sstables: remove some dead code
Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
2015-07-02 12:13:22 +03:00
Amnon Heiman
477d06aa96 API: Adding the metrics stub to the compaction_manager
This adds a stub implementation to the compaction_manager.
The API would return the currect type but with stub values.
After this patch the following url will be available:
/compaction_manager/metrics/pending_tasks
/compaction_manager/metrics/completed_tasks
/compaction_manager/metrics/total_compactions_completed
/compaction_manager/metrics/bytes_compacted

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 09:55:37 +03:00
Amnon Heiman
acb56ab133 API: Adding the metrics to the compaction_manager
This adds the metrics definition to the compaction_manager, it is based
on the CompactionMetrics definition.

The following command were added:
get_pending_tasks
get_completed_tasks
get_total_compactions_completed
get_bytes_compacted

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 09:53:34 +03:00
Amnon Heiman
2d04668de5 API: Adding the compaction_manager API stub implementation
This adds a stub implementation for the compaction_manager API.

The methods return the right types but with a stub value.
After this patch the following url will be available:
/compaction_manager/compactions
/compaction_manager/compaction_summary
/compaction_manager/force_user_defined_compaction
/compaction_manager/stop_compaction

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 09:46:19 +03:00
Amnon Heiman
771f818ed0 Adding the compaction_manager Swagger definition file
This adds the Swagger definition file for the compaction_manager.
It is based on the CompactionManagerMBean and contains the following
command:

get_compactions
get_compaction_summary
force_user_defined_compaction
stop_compaction

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-02 09:33:57 +03:00
Tomasz Grabiec
a4d2946d20 Merge branch 'gleb/for_urchin' (read clustering) from seastar-dev.git
Read clustering from Gleb.
2015-07-01 13:31:02 +02:00
Gleb Natapov
4b9661c608 initial read clustering code
Works only if all replicas (participating in CL) has the same live
data. Does not detects mismatch in tombstones (no infrastructure yet).
Does not report timeout yet.
2015-07-01 13:36:30 +03:00
Gleb Natapov
730170ff1a serialize data structures needed for read clustering 2015-07-01 13:36:28 +03:00
Gleb Natapov
3d3d3a8627 implment query::result::digest() 2015-07-01 13:35:57 +03:00
Glauber Costa
0b0d0122fb thrift: create directory in the local shard only
The comment says the directory is created on the local shard only, but when
this code was converted, it ended up being moved inside the invoke_on_all lambda,
which means now it is called from all shards. Fix it by reorganizing the code.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-07-01 13:14:24 +03:00
Avi Kivity
e9c90060c4 Merge "Keyspace replication strategy options fixes" from Paweł
"These two patches fix handling of replication strategy options: maps are now
serialized and deserialized from json correctly and class name is not stored
together with other replication strategy options."
2015-07-01 13:12:19 +03:00
Avi Kivity
e6b88ae84a Merge "streaming updates" from Asias 2015-07-01 11:48:35 +03:00
Avi Kivity
1744caef70 Merge "serialization for streaming" from Asias 2015-07-01 11:12:30 +03:00
Amnon Heiman
a64c4da4ea Adding stub implementation for the chace service metrics
This adds a stub implementation for the cache service metrics for key,
row and counters.

A call to the API would return the correct type but with a stub value.
After this patch the following url will be available:
/cache_service/metrics/key/capacity
/cache_service/metrics/key/hits
/cache_service/metrics/key/requests
/cache_service/metrics/key/hit_rate
/cache_service/metrics/key/size
/cache_service/metrics/key/entries
/cache_service/metrics/row/capacity
/cache_service/metrics/row/hits
/cache_service/metrics/row/requests
/cache_service/metrics/row/hit_rate
/cache_service/metrics/row/size
/cache_service/metrics/row/entries
/cache_service/metrics/counter/capacity
/cache_service/metrics/counter/hits
/cache_service/metrics/counter/requests
/cache_service/metrics/counter/hit_rate
/cache_service/metrics/counter/size
/cache_service/metrics/counter/entries

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-01 10:03:44 +03:00
Amnon Heiman
1054d95c25 Adding the cache service metrics Swgger definition
The cache service holds metrics for key, row and counters, this adds the
Swagger API definitions for the different cache.

The following commands where added:
get_key_capacity
get_key_hits
get_key_requests
get_key_hit_rate
get_key_size
get_key_entries
get_row_capacity
get_row_hits
get_row_requests
get_row_hit_rate
get_row_size
get_row_entries
get_counter_capacity
get_counter_hits
get_counter_requests
get_counter_hit_rate
get_counter_size
get_counter_entries

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-01 10:03:13 +03:00
Paweł Dziepak
0a8c50bdf8 cql3: remove replication strategy class from replication options
The class name is stored separately and shouldn't be kept in the map
together with other options.

Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-06-30 18:44:24 +02:00
Glauber Costa
641034075b sprint: use sstring as a parameter to sprint
We can use sstring as an argument to sprint. In some cases, we already have the
string in a variable and end up being forced to call c_str() from the caller
site. Accepting sstring as a parameter makes for a cleaner interface.

Signed-off-by: Glauber Costa <glommer@cloudius-systems.com>
2015-06-30 19:11:18 +03:00
Paweł Dziepak
8565a22d33 json: fix (de)serialization of map
Signed-off-by: Paweł Dziepak <pdziepak@cloudius-systems.com>
2015-06-30 17:59:42 +02:00
Raphael S. Carvalho
c3372c36a2 sstables: keep track of compacted sstable's ancestors
In C*, every compacted sstable keeps track of its ancestors in the
statistics file. Supposedly, that info is used to discard sstable
files from ancestors which for some odd reason weren't deleted.

Signed-off-by: Raphael S. Carvalho <raphaelsc@cloudius-systems.com>
2015-06-30 18:09:01 +03:00