Commit Graph

20 Commits

Author SHA1 Message Date
Calle Wilund
5eb54f9bc4 api::storage_service: c3 compat - make query keyspaces a trinary choice
all, user or non-local strategy ones.
2016-11-08 12:22:04 +00:00
Amnon Heiman
ed1d02b1a3 API: Add slow query API definition
This adds the GET and POST api for slow query logging.

The GET return an object with the enable, ttl and threshold and the POST
lets you configure each of them.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2016-09-03 01:15:15 +03:00
Amnon Heiman
56ea8c943e API: add scylla release version API
This adds a definition to the scylla release version. The API already
return the compatibility version (ie. the compatible origin version)

This definition returns the scylla version, a call to the API should
return the same result as running scylla --version.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2016-07-03 16:26:21 +03:00
Nadav Har'El
f9ee74f56f repair: options for repairing only a subrange
To implement nodetool's "--start-token"/"--end-token" feature, we need
to be able to repair only *part* of the ranges held by this node.
Our REST API already had a "ranges" option where the tool can list the
specific ranges to repair, but using this interface in the JMX
implementation is inconvenient, because it requires the *Java* code
to be able to intersect the given start/end token range with the actual
ranges held by the repaired node.

A more reasonable approach, which this patch uses, is to add new
"startToken"/"endToken" options to the repair's REST API. What these
options do is is to find the node's token ranges as usual, and only
then *intersect* them with the user-specified token range. The JMX
implementation becomes much simpler (in a separate patch for scylla-jmx)
and the real work is done in the C++ code, where it belongs, not in
Java code.

With the additional scylla-jmx patch to use the new REST API options
provided here, this fixes #917.

Signed-off-by: Nadav Har'El <nyh@scylladb.com>
Message-Id: <1455807739-25581-1-git-send-email-nyh@scylladb.com>
2016-02-18 17:13:56 +02:00
Amnon Heiman
6942b41693 API: rename the map of string, double to map_string_double
This replaces the confusing name to a more meaningful name.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
Message-Id: <1451466952-405-1-git-send-email-amnon@scylladb.com>
2016-01-03 19:10:49 +02:00
Pekka Enberg
0aa105c9cf Merge "load report a negative value" from Amnon
"This series solve an issue with the load broadcaster that reports negative
 values due to an integer wrap around.  While fixing this issue an additional
 change was made so that the load_map would return doubles and not formatted
 string.  This is a better API, safer and better documented."
2015-12-30 10:21:55 +02:00
Amnon Heiman
ec379649ea API: repair to use documented params
The repair API use to have an undocumented parameter list similiar to
origin.

This patch changes the way repair is getting its parameters.
Instead of a one undocumented string it now lists all the different
optional parameters in the swagger file and accept them explicitely.

Reviewed-by: Nadav Har'El <nyh@scylladb.com>
Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-12-29 15:38:44 +02:00
Amnon Heiman
71905081b1 API: report the load map as an unformatted double
In origin the storage_serivce report the load map as a formatted string.
As an API a better option is to report the load map as double and let
the JMX proxy do the formatting.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-12-29 11:55:34 +02:00
Amnon Heiman
ef3c6b2647 API: Add describe ring API implementation
This patch chanages the API to support describe ring instead of describe
ring jmx that will be implemented in the jmx server.

The API will return a list of objects instead of string.

An additional api was added as the equivelent to the jmx call with an
empty param.

Signed-off-by: Amnon Heiman <amnon@scylladb.com>
2015-11-03 16:33:39 +02:00
Asias He
06b19867d8 api: Fix storage_service remove_node parameter
nodetool removenode takes the parameter of host_id instead of token.

Refs: #496
2015-10-26 10:32:47 +02:00
Amnon Heiman
1e8752d55e API: Fix a confusion in the storage service snapshot details
There was a confusion between the snapshot key and the keyspace in the
snapshot details, this fixes it.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-10-20 13:53:09 +03:00
Amnon Heiman
6fd3c81db5 keyspace clean up should be a POST not a GET 2015-10-11 15:51:56 +03:00
Amnon Heiman
2c5716dac3 API: storage_service Add the swagger definition for ownership
This adds the API for get_effective_ownership and
get_ownership in storage_service.

It is based on the StorageServiceMBean definition.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 19:39:13 +03:00
Amnon Heiman
db30a588b2 API: Break the async repair into two operations
This distinguish between the async repair that starts the repair, that
will now be a POST request and the method that check on the command
progress that will now be a GET command.

After the change each operation would get the parameters that it needs.

The GET will return an enum based on the repair_status.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-25 15:45:30 +03:00
Amnon Heiman
34e60faaca API: Adding the storage service metrics definition
This adds the storage service metrics that is based on the
StorageServiceMetrics class.
The following command where added:
get_metrics_load
get_exceptions
get_total_hints_in_progress
get_total_hints

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-18 11:19:51 +03:00
Amnon Heiman
cae3de162c API: Remove empty line from empty parameters list in
storage_service.json

Just for styling, empty parameters list will not include an empty line.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-08-18 11:19:51 +03:00
Amnon Heiman
d067b9b111 API: Complete defition of the storage service
This patch complete the definition of the storage service.

It is a mapping of the StorageServiceMBean. When possible the following
convention where used:
API that does not return value will be POST or DELETE depends on the
context.

When possible, POST, DELETE and GET uses the same path

The following commands where added:
get_leaving_nodes
get_moving_nodes
get_joining_nodes
get_release_version
get_schema_version
get_all_data_file_locations
get_saved_caches_location
get_range_to_endpoint_map
get_pending_range_to_endpoint_map
describe_ring_jmx
get_host_id_map
get_load
get_load_map
get_current_generation_number
get_natural_endpoints
get_snapshot_details
take_snapshot
del_snapshot
true_snapshots_size
force_keyspace_compaction
force_keyspace_cleanup
scrub
upgrade_sstables
force_keyspace_flush
repair_async
force_terminate_all_repair_sessions
decommission
move
remove_node
get_removal_status
force_remove_completion
set_logging_level
get_logging_levels
get_operation_mode
is_starting
get_drain_progress
drain
truncate
get_keyspaces
update_snitch
stop_gossiping
start_gossiping
is_gossip_running
stop_daemon
is_initialized
stop_rpc_server
start_rpc_server
is_rpc_server_running
start_native_transport
stop_native_transport
is_native_transport_running
join_ring
is_joined
set_stream_throughput_mb_per_sec
get_stream_throughput_mb_per_sec
get_compaction_throughput_mb_per_sec
set_compaction_throughput_mb_per_sec
is_incremental_backups_enabled
set_incremental_backups_enabled
rebuild
bulk_load
bulk_load_async
reschedule_failed_deletions
load_new_ss_tables
sample_key_range
reset_local_schema
set_trace_probability
get_trace_probability
enable_auto_compaction
disable_auto_compaction
deliver_hints
get_cluster_name
get_partitioner_name
get_tombstone_warn_threshold
set_tombstone_warn_threshold
get_tombstone_failure_threshold
set_tombstone_failure_threshold
get_batch_size_failure_threshold
set_batch_size_failure_threshold
set_hinted_handoff_throttle_in_kb

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-06-16 14:30:09 +03:00
Amnon Heiman
bdb2a7ff47 api: Remove empty parameter from storage_service.json
Empty parameter definition is not accepted by the swagger UI, instead,
the parameter list itself should be empty.

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-31 18:17:29 +03:00
Amnon Heiman
a28b90bfd3 Adding definitions to the storage_service
This adds the following definitions to the storage_service swagger
definition file:
/storage_service/tokens
/storage_service/tokens/{endpoint}
/storage_service/commitlog
/storage_service/tokens_endpoint

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-05-27 15:28:20 +03:00
Amnon Heiman
aeb66fa409 API: Adding the stroage service stub
The storage service API will hold the equivelent information of the
StorageServiceMBean.

This adds the API with one stubed method the get local hostid.

After the patch the storage_service doc will be available at:
http://localhost:10000/api-doc/storage_service/

And the stubed local host id will be under:
http://localhost:10000/storage_service/local_hostid

and will return an empty string

Signed-off-by: Amnon Heiman <amnon@cloudius-systems.com>
2015-04-13 18:57:14 +03:00