Commit Graph

12 Commits

Author SHA1 Message Date
Amnon Heiman
a4be7afbb0 API: cache_capacity should use uint for summing
Using integer as a type for the map_reduce causes number over overflow.

Fixes #1801

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1479299425-782-1-git-send-email-amnon@scylladb.com>
2016-11-16 13:55:46 +01:00
Calle Wilund
0181fc8159 api::cache_service: Add (dummy) calls for key&counter metrics 2016-11-08 12:22:04 +00:00
Amnon Heiman
ad34f80e6f API: change cache_service, column_family and storage_proxy to rate
object

The API would expose now the rate_moving_average and
rate_moving_average_and_histogram.

The old end points remains for the transition period, but marked as
depricated.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2016-05-17 11:56:52 +03:00
Pekka Enberg
38a54df863 Fix pre-ScyllaDB copyright statements
People keep tripping over the old copyrights and copy-pasting them to
new files. Search and replace "Cloudius Systems" with "ScyllaDB".

Message-Id: <1460013664-25966-1-git-send-email-penberg@scylladb.com>
2016-04-08 08:12:47 +03:00
Avi Kivity
d5cf0fb2b1 Add license notices 2015-09-20 10:43:39 +03:00
Amnon Heiman
12a92939bf API: cache service save priod time to return 0
We do not save the cache, so the get for save priod in second should
return 0, to indicate never like it is done in origin.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-09-10 18:21:40 +03:00
Amnon Heiman
1238240eea API: Return 0 for key and counter cache's metrics
Until we'll support key and counter cache, it is reasonable to return 0
for their statistic and sizes.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-09-10 12:42:14 +03:00
Amnon Heiman
fe9f7b4d04 API: Call unimplemented for stub API methods that are stubed
The API contains stub API methods, this adds a call to unimplemented
method in each of the stubed method that is not implemented.

The return remains the same to help the compiler deduce the return type
of the lambda function.

After this patch a call to an unimplemented API function will return
500.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-09-08 19:14:30 +03:00
Amnon Heiman
a43b3badaf API: Add row related method to cache_service API
This adds the implementation for get_row_hits, get_row_requests,
get_row_hit_rate, row_enries, row_size and row_capacity

The implementation is based on the column-family map reduce

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-17 20:09:07 +03:00
Amnon Heiman
b6fa2187af Cleanup the cache_service API
This replaces the void method in the cache service API to be json_void

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-07-15 14:20:28 +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
4258b005db API: Adding stub implementation for the cache service
This adds a stub implementation for the cache_service. It also register
the API doc.
The cache_service doc will be available at:
http://localhost:10000/api-doc/cache_service/

The stub implementation returns the correct value type with stubbed
values.

After this patch the following path will be available:
/cache_service/row_cache_save_period
/cache_service/key_cache_save_period
/cache_service/counter_cache_save_period
/cache_service/row_cache_keys_to_save
/cache_service/key_cache_keys_to_save
/cache_service/counter_cache_keys_to_save
/cache_service/invalidate_key_cache
/cache_service/invalidate_counter_cache
/cache_service/row_cache_capacity
/cache_service/key_cache_capacity
/cache_service/counter_cache_capacity
/cache_service/save_caches

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-24 14:30:08 +03:00